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

RE: [Intel-wired-lan] [PATCH v7 intel-next 6/9] ice: propagate xdp_ring onto rx_ring

From: Kuruvinakunnel, George <hidden>
Date: 2021-09-03 06:45:43
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 6/9] ice: propagate xdp_ring onto
rx_ring

With rings being split, it is now convenient to introduce a pointer to XDP ring within
the Rx ring. For XDP_TX workloads this means that xdp_rings array access will be
skipped, which was executed per each processed frame.

Also, read the XDP prog once per NAPI and if prog is present, set up the local
xdp_ring pointer. Reading prog a single time was discussed in [1] with some
concern raised by Toke around dispatcher handling and having the need for going
through the RCU grace period in the ndo_bpf driver callback, but ice currently is
torning down NAPI instances regardless of the prog presence on VSI.

Although the pointer to XDP ring introduced to Rx ring makes things a lot
slimmer/simpler, I still feel that single prog read per NAPI lifetime is beneficial.

Further patch that will introduce the fallback path will also get a profit from that as
xdp_ring pointer will be set during the XDP rings setup.

[1]: https://lore.kernel.org/bpf/87k0oseo6e.fsf@toke.dk/ (local)

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_main.c     |  3 +++
 drivers/net/ethernet/intel/ice/ice_txrx.c     | 23 +++++++++--------
 drivers/net/ethernet/intel/ice/ice_txrx.h     |  1 +
 drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 10 +++-----
drivers/net/ethernet/intel/ice/ice_txrx_lib.h |  2 +-
 drivers/net/ethernet/intel/ice/ice_xsk.c      | 25 +++++++++++--------
 6 files changed, 35 insertions(+), 29 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