> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf > Of Alex Dvoretsky > Sent: Friday, March 6, 2026 10:13 PM > To: [email protected] > Cc: [email protected]; Nguyen, Anthony L > <[email protected]>; Kitszel, Przemyslaw > <[email protected]>; [email protected]; > [email protected]; Fijalkowski, Maciej > <[email protected]>; Alex Dvoretsky <[email protected]> > Subject: [Intel-wired-lan] [PATCH net 1/3] igb: check __IGB_DOWN in > igb_clean_rx_irq_zc() > > When an AF_XDP zero-copy application terminates abruptly (e.g., kill - > 9), the XSK buffer pool is destroyed but NAPI polling continues. > igb_clean_rx_irq_zc() repeatedly returns the full budget (no > descriptors, no buffers to allocate, xsk_buff_alloc() returns NULL) > which makes napi_complete_done() re-arm the poll indefinitely. > > Meanwhile igb_down() calls napi_synchronize(), which waits for a NAPI > poll cycle that completes with done < budget. This never happens, so > igb_down() blocks indefinitely. The 5-second TX watchdog fires because > no TX completions are processed while NAPI is stuck. Since igb_down() > never finishes, igb_up() is never called, and the TX queue remains > permanently stalled. > > Fix this by adding an __IGB_DOWN check at the top of > igb_clean_rx_irq_zc(), returning 0 immediately when the adapter is > going down. This allows napi_synchronize() in igb_down() to complete, > matching the pattern already used in igb_clean_tx_irq(). > > Fixes: 2c6196013f84 ("igb: Add AF_XDP zero-copy Rx support") > Cc: [email protected] > Signed-off-by: Alex Dvoretsky <[email protected]> > --- > drivers/net/ethernet/intel/igb/igb_xsk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/intel/igb/igb_xsk.c > b/drivers/net/ethernet/intel/igb/igb_xsk.c > index 30ce5fbb5b77..ca4aa4d935d5 100644 > --- a/drivers/net/ethernet/intel/igb/igb_xsk.c > +++ b/drivers/net/ethernet/intel/igb/igb_xsk.c > @@ -351,6 +351,9 @@ int igb_clean_rx_irq_zc(struct igb_q_vector > *q_vector, > u16 entries_to_alloc; > struct sk_buff *skb; > > + if (test_bit(__IGB_DOWN, &adapter->state)) > + return 0; > + > /* xdp_prog cannot be NULL in the ZC path */ > xdp_prog = READ_ONCE(rx_ring->xdp_prog); > > -- > 2.51.0
Reviewed-by: Aleksandr Loktionov <[email protected]>
