[PATCH net-next 00/16] idpf: add XDP support

Alexander Lobakin
2025-03-05T16:22:14Z

Add XDP support (w/o XSk yet) to the idpf driver using the libeth_xdp
sublib, which will be then reused in at least iavf and ice.

In general, nothing outstanding comparing to ice, except performance --
let's say, up to 2x for .ndo_xdp_xmit() on certain platforms and
scenarios. libeth_xdp doesn't reinvent the wheel, mostly just
accumulates and optimizes what was already done before to stop copying
that wheel and the bugs over and over again.
idpf doesn't support VLAN Rx offload, so only the hash hint is present
for now.

Alexander Lobakin (12):
libeth: convert to netmem
libeth: support native XDP and register memory model
libeth: add a couple of XDP helpers (libeth_xdp)
libeth: add XSk helpers
idpf: fix Rx descriptor ready check barrier in splitq
idpf: a use saner limit for default number of queues to allocate
idpf: link NAPIs to queues
idpf: add support for nointerrupt queues
idpf: use generic functions to build xdp_buff and skb
idpf: add support for XDP on Rx
idpf: add support for .ndo_xdp_xmit()
idpf: add XDP RSS hash hint

Michal Kubiak (4):
idpf: make complq cleaning dependent on scheduling mode
idpf: remove SW marker handling from NAPI
idpf: prepare structures to support XDP
idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq

drivers/net/ethernet/intel/idpf/Kconfig | 2 +-
drivers/net/ethernet/intel/libeth/Kconfig | 10 +-
drivers/net/ethernet/intel/idpf/Makefile | 2 +
drivers/net/ethernet/intel/libeth/Makefile | 8 +-
include/net/libeth/types.h | 106 +-
drivers/net/ethernet/intel/idpf/idpf.h | 35 +-
.../net/ethernet/intel/idpf/idpf_lan_txrx.h | 6 +-
drivers/net/ethernet/intel/idpf/idpf_txrx.h | 126 +-
drivers/net/ethernet/intel/idpf/xdp.h | 180 ++
drivers/net/ethernet/intel/libeth/priv.h | 37 +
include/net/libeth/rx.h | 28 +-
include/net/libeth/tx.h | 36 +-
include/net/libeth/xdp.h | 1869 +++++++++++++++++
include/net/libeth/xsk.h | 685 ++++++
drivers/net/ethernet/intel/iavf/iavf_txrx.c | 14 +-
drivers/net/ethernet/intel/idpf/idpf_dev.c | 11 +-
.../net/ethernet/intel/idpf/idpf_ethtool.c | 6 +-
drivers/net/ethernet/intel/idpf/idpf_lib.c | 29 +-
drivers/net/ethernet/intel/idpf/idpf_main.c | 1 +
.../ethernet/intel/idpf/idpf_singleq_txrx.c | 111 +-
drivers/net/ethernet/intel/idpf/idpf_txrx.c | 678 +++---
drivers/net/ethernet/intel/idpf/idpf_vf_dev.c | 11 +-
.../net/ethernet/intel/idpf/idpf_virtchnl.c | 113 +-
drivers/net/ethernet/intel/idpf/xdp.c | 509 +++++
drivers/net/ethernet/intel/libeth/rx.c | 40 +-
drivers/net/ethernet/intel/libeth/tx.c | 41 +
drivers/net/ethernet/intel/libeth/xdp.c | 449 ++++
drivers/net/ethernet/intel/libeth/xsk.c | 269 +++
28 files changed, 4925 insertions(+), 487 deletions(-)
create mode 100644 drivers/net/ethernet/intel/idpf/xdp.h
create mode 100644 drivers/net/ethernet/intel/libeth/priv.h
create mode 100644 include/net/libeth/xdp.h
create mode 100644 include/net/libeth/xsk.h
create mode 100644 drivers/net/ethernet/intel/idpf/xdp.c
create mode 100644 drivers/net/ethernet/intel/libeth/tx.c
create mode 100644 drivers/net/ethernet/intel/libeth/xdp.c
create mode 100644 drivers/net/ethernet/intel/libeth/xsk.c

---
Sending in one batch to introduce/show both the lib and the user.
Let me know if I'd better split.
--
2.48.1