netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function
@ 2023-04-28 22:43 Feng Liu
  2023-05-01 12:44 ` Simon Horman
  2023-05-01 14:14 ` Michael S. Tsirkin
  0 siblings, 2 replies; 7+ messages in thread
From: Feng Liu @ 2023-04-28 22:43 UTC (permalink / raw)
  To: virtualization, netdev, linux-kernel, bpf
  Cc: Jason Wang, Michael S . Tsirkin, Xuan Zhuo, Feng Liu, William Tu,
	Parav Pandit

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)


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-02  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 22:43 [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function Feng Liu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).