3
0
Fork 0
forked from mirrors/linux
kernel/drivers/net/ethernet/intel
Joshua Hay 0c1683c681 idpf: trigger SW interrupt when exiting wb_on_itr mode
There is a race condition between exiting wb_on_itr and completion write
backs. For example, we are in wb_on_itr mode and a Tx completion is
generated by HW, ready to be written back, as we are re-enabling
interrupts:

	HW                      SW
	|                       |
	|			| idpf_tx_splitq_clean_all
	|                       | napi_complete_done
	|			|
	| tx_completion_wb 	| idpf_vport_intr_update_itr_ena_irq

That tx_completion_wb happens before the vector is fully re-enabled.
Continuing with this example, it is a UDP stream and the
tx_completion_wb is the last one in the flow (there are no rx packets).
Because the HW generated the completion before the interrupt is fully
enabled, the HW will not fire the interrupt once the timer expires and
the write back will not happen. NAPI poll won't be called.  We have
indicated we're back in interrupt mode but nothing else will trigger the
interrupt. Therefore, the completion goes unprocessed, triggering a Tx
timeout.

To mitigate this, fire a SW triggered interrupt upon exiting wb_on_itr.
This interrupt will catch the rogue completion and avoid the timeout.
Add logic to set the appropriate bits in the vector's dyn_ctl register.

Fixes: 9c4a27da0e ("idpf: enable WB_ON_ITR")
Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-12-17 14:00:26 -08:00
..
e1000 e1000: Hold RTNL when e1000_down can be called 2024-11-13 10:30:21 -08:00
e1000e Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-11-07 13:44:16 -08:00
fm10k
i40e module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
iavf module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ice Including fixes from can and netfilter. 2024-12-05 10:25:06 -08:00
idpf idpf: trigger SW interrupt when exiting wb_on_itr mode 2024-12-17 14:00:26 -08:00
igb igb: Fix potential invalid memory access in igb_init_module() 2024-12-03 10:11:53 -08:00
igbvf igbvf: remove unused spinlock 2024-11-13 10:30:21 -08:00
igc igc: remove autoneg parameter from igc_mac_info 2024-11-13 10:30:21 -08:00
ixgbe ixgbe: Correct BASE-BX10 compliance code 2024-12-03 10:11:53 -08:00
ixgbevf ixgbevf: stop attempting IPSEC offload on Mailbox API 1.5 2024-12-03 10:11:53 -08:00
libeth module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
libie module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
e100.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
Kconfig iavf: Add net_shaper_ops support 2024-10-10 08:30:23 -07:00
Makefile