ice: use the queue pair's XDP ring in ice_qp_{dis, ena}()
Since commit 9ead7e74bfd6 ("ice: xsk: use Rx ring's XDP ring when picking
NAPI context"), an Rx ring uses the XDP ring that is first on its queue
vector's Tx ring list, both for XDP_TX and for AF_XDP zero-copy Tx. With
fewer queue vectors than CPUs, a vector carries several XDP rings, so Rx
ring N then does not use XDP ring N. ice_qp_dis(), ice_qp_ena() and the
ring cleaning and stats reset they call still operate on
vsi->xdp_rings[q_idx].
As a result, a zero-copy pool is attached to and detached from an XDP ring
that is never stopped, cleaned or reconfigured. At the same time, another
XDP ring is stopped and cleaned, possibly while it is in use from another
queue vector whose NAPI context keeps running.
With 4 channels on a machine with 8 CPUs, for example, queue vector 0
carries XDP rings 0 and 1, and Rx ring 0 uses XDP ring 1. Disabling queue
pair 1 then disables the NAPI context of vector 1, but stops and cleans
XDP ring 1, which vector 0 is still using.
Use rx_rings[q_idx]->xdp_ring, the ring that ice_tx_xsk_pool() assigns
the pool to, in all of these places. ice_vsi_cfg_single_txq() checks
its index against the number of LAN Tx queues, which an XDP ring index
can exceed, so configure that ring with ice_vsi_cfg_txq() directly.
Fixes: 9ead7e74bfd6 ("ice: xsk: use Rx ring's XDP ring when picking NAPI context")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
1 file changed