Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2150886rwl; Thu, 13 Apr 2023 02:17:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YjnA5Ho+h3+2vmyqsP/CywZ3mwNG5PhBwXUqherw7CvUZv2eJ9MW+6KalNbCfrla3LOajN X-Received: by 2002:a05:6a20:b22:b0:ec:74b:d247 with SMTP id x34-20020a056a200b2200b000ec074bd247mr1425561pzf.44.1681377433462; Thu, 13 Apr 2023 02:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681377433; cv=none; d=google.com; s=arc-20160816; b=dzap+GtySaV6499GpiIASv+DHCl1h4xPswpjYAXml1DjdHXp4VTskB/3AtVKRnYAxO XUm1FYQAheWs1WHZYR2DK/T945Czvm5I0bD1WJqLYp2+hsKEeicLA6lzCxFO9mljh8UZ evO2R4aY3bhNOv1rCZp83AdfNmOUymRKOo4h/qTZkymrJnJCNLKJ9Op/2/kIxrvUyLiH LnZsJoi/84zuhBU9LQeNovQYQpItcKPiLuL5eyHDJMYEABMuyhbUHjGmWzzefBteBp/F YBNcnxmxtag41cUGlCwSXNAPWdOv38Cq6skfy9f42BlWDsPlDeU4DESsjOYYdZ0YIuLU kE7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dyzRm431VL1Fbej5RMckdPouF+WGu3yZlZlqm5Jr8zA=; b=yV4RjPwcd5wcwiGRS3oP+JVV/rCMiTvRJopZS+ZNRrF730dRn35JeAcui1E3w1BAAs 2oMQux5eq02mP/TxfABqbTLfmRWigermaCyzYKwm+n+4u5Qfi6/sTx8uwfTBWlCwRnbK 5sVbUGlHKb9KFhzAf8/Sx0O/58853VL236NqrS5m7S3V42J6a+U966N9v/tEktivvOYL 88nLulqpng5BA/ADkGVyQxDrNZ/diolB4lQ25TNH8iGlaYMIJToFmSjVg3v7LEtpKSFE s8bMYx8imvp8n8AdW7MD3/HUlV/WqjBnAzdO6xmbqmOMk5ua4wCgtuE0qrUQBl3VOxkh af/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bwNdvtUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a634b0e000000b0051a42b37d68si1625908pga.772.2023.04.13.02.17.01; Thu, 13 Apr 2023 02:17:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bwNdvtUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbjDMJO5 (ORCPT + 99 others); Thu, 13 Apr 2023 05:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbjDMJOx (ORCPT ); Thu, 13 Apr 2023 05:14:53 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB8786BC for ; Thu, 13 Apr 2023 02:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681377249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dyzRm431VL1Fbej5RMckdPouF+WGu3yZlZlqm5Jr8zA=; b=bwNdvtUOhYmfIbecP/aF6s+667NqY4OGovuKOwkxFGd2PCqiqAEYbZbKrxjoLrpBg6mmeY CBijLd0IjhH7OaJNNsF5/TsQs9ml4B6L5HtqUazSzDu2AnoG3oyEgQpa6d3mOhFvBS7Xpk PXY6xb1o9TwctTfGk9Fwe2oXdU4u4QI= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-413-aCCOm1cCMm60rCOs0HQjhA-1; Thu, 13 Apr 2023 05:14:07 -0400 X-MC-Unique: aCCOm1cCMm60rCOs0HQjhA-1 Received: by mail-qt1-f199.google.com with SMTP id t30-20020a05622a181e00b003e37dd114e3so10559137qtc.10 for ; Thu, 13 Apr 2023 02:14:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681377247; x=1683969247; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dyzRm431VL1Fbej5RMckdPouF+WGu3yZlZlqm5Jr8zA=; b=aViIXvY3yC+1srfH1TOAPEP9mGHut7EJmwM+ejAOFW1/6Ya4h5MIpEom1CBty9nOgM HxPPg8oa0IldB9nMf0TK2bhme6GY8ec9SWc724ALUMVAa889JGRs0AbF1mpm5Gb4Se8t ACB8WLuO4h8vfRYt8GgnYEKRKRTpFL8T+FLolK4ylALykJgTqrCEoeC8IQB7yxJS2VLP Jn4Frpsz18a8QZTCPTV6MrOibT3lS6an/bqXBQpani08enLrKbTYmREHztsgsTJdQ3kj 83nsF2ufao68neHlGwahrxiH43sLAsVdGzFELmmVQ217cWpyQXbdKf+pcO0vu157zUYb NVzA== X-Gm-Message-State: AAQBX9dh1L9nZHgEprXdHoYCPCa30gdRtV62Avr5uwpDNNP05TqPCLgu l/3Ytj7oysHNCZYHph8aSFJVb4CWv7wxv9/Htr5NyJV7/zUMOuNNak8sjBIlF3lKg4dfw14lWLn Xq7gH8Oi3OQ2sT0nSA6i+t3/1 X-Received: by 2002:ac8:7e95:0:b0:3e3:8e55:1e64 with SMTP id w21-20020ac87e95000000b003e38e551e64mr2377948qtj.14.1681377247474; Thu, 13 Apr 2023 02:14:07 -0700 (PDT) X-Received: by 2002:ac8:7e95:0:b0:3e3:8e55:1e64 with SMTP id w21-20020ac87e95000000b003e38e551e64mr2377935qtj.14.1681377247280; Thu, 13 Apr 2023 02:14:07 -0700 (PDT) Received: from sgarzare-redhat (host-82-53-134-157.retail.telecomitalia.it. [82.53.134.157]) by smtp.gmail.com with ESMTPSA id l22-20020ac81496000000b003e4c6b2cc35sm359795qtj.24.2023.04.13.02.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 02:14:06 -0700 (PDT) Date: Thu, 13 Apr 2023 11:14:01 +0200 From: Stefano Garzarella To: Arseniy Krasnov Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bobby Eshleman , virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@sberdevices.ru, oxffffaa@gmail.com Subject: Re: [RFC PATCH v1] vsock/loopback: don't disable irqs for queue access Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 09, 2023 at 10:17:51PM +0300, Arseniy Krasnov wrote: >This replaces 'skb_queue_tail()' with 'virtio_vsock_skb_queue_tail()'. >The first one uses 'spin_lock_irqsave()', second uses 'spin_lock_bh()'. >There is no need to disable interrupts in the loopback transport as >there is no access to the queue with skbs from interrupt context. Both >virtio and vhost transports work in the same way. Yep, this is a good point! > >Signed-off-by: Arseniy Krasnov >--- > net/vmw_vsock/vsock_loopback.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) LGTM! (net-next material) Reviewed-by: Stefano Garzarella Thanks, Stefano > >diff --git a/net/vmw_vsock/vsock_loopback.c b/net/vmw_vsock/vsock_loopback.c >index e3afc0c866f5..5c6360df1f31 100644 >--- a/net/vmw_vsock/vsock_loopback.c >+++ b/net/vmw_vsock/vsock_loopback.c >@@ -31,8 +31,7 @@ static int vsock_loopback_send_pkt(struct sk_buff *skb) > struct vsock_loopback *vsock = &the_vsock_loopback; > int len = skb->len; > >- skb_queue_tail(&vsock->pkt_queue, skb); >- >+ virtio_vsock_skb_queue_tail(&vsock->pkt_queue, skb); > queue_work(vsock->workqueue, &vsock->pkt_work); > > return len; >-- >2.25.1 >