All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] virtio-net: Maintain reverse cleanup order
@ 2023-02-03 13:37 ` Parav Pandit via Virtualization
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit @ 2023-02-03 13:37 UTC (permalink / raw)
  To: mst, jasowang, davem, kuba, netdev
  Cc: edumazet, pabeni, ast, daniel, hawk, john.fastabend,
	virtualization, bpf, Parav Pandit, Jiri Pirko

To easily audit the code, better to keep the device stop()
sequence to be mirror of the device open() sequence.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 drivers/net/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b7d0b54c3bb0..1f8168e0f64d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2279,9 +2279,9 @@ static int virtnet_close(struct net_device *dev)
 	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);
-		virtnet_napi_tx_disable(&vi->sq[i].napi);
 	}
 
 	return 0;
-- 
2.26.2


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

* [PATCH net-next] virtio-net: Maintain reverse cleanup order
@ 2023-02-03 13:37 ` Parav Pandit via Virtualization
  0 siblings, 0 replies; 3+ messages in thread
From: Parav Pandit via Virtualization @ 2023-02-03 13:37 UTC (permalink / raw)
  To: mst, jasowang, davem, kuba, netdev
  Cc: hawk, daniel, john.fastabend, ast, virtualization, edumazet,
	Jiri Pirko, bpf, pabeni

To easily audit the code, better to keep the device stop()
sequence to be mirror of the device open() sequence.

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 drivers/net/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b7d0b54c3bb0..1f8168e0f64d 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2279,9 +2279,9 @@ static int virtnet_close(struct net_device *dev)
 	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);
-		virtnet_napi_tx_disable(&vi->sq[i].napi);
 	}
 
 	return 0;
-- 
2.26.2

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

* Re: [PATCH net-next] virtio-net: Maintain reverse cleanup order
  2023-02-03 13:37 ` Parav Pandit via Virtualization
  (?)
@ 2023-02-06  9:20 ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-06  9:20 UTC (permalink / raw)
  To: Parav Pandit
  Cc: mst, jasowang, davem, kuba, netdev, edumazet, pabeni, ast,
	daniel, hawk, john.fastabend, virtualization, bpf, jiri

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 3 Feb 2023 15:37:38 +0200 you wrote:
> To easily audit the code, better to keep the device stop()
> sequence to be mirror of the device open() sequence.
> 
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net-next] virtio-net: Maintain reverse cleanup order
    https://git.kernel.org/netdev/net-next/c/27369c9c2b72

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2023-02-06  9:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 13:37 [PATCH net-next] virtio-net: Maintain reverse cleanup order Parav Pandit
2023-02-03 13:37 ` Parav Pandit via Virtualization
2023-02-06  9:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.