linux/drivers/net/ethernet/intel/i40e
Björn Töpel 59eb2a884f i40e: fix XDP_REDIRECT/XDP xmit ring cleanup race
When the driver clears the XDP xmit ring due to re-configuration or
teardown, in-progress ndo_xdp_xmit must be taken into consideration.

The ndo_xdp_xmit function is typically called from a NAPI context that
the driver does not control. Therefore, we must be careful not to
clear the XDP ring, while the call is on-going. This patch adds a
synchronize_rcu() to wait for napi(s) (preempt-disable regions and
softirqs), prior clearing the queue. Further, the __I40E_CONFIG_BUSY
flag is checked in the ndo_xdp_xmit implementation to avoid touching
the XDP xmit queue during re-configuration.

Fixes: d9314c474d ("i40e: add support for XDP_REDIRECT")
Fixes: 123cecd427 ("i40e: added queue pair disable/enable functions")
Reported-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2019-02-21 11:07:49 -08:00
..
i40e.h i40e: prevent overlapping tx_timeout recover 2018-11-14 10:56:34 -08:00
i40e_adminq.c i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_adminq.h
i40e_adminq_cmd.h i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_alloc.h
i40e_client.c
i40e_client.h
i40e_common.c i40e: Allow disabling FW LLDP on X722 devices 2018-11-14 10:56:33 -08:00
i40e_dcb.c
i40e_dcb.h
i40e_dcb_nl.c
i40e_debugfs.c i40e: Remove unnecessary print statement 2018-10-03 12:33:34 -07:00
i40e_devids.h
i40e_diag.c
i40e_diag.h
i40e_ethtool.c i40e: always set ks->base.speed in i40e_get_settings_link_up 2018-11-14 10:56:33 -08:00
i40e_hmc.c
i40e_hmc.h
i40e_lan_hmc.c
i40e_lan_hmc.h
i40e_main.c i40e: fix XDP_REDIRECT/XDP xmit ring cleanup race 2019-02-21 11:07:49 -08:00
i40e_nvm.c
i40e_osdep.h
i40e_prototype.h
i40e_ptp.c i40e: extend PTP gettime function to read system clock 2018-12-20 12:06:35 -08:00
i40e_register.h
i40e_status.h
i40e_trace.h
i40e_txrx.c i40e: fix XDP_REDIRECT/XDP xmit ring cleanup race 2019-02-21 11:07:49 -08:00
i40e_txrx.h
i40e_txrx_common.h i40e: DRY rx_ptype handling code 2018-12-12 15:46:02 -08:00
i40e_type.h i40e: Add capability flag for stopping FW LLDP 2018-11-14 10:56:33 -08:00
i40e_virtchnl_pf.c i40e: suppress bogus error message 2018-11-14 10:56:34 -08:00
i40e_virtchnl_pf.h i40e: Use correct shift for VLAN priority 2018-11-14 10:56:33 -08:00
i40e_xsk.c i40e: fix potential RX buffer starvation for AF_XDP 2019-02-21 10:56:17 -08:00
i40e_xsk.h
Makefile