bianbu-linux-6.6/drivers/net/ethernet/intel/ice
Maciej Fijalkowski 9ead7e74bf ice: xsk: use Rx ring's XDP ring when picking NAPI context
Ice driver allocates per cpu XDP queues so that redirect path can safely
use smp_processor_id() as an index to the array. At the same time
though, XDP rings are used to pick NAPI context to call napi_schedule()
or set NAPIF_STATE_MISSED. When user reduces queue count, say to 8, and
num_possible_cpus() of underlying platform is 44, then this means queue
vectors with correlated NAPI contexts will carry several XDP queues.

This in turn can result in a broken behavior where NAPI context of
interest will never be scheduled and AF_XDP socket will not process any
traffic.

To fix this, let us change the way how XDP rings are assigned to Rx
rings and use this information later on when setting
ice_tx_ring::xsk_pool pointer. For each Rx ring, grab the associated
queue vector and walk through Tx ring's linked list. Once we stumble
upon XDP ring in it, assign this ring to ice_rx_ring::xdp_ring.

Previous [0] approach of fixing this issue was for txonly scenario
because of the described grouping of XDP rings across queue vectors. So,
relying on Rx ring meant that NAPI context could be scheduled with a
queue vector without XDP ring with associated XSK pool.

[0]: https://lore.kernel.org/netdev/20220707161128.54215-1-maciej.fijalkowski@intel.com/

