linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iwl-next v2 00/12] idpf: add XDP support
@ 2025-06-24 16:45 Alexander Lobakin
  2025-06-24 16:45 ` [PATCH iwl-next v2 01/12] idpf: fix Rx descriptor ready check barrier in splitq Alexander Lobakin
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Alexander Lobakin @ 2025-06-24 16:45 UTC (permalink / raw)
  To: intel-wired-lan
  Cc: Alexander Lobakin, Michal Kubiak, Maciej Fijalkowski, Tony Nguyen,
	Przemek Kitszel, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Alexei Starovoitov, Daniel Borkmann,
	Simon Horman, nxne.cnse.osdt.itp.upstreaming, bpf, netdev,
	linux-kernel

Add XDP support (w/o XSk for now) to the idpf driver using the libeth_xdp
sublib. All possible verdicts, .ndo_xdp_xmit(), multi-buffer etc. are here.
In general, nothing outstanding comparing to ice, except performance --
let's say, up to 2x for .ndo_xdp_xmit() on certain platforms and
scenarios.
idpf doesn't support VLAN Rx offload, so only the hash hint is
available for now.

Patches 1-6 are prereqs, without which XDP would either not work at all or
work slower/worse/...

Alexander Lobakin (8):
  idpf: fix Rx descriptor ready check barrier in splitq
  idpf: use a 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: add 4-byte completion descriptor definition
  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/idpf/Makefile      |   2 +
 drivers/net/ethernet/intel/idpf/idpf.h        |  31 +-
 .../net/ethernet/intel/idpf/idpf_lan_txrx.h   |   6 +-
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   | 129 +++--
 drivers/net/ethernet/intel/idpf/xdp.h         | 172 +++++++
 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    |  31 +-
 drivers/net/ethernet/intel/idpf/idpf_main.c   |   1 +
 .../ethernet/intel/idpf/idpf_singleq_txrx.c   | 110 ++---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   | 427 +++++++++--------
 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         | 452 ++++++++++++++++++
 15 files changed, 1138 insertions(+), 366 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/idpf/xdp.h
 create mode 100644 drivers/net/ethernet/intel/idpf/xdp.c

---
Sending to get reviews and to trigger Intel's validation.

From v1[0]:
* drop the libeth_xdp part (submitted separately and accepted);
* fix some typos and kdocs (Jakub, Maciej);
* pick a couple RBs (Maciej);
* 03: create a convenience helper (Maciej), fix rtnl assertion fail;
* 04: since XDP uses its own queue cleaning routines, don't add 4-byte
      completion support to the skb code;
* 05: don't use old weird logic with negative descriptor index (Maciej);
* 06: fix invalid interrupt vector counting in certain cases;
* 07: fix cleanup timer is fired after the queue buffers are already freed;
* 08: fix XDP program removal in corner cases such as PCI reset or
      remove request when there's no active prog (from netdev_unregister());
* 10: fix rare queue stuck -- HW requires to always have at least one free Tx
      descriptor on the queue, otherwise it thinks the queue is empty and
      there's nothing to send (true Intel HW veteran bug).

Testing hints: basic Rx and Tx (TCP, UDP, VLAN, HW GRO on/off, trafficgen
stress tests, performance comparison); xdp-tools with all possible actions
(xdp-bench for PASS, DROP, TX, REDIRECT to cpumap, devmap (inc self-redirect);
xdp-trafficgen to double-check XDP xmit). Would be nice to see a perf
comparison against ice (in percent) (idpf must be plugged into a PCIe 5.x).

[0] https://lore.kernel.org/intel-wired-lan/20250305162132.1106080-1-aleksander.lobakin@intel.com
-- 
2.49.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-08-01 14:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-24 16:45 [PATCH iwl-next v2 00/12] idpf: add XDP support Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 01/12] idpf: fix Rx descriptor ready check barrier in splitq Alexander Lobakin
     [not found]   ` <PH0PR11MB5013936858D20BB0AB3BD607965AA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-08-01 14:58     ` [Intel-wired-lan] " R, Ramu
2025-06-24 16:45 ` [PATCH iwl-next v2 02/12] idpf: use a saner limit for default number of queues to allocate Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 03/12] idpf: link NAPIs to queues Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 04/12] idpf: add 4-byte completion descriptor definition Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 05/12] idpf: remove SW marker handling from NAPI Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 06/12] idpf: add support for nointerrupt queues Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 07/12] idpf: prepare structures to support XDP Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 08/12] idpf: implement XDP_SETUP_PROG in ndo_bpf for splitq Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 09/12] idpf: use generic functions to build xdp_buff and skb Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 10/12] idpf: add support for XDP on Rx Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 11/12] idpf: add support for .ndo_xdp_xmit() Alexander Lobakin
2025-06-24 16:45 ` [PATCH iwl-next v2 12/12] idpf: add XDP RSS hash hint Alexander Lobakin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).