diff options
| author | Maciej Fijalkowski <[email protected]> | 2021-08-19 11:59:59 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2021-10-15 14:39:02 +0000 |
| commit | 0bb4f9ecadd463db28d8b1820bb1bcb96af009d2 (patch) | |
| tree | c41862877d8070fdb01ad81a7ee42854fce322ad /drivers/net/ethernet/intel/ice/ice_txrx_lib.c | |
| parent | ice: split ice_ring onto Tx/Rx separate structs (diff) | |
| download | kernel-0bb4f9ecadd463db28d8b1820bb1bcb96af009d2.tar.gz kernel-0bb4f9ecadd463db28d8b1820bb1bcb96af009d2.zip | |
ice: unify xdp_rings accesses
There has been a long lasting issue of improper xdp_rings indexing for
XDP_TX and XDP_REDIRECT actions. Given that currently rx_ring->q_index
is mixed with smp_processor_id(), there could be a situation where Tx
descriptors are produced onto XDP Tx ring, but tail is never bumped -
for example pin a particular queue id to non-matching IRQ line.
Address this problem by ignoring the user ring count setting and always
initialize the xdp_rings array to be of num_possible_cpus() size. Then,
always use the smp_processor_id() as an index to xdp_rings array. This
provides serialization as at given time only a single softirq can run on
a particular CPU.
Signed-off-by: Maciej Fijalkowski <[email protected]>
Tested-by: George Kuruvinakunnel <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx_lib.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c index d6d71f82142f..bc64610df7cb 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c @@ -297,7 +297,7 @@ void ice_finalize_xdp_rx(struct ice_rx_ring *rx_ring, unsigned int xdp_res) if (xdp_res & ICE_XDP_TX) { struct ice_tx_ring *xdp_ring = - rx_ring->vsi->xdp_rings[rx_ring->q_index]; + rx_ring->vsi->xdp_rings[smp_processor_id()]; ice_xdp_ring_update_tail(xdp_ring); } |
