From: Feng Liu <feliu@nvidia.com>
To: <virtualization@lists.linux-foundation.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bpf@vger.kernel.org>
Cc: Jason Wang <jasowang@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
Feng Liu <feliu@nvidia.com>, "William Tu" <witu@nvidia.com>,
Parav Pandit <parav@nvidia.com>
Subject: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function
Date: Fri, 28 Apr 2023 18:43:46 -0400 [thread overview]
Message-ID: <20230428224346.68211-1-feliu@nvidia.com> (raw)
Use newly introduced helper function that exactly does the same of
closing the queue pairs.
Signed-off-by: Feng Liu <feliu@nvidia.com>
Reviewed-by: William Tu <witu@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
---
drivers/net/virtio_net.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fc6ee833a09f..5cd78e154d14 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2319,11 +2319,8 @@ static int virtnet_close(struct net_device *dev)
/* Make sure refill_work doesn't re-enable napi! */
cancel_delayed_work_sync(&vi->refill);
- for (i = 0; i < vi->max_queue_pairs; i++) {
- virtnet_napi_tx_disable(&vi->sq[i].napi);
- napi_disable(&vi->rq[i].napi);
- xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
- }
+ for (i = 0; i < vi->max_queue_pairs; i++)
+ virtnet_disable_qp(vi, i);
return 0;
}
--
2.37.1 (Apple Git-137.1)
next reply other threads:[~2023-04-28 22:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 22:43 Feng Liu [this message]
2023-05-01 12:44 ` Simon Horman
2023-05-01 13:58 ` Feng Liu
2023-05-01 14:14 ` Michael S. Tsirkin
2023-05-01 16:53 ` Feng Liu
2023-05-02 6:00 ` Simon Horman
2023-05-01 14:14 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230428224346.68211-1-feliu@nvidia.com \
--to=feliu@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=witu@nvidia.com \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®