Fixes: 2d4238f556 ("ice: Add support for AF_XDP")
Fixes: 22bf877e52 ("ice: introduce XDP_TX fallback path")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-08-22 08:47:26 -07:00
..
ice.h ice: xsk: use Rx ring's XDP ring when picking NAPI context 2022-08-22 08:47:26 -07:00
ice_adminq_cmd.h ice: add i2c write command 2022-07-21 11:22:45 -07:00
ice_arfs.c ice: arfs: fix use-after-free when freeing @rx_cpu_rmap 2022-04-08 09:08:36 -07:00
ice_arfs.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_base.c ice: rename ice_virtchnl_pf.c to ice_sriov.c 2022-03-14 17:22:58 -07:00
ice_base.h ice: split ice_ring onto Tx/Rx separate structs 2021-10-15 07:39:02 -07:00
ice_cgu_regs.h ice: ensure the hardware Clock Generation Unit is configured 2021-12-21 09:11:40 -08:00
ice_common.c ice: add i2c write command 2022-07-21 11:22:45 -07:00
ice_common.h ice: add i2c write command 2022-07-21 11:22:45 -07:00
ice_controlq.c ice: Cleanup after ice_status removal 2021-12-14 10:19:13 -08:00
ice_controlq.h ice: add support for sideband messages 2021-06-11 07:38:00 -07:00
ice_dcb.c ice: Cleanup after ice_status removal 2021-12-14 10:19:13 -08:00
ice_dcb.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_dcb_lib.c ice: Add hot path support for 802.1Q and 802.1ad VLAN offloads 2022-02-09 09:24:45 -08:00
ice_dcb_lib.h ice: Add infrastructure for mqprio support via ndo_setup_tc 2021-10-20 15:57:54 -07:00
ice_dcb_nl.c ice: Fix problems with DSCP QoS implementation 2021-12-07 13:21:01 -08:00
ice_dcb_nl.h ice: use static inline for dummy functions 2021-06-07 08:59:01 -07:00
ice_devids.h ice: handle E822 generic device ID in PLDM header 2022-07-12 09:25:34 -07:00
ice_devlink.c ice: change devlink code to read NVM in blocks 2022-07-12 09:25:47 -07:00
ice_devlink.h net/ice: Remove unused enum 2021-11-30 08:02:12 -08:00
ice_eswitch.c ice: Introduce enabling promiscuous mode on multiple VF's 2022-07-28 11:44:22 -07:00
ice_eswitch.h ice: allow creating VFs for !CONFIG_NET_SWITCHDEV 2022-04-14 08:19:54 -07:00
ice_ethtool.c Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 2022-07-29 21:26:10 -07:00
ice_ethtool_fdir.c ice: Use correct order for the parameters of devm_kcalloc() 2022-06-08 08:55:13 -07:00
ice_fdir.c ice: Cleanup after ice_status removal 2021-12-14 10:19:13 -08:00
ice_fdir.h ice: Add flow director support for channel mode 2021-12-30 13:16:07 +00:00
ice_flex_pipe.c ice: Add support for PPPoE hardware offload 2022-07-26 10:56:32 -07:00
ice_flex_pipe.h ice: Fix FV offset searching 2022-03-11 08:28:27 -08:00
ice_flex_type.h ice: Support GTP-U and GTP-C offload in switchdev 2022-03-11 08:28:28 -08:00
ice_flow.c ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_flow.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_fltr.c ice: Ignore error message when setting same promiscuous mode 2022-08-17 09:30:44 -07:00
ice_fltr.h ice: Introduce ice_vlan struct 2022-02-09 09:24:45 -08:00
ice_fw_update.c ice: handle E822 generic device ID in PLDM header 2022-07-12 09:25:34 -07:00
ice_fw_update.h ice: support immediate firmware activation via devlink reload 2021-12-15 08:40:38 -08:00
ice_gnss.c ice: add write functionality for GNSS TTY 2022-07-21 13:25:17 -07:00
ice_gnss.h ice: add write functionality for GNSS TTY 2022-07-21 13:25:17 -07:00
ice_hw_autogen.h ice: support crosstimestamping on E822 devices if supported 2021-12-21 09:11:40 -08:00
ice_idc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-12 16:15:30 -07:00
ice_idc_int.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_lag.c ice: Remove unnecessary NULL check before dev_put 2022-06-30 13:53:33 -07:00
ice_lag.h ice: Add initial support framework for LAG 2021-02-08 16:27:01 -08:00
ice_lan_tx_rx.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-10 17:29:56 -08:00
ice_lib.c ice: xsk: use Rx ring's XDP ring when picking NAPI context 2022-08-22 08:47:26 -07:00
ice_lib.h ice: Introduce enabling promiscuous mode on multiple VF's 2022-07-28 11:44:22 -07:00
ice_main.c ice: xsk: use Rx ring's XDP ring when picking NAPI context 2022-08-22 08:47:26 -07:00
ice_nvm.c ice: Fix memory leak in ice_get_orom_civd_data() 2022-04-14 08:31:01 -07:00
ice_nvm.h ice: support immediate firmware activation via devlink reload 2021-12-15 08:40:38 -08:00
ice_osdep.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_pf_vsi_vlan_ops.c ice: Support configuring the device to Double VLAN Mode 2022-02-09 09:24:45 -08:00
ice_pf_vsi_vlan_ops.h ice: Add outer_vlan_ops and VSI specific VLAN ops implementations 2022-02-09 09:24:45 -08:00
ice_protocol_type.h ice: Add support for PPPoE hardware offload 2022-07-26 10:56:32 -07:00
ice_ptp.c ice: implement adjfine with mul_u64_u64_div_u64 2022-07-28 10:54:47 -07:00
ice_ptp.h ice: Fix PTP TX timestamp offset calculation 2022-06-14 09:35:57 -07:00
ice_ptp_consts.h ice: ensure the hardware Clock Generation Unit is configured 2021-12-21 09:11:40 -08:00
ice_ptp_hw.c ice: add TTY for GNSS module for E810T device 2022-03-03 14:11:00 +00:00
ice_ptp_hw.h ice: add TTY for GNSS module for E810T device 2022-03-03 14:11:00 +00:00
ice_repr.c ice: link representors to PCI device 2022-05-06 09:43:01 -07:00
ice_repr.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
ice_sbq_cmd.h ice: add support for sideband messages 2021-06-11 07:38:00 -07:00
ice_sched.c ice: Remove unnecessary casts 2021-12-14 10:19:14 -08:00
ice_sched.h ice: Cleanup after ice_status removal 2021-12-14 10:19:13 -08:00
ice_sriov.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-28 18:21:16 -07:00
ice_sriov.h ice: introduce ice_virtchnl.c and ice_virtchnl.h 2022-03-15 13:23:10 -07:00
ice_switch.c ice: Ignore EEXIST when setting promisc mode 2022-08-17 09:30:23 -07:00
ice_switch.h ice: Introduce enabling promiscuous mode on multiple VF's 2022-07-28 11:44:22 -07:00
ice_tc_lib.c ice: Add support for PPPoE hardware offload 2022-07-26 10:56:32 -07:00
ice_tc_lib.h ice: Add support for PPPoE hardware offload 2022-07-26 10:56:32 -07:00
ice_trace.h ice: add trace events for tx timestamps 2022-03-16 10:38:15 -07:00
ice_txrx.c ice: Fix tunnel checksum offload with fragmented traffic 2022-07-26 13:15:36 -07:00
ice_txrx.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-19 11:23:59 -07:00
ice_txrx_lib.c Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 2022-02-10 11:00:13 +00:00
ice_txrx_lib.h ice: Add hot path support for 802.1Q and 802.1ad VLAN offloads 2022-02-09 09:24:45 -08:00
ice_type.h ice: Introduce enabling promiscuous mode on multiple VF's 2022-07-28 11:44:22 -07:00
ice_vf_lib.c ice: Fix VF not able to send tagged traffic with no VLAN filters 2022-08-17 09:30:44 -07:00
ice_vf_lib.h ice: Fix promiscuous mode not turning off 2022-07-28 11:44:40 -07:00
ice_vf_lib_private.h ice: remove PF pointer from ice_check_vf_init 2022-03-15 13:23:14 -07:00
ice_vf_mbx.c ice: rename ice_sriov.c to ice_vf_mbx.c 2022-03-14 17:22:58 -07:00
ice_vf_mbx.h ice: rename ice_sriov.c to ice_vf_mbx.c 2022-03-14 17:22:58 -07:00
ice_vf_vsi_vlan_ops.c ice: rename ice_virtchnl_pf.c to ice_sriov.c 2022-03-14 17:22:58 -07:00
ice_vf_vsi_vlan_ops.h ice: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 2022-02-09 09:24:45 -08:00
ice_virtchnl.c ice: Fix VF not able to send tagged traffic with no VLAN filters 2022-08-17 09:30:44 -07:00
ice_virtchnl.h ice: introduce ice_virtchnl.c and ice_virtchnl.h 2022-03-15 13:23:10 -07:00
ice_virtchnl_allowlist.c ice: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 2022-02-09 09:24:45 -08:00
ice_virtchnl_allowlist.h ice: Allow ignoring opcodes on specific VF 2021-04-22 09:26:22 -07:00
ice_virtchnl_fdir.c ice: always check VF VSI pointer values 2022-05-05 11:28:36 -07:00
ice_virtchnl_fdir.h ice: introduce ice_vf_lib.c, ice_vf_lib.h, and ice_vf_lib_private.h 2022-03-15 13:22:13 -07:00
ice_vlan.h ice: Use the proto argument for VLAN ops 2022-02-09 09:24:45 -08:00
ice_vlan_mode.c ice: Add support for VLAN TPID filters in switchdev 2022-06-30 13:53:33 -07:00
ice_vlan_mode.h ice: Support configuring the device to Double VLAN Mode 2022-02-09 09:24:45 -08:00
ice_vsi_vlan_lib.c ice: Support configuring the device to Double VLAN Mode 2022-02-09 09:24:45 -08:00
ice_vsi_vlan_lib.h ice: Add outer_vlan_ops and VSI specific VLAN ops implementations 2022-02-09 09:24:45 -08:00
ice_vsi_vlan_ops.c ice: Add outer_vlan_ops and VSI specific VLAN ops implementations 2022-02-09 09:24:45 -08:00
ice_vsi_vlan_ops.h ice: Support configuring the device to Double VLAN Mode 2022-02-09 09:24:45 -08:00
ice_xsk.c ice: xsk: use Rx ring's XDP ring when picking NAPI context 2022-08-22 08:47:26 -07:00
ice_xsk.h ice: remove circular header dependencies on ice.h 2022-03-14 17:22:58 -07:00
Makefile ice: fix access-beyond-end in the switch code 2022-06-02 12:41:10 +02:00