Skip to content

idpf: add XSk support

Alexander Lobakin bpf intel-wired-lan lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5idpf: add virtchnl functions to manage selected queuesdrivers/net/ethernet/intel/idpf/idpf_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.h drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +1 more+767 -4292 replies
2/5idpf: add XSk pool initializationdrivers/net/ethernet/intel/idpf/Makefile drivers/net/ethernet/intel/idpf/idpf_ethtool.c drivers/net/ethernet/intel/idpf/idpf_txrx.c +5 more+398 -41 reply
3/5idpf: implement XSk xmitdrivers/net/ethernet/intel/idpf/idpf_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.h drivers/net/ethernet/intel/idpf/xdp.c +3 more+354 -211 reply
4/5idpf: implement Rx path for AF_XDPdrivers/net/ethernet/intel/idpf/idpf_lib.c drivers/net/ethernet/intel/idpf/idpf_txrx.c drivers/net/ethernet/intel/idpf/idpf_txrx.h +3 more+405 -211 reply
5/5idpf: enable XSk features and ndo_xsk_wakeupdrivers/net/ethernet/intel/idpf/idpf.h drivers/net/ethernet/intel/idpf/idpf_lib.c drivers/net/ethernet/intel/idpf/idpf_txrx.c +4 more+55 -41 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchRamu R
SeriesT-b
1/5T-b
2/5T-b
3/5T-b
4/5T-b
5/5T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH iwl-next 0/5] idpf: add XSk support

Add support for XSk xmit and receive using libeth_xdp.

This includes adding interfaces to reconfigure/enable/disable only a particular set of queues and support for checksum offload XSk Tx metadata.
libeth_xdp's implementation mostly matches the one of ice: batched allocations and sending, unrolled descriptor writes etc. But unlike other Intel drivers, XSk wakeup is implemented using CSD/IPI instead of HW "software interrupt". In lots of different tests, this yielded way better perf than SW interrupts, but also, this gives better control over which CPU will handle the NAPI loop (SW interrupts are a subject to irqbalance and stuff, while CSDs are strictly pinned 1:1 to the core of the same index).
Note that the header split is always disabled for XSk queues, as for now we see no reasons to have it there.

XSk xmit perf is up to 3x comparing to ice. XSk XDP_PASS is also faster a bunch as it uses system percpu page_pools, so that the only overlead left is memcpy(). The rest is at least comparable.

Alexander Lobakin (3):
idpf: implement XSk xmit
idpf: implement Rx path for AF_XDP
idpf: enable XSk features and ndo_xsk_wakeup

Michal Kubiak (2):
idpf: add virtchnl functions to manage selected queues
idpf: add XSk pool initialization

 drivers/net/ethernet/intel/idpf/Makefile      |    1 +
 drivers/net/ethernet/intel/idpf/idpf.h        |    7 +
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   |   72 +-
 .../net/ethernet/intel/idpf/idpf_virtchnl.h   |   32 +-
 drivers/net/ethernet/intel/idpf/xdp.h         |    3 +
 drivers/net/ethernet/intel/idpf/xsk.h         |   33 +
 .../net/ethernet/intel/idpf/idpf_ethtool.c    |    8 +-
 drivers/net/ethernet/intel/idpf/idpf_lib.c    |   10 +-
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   |  451 ++++++-
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 1160 +++++++++++------
 drivers/net/ethernet/intel/idpf/xdp.c         |   44 +-
 drivers/net/ethernet/intel/idpf/xsk.c         |  633 +++++++++
 12 files changed, 1977 insertions(+), 477 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/idpf/xsk.h
 create mode 100644 drivers/net/ethernet/intel/idpf/xsk.c

---
Apply to either net-next or next-queue, but *before* Pavan's series.

Testing hints:

For testing XSk, you can use basic xdpsock from [0]. There are 3 modes:
rxdrop will check XSk Rx, txonly -- XSk xmit, l2fwd takes care of both. You can run several instances on different queues.
To get the best perf, make sure xdpsock isn't run on the same CPU which is responsible for the corresponding NIC queue handling (official XSk documentation).

[0] https://github.com/xdp-project/bpf-examples/tree/main/AF_XDP-example

Signature · 1 line
2.51.0