linux/drivers/net/ethernet/intel
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
..
e1000 net: add skb_[inner_]tcp_all_headers helpers 2022-07-02 16:22:25 +01:00
e1000e e1000e: convert .adjfreq to .adjfine 2022-07-28 10:57:06 -07:00
fm10k intel/fm10k:fix repeated words in comments 2022-06-30 10:56:01 -07:00
i40e i40e: Fix to stop tx_timeout recovery if GLOBR fails 2022-08-16 08:54:37 -07:00
iavf iavf: Fix deadlock in initialization 2022-08-12 08:23:01 -07:00
ice ice: xsk: use Rx ring's XDP ring when picking NAPI context 2022-08-22 08:47:26 -07:00
igb igb: Add lock to avoid data race 2022-08-18 11:03:26 -07:00
igbvf intel/igbvf:fix repeated words in comments 2022-06-30 11:04:14 -07:00
igc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-07-21 13:03:39 -07:00
ixgb net: add skb_[inner_]tcp_all_headers helpers 2022-07-02 16:22:25 +01:00
ixgbe ixgbe: convert .adjfreq to .adjfine 2022-07-28 11:02:02 -07:00
ixgbevf intel/ixgbevf:fix repeated words in comments 2022-06-30 11:08:45 -07:00
e100.c intel: remove unused macros 2022-06-30 09:40:55 -07:00
Kconfig
Makefile