From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>,
Michal Kubiak <michal.kubiak@intel.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Simon Horman <horms@kernel.org>,
nxne.cnse.osdt.itp.upstreaming@intel.com, bpf@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH iwl-next 0/5] idpf: add XSk support
Date: Thu, 11 Sep 2025 18:22:28 +0200 [thread overview]
Message-ID: <20250911162233.1238034-1-aleksander.lobakin@intel.com> (raw)
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
--
2.51.0
next reply other threads:[~2025-09-11 16:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 16:22 Alexander Lobakin [this message]
2025-09-11 16:22 ` [PATCH iwl-next 1/5] idpf: add virtchnl functions to manage selected queues Alexander Lobakin
2025-09-16 11:22 ` [External] : " ALOK TIWARI
[not found] ` <PH0PR11MB5013B3080461D0FC356662C4961DA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 5:08 ` [Intel-wired-lan] " R, Ramu
2025-09-11 16:22 ` [PATCH iwl-next 2/5] idpf: add XSk pool initialization Alexander Lobakin
[not found] ` <PH0PR11MB50136480A130C818932FE6DB961CA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 10:43 ` [Intel-wired-lan] " R, Ramu
2025-09-11 16:22 ` [PATCH iwl-next 3/5] idpf: implement XSk xmit Alexander Lobakin
[not found] ` <PH0PR11MB501396D4B46250A8D3D88869961DA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 5:49 ` [Intel-wired-lan] " R, Ramu
2025-09-11 16:22 ` [PATCH iwl-next 4/5] idpf: implement Rx path for AF_XDP Alexander Lobakin
[not found] ` <PH0PR11MB50137497947DE469E760CD40961DA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 5:51 ` [Intel-wired-lan] " R, Ramu
2025-09-11 16:22 ` [PATCH iwl-next 5/5] idpf: enable XSk features and ndo_xsk_wakeup Alexander Lobakin
[not found] ` <PH0PR11MB5013765265A0F4D41210A437961DA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 4:54 ` [Intel-wired-lan] " R, Ramu
[not found] ` <PH0PR11MB5013A6FDC4F3DF3FA1D338C9961DA@PH0PR11MB5013.namprd11.prod.outlook.com>
2025-09-24 5:01 ` [Intel-wired-lan] [PATCH iwl-next 0/5] idpf: add XSk support R, Ramu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250911162233.1238034-1-aleksander.lobakin@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=nxne.cnse.osdt.itp.upstreaming@intel.com \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox