Thread (20 messages) 20 messages, 4 authors, 2021-09-22

RE: [Intel-wired-lan] [PATCH v7 intel-next 4/9] ice: unify xdp_rings accesses

From: Kuruvinakunnel, George <hidden>
Date: 2021-09-03 06:37:40
Also in: bpf, intel-wired-lan

From: Intel-wired-lan <redacted> On Behalf Of Maciej
Fijalkowski
Sent: Thursday, August 19, 2021 5:30 PM
To: intel-wired-lan@lists.osuosl.org
Cc: joamaki@gmail.com; Lobakin, Alexandr <redacted>;
netdev@vger.kernel.org; toke@redhat.com; bjorn@kernel.org; kuba@kernel.org;
bpf@vger.kernel.org; davem@davemloft.net; Karlsson, Magnus
[off-list ref]
Subject: [Intel-wired-lan] [PATCH v7 intel-next 4/9] 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 <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_lib.c      | 2 +-
 drivers/net/ethernet/intel/ice/ice_main.c     | 2 +-
 drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Tested-by: George Kuruvinakunnel <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help