linux/drivers/net/ethernet/intel/igb
Alex Dvoretsky b1e0672403 igb: remove napi_synchronize() in igb_down()
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, preventing
napi_complete_done() from clearing NAPI_STATE_SCHED.

igb_down() calls napi_synchronize() before napi_disable() for each queue
vector. napi_synchronize() spins waiting for NAPI_STATE_SCHED to clear,
which never happens. igb_down() blocks indefinitely, the TX watchdog
fires, and the TX queue remains permanently stalled.

napi_disable() already handles this correctly: it sets NAPI_STATE_DISABLE.
After a full-budget poll, __napi_poll() checks napi_disable_pending(). If
set, it forces completion and clears NAPI_STATE_SCHED, breaking the loop
that napi_synchronize() cannot.

napi_synchronize() was added in commit 41f149a285 ("igb: Fix possible
panic caused by Rx traffic arrival while interface is down").
napi_disable() provides stronger guarantees: it prevents further
scheduling and waits for any active poll to exit.
Other Intel drivers (ixgbe, ice, i40e) use napi_disable() without a
preceding napi_synchronize() in their down paths.

Remove redundant napi_synchronize() call and reorder napi_disable()
before igb_set_queue_napi() so the queue-to-NAPI mapping is only
cleared after polling has fully stopped.

Fixes: 2c6196013f ("igb: Add AF_XDP zero-copy Rx support")
Cc: stable@vger.kernel.org
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Alex Dvoretsky <advoretsky@gmail.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Patryk Holda <patryk.holda@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2026-04-06 14:13:19 -07:00
..
e1000_82575.c igb: drop unnecessary constant casts to u16 2025-09-03 10:07:27 -07:00
e1000_82575.h
e1000_defines.h
e1000_hw.h
e1000_i210.c igb: drop unnecessary constant casts to u16 2025-09-03 10:07:27 -07:00
e1000_i210.h
e1000_mac.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_mac.h igb: Cleanup unused declarations 2024-10-08 15:22:32 -07:00
e1000_mbx.c
e1000_mbx.h
e1000_nvm.c igb: drop unnecessary constant casts to u16 2025-09-03 10:07:27 -07:00
e1000_nvm.h igb: Cleanup unused declarations 2024-10-08 15:22:32 -07:00
e1000_phy.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
e1000_phy.h
e1000_regs.h
igb_ethtool.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
igb_hwmon.c
igb_main.c igb: remove napi_synchronize() in igb_down() 2026-04-06 14:13:19 -07:00
igb_ptp.c igb: Switch to use %ptSp 2025-11-19 12:26:06 +01:00
igb_xsk.c igb: Fix trigger of incorrect irq in igb_xsk_wakeup 2026-03-03 13:06:05 -08:00
igb.h igb: drop unnecessary constant casts to u16 2025-09-03 10:07:27 -07:00
Makefile igb: Introduce XSK data structures and helpers 2025-01-07 18:14:08 -08:00