Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs
@ 2026-11-18 21:35 Eric Dumazet
  0 siblings, 0 replies; only message in thread
From: Eric Dumazet @ 2026-11-18 21:35 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Willem de Bruijn
  Cc: Simon Horman, netdev, Eric Dumazet, Tony Nguyen, Przemek Kitszel,
	Andrew Lunn

netif_napi_del() waits for an RCU grace period after each NAPI.

idpf_vport_intr_napi_del_all() calls it for every q_vector, so
stopping a vport with N vectors waits for N grace periods. This
happens on ifdown, and on each soft reset triggered by a channel,
ring size or MTU change.

Use __netif_napi_del() and a single synchronize_net() after the loop.

The callers are unchanged: idpf_vport_intr_deinit() still deletes the
NAPIs after they have been disabled and the DIM works drained, and
before the IRQs are released. The error path of idpf_vport_intr_init()
deletes NAPIs which were never enabled.

Compile tested only.

Signed-off-by: Eric Dumazet <edumazet@kernel.org>
---
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index b346187bbf301847224cd7d1655a9294b893acb9..d76613310b12a074117662d0558d2467a21e3bc4 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -3864,7 +3864,10 @@ static irqreturn_t idpf_vport_intr_clean_queues(int __always_unused irq,
 static void idpf_vport_intr_napi_del_all(struct idpf_q_vec_rsrc *rsrc)
 {
 	for (u16 v_idx = 0; v_idx < rsrc->num_q_vectors; v_idx++)
-		netif_napi_del(&rsrc->q_vectors[v_idx].napi);
+		__netif_napi_del(&rsrc->q_vectors[v_idx].napi);
+
+	/* Observe an RCU grace period after __netif_napi_del() calls. */
+	synchronize_net();
 }
 
 /**
-- 
2.53.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18 21:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 21:35 [PATCH net-next] idpf: batch RCU grace periods when deleting NAPIs Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox