From patchwork Thu Aug 11 08:02:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xuan Zhuo X-Patchwork-Id: 12941223 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84D3BC25B0C for ; Thu, 11 Aug 2022 08:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234231AbiHKIDG (ORCPT ); Thu, 11 Aug 2022 04:03:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233851AbiHKIDF (ORCPT ); Thu, 11 Aug 2022 04:03:05 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81C6D28E1C for ; Thu, 11 Aug 2022 01:03:03 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R921e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VLyQMnT_1660204978; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VLyQMnT_1660204978) by smtp.aliyun-inc.com; Thu, 11 Aug 2022 16:02:59 +0800 From: Xuan Zhuo To: virtualization@lists.linux-foundation.org Cc: "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Subject: [PATCH vhost 0/2] virtio_net: fix for stuck when change ring size with dev down Date: Thu, 11 Aug 2022 16:02:56 +0800 Message-Id: <20220811080258.79398-1-xuanzhuo@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-Git-Hash: 4d0f44f05adf Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When dev is set to DOWN state, napi has been disabled, if we modify the ring size at this time, we should not call napi_disable() again, which will cause stuck. And all operations are under the protection of rtnl_lock, so there is no need to consider concurrency issues. PS. Hi Michael, I don't know which way is more convenient for you, so I split the commit into two commits, so you can fixup to my previous commit: virtio_net: support tx queue resize virtio_net: support rx queue resize Xuan Zhuo (2): virtio_net: fix for stuck when change rx ring size with dev down virtio_net: fix for stuck when change tx ring size with dev down drivers/net/virtio_net.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) --- 2.31.0