All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Mitchell <scott.k.mitch1@gmail.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org, thomas@monjalon.net,
	david.marchand@redhat.com, mb@smartsharesystems.com,
	Scott Mitchell <scott.k.mitch1@gmail.com>
Subject: [PATCH v4 0/3] net/af_packet: add io_uring Tx acceleration
Date: Thu,  3 Dec 2026 09:42:59 -0800	[thread overview]
Message-ID: <20261203174302.1418-1-scott.k.mitch1@gmail.com> (raw)
In-Reply-To: <20261202185420.17858-1-scott.k.mitch1@gmail.com>

Kick the af_packet Tx ring through an io_uring SQPOLL thread instead of
sendto(), so the kernel's Tx processing runs on a kernel thread rather
than the PMD lcore. Patch 1 adds common liburing detection, patch 2 uses
it in af_packet, and patch 3 adds tests.

Depends-on: series-40254 ("net/af_packet fixes and Tx features")

v4:
* Tests are split into their own patch and check only what the driver
  does; they no longer look at /proc for SQPOLL threads or fds. (Stephen)
* Queue q % tx_io_uring_threads leads each shared SQPOLL thread; the
  shared ring array and its allocation are gone. (Stephen)
* ATTACH_WQ failure, and io_uring devargs the port can't honor, fail
  probe. (Stephen)
* Failed kicks are counted as Tx errors. (Stephen)
* tx_io_uring_wq_num is renamed tx_io_uring_threads. (Stephen)
* IORING_SETUP_SINGLE_ISSUER is dropped; the SQ size is kept in the
  queue; the io_uring members follow the Tx stats; tx_io_uring_q_cpu
  values are no longer on the stack; parameter logs are DEBUG and only
  when enabled. (Stephen)
* io_uring_unregister_files() stays before io_uring_queue_exit(): ring
  exit is asynchronous, so the sockets would outlive close and their
  fanout group would block the next port on the interface.
* Docs: SQPOLL CPU cost, XPS, Tx error counting; liburing is listed
  with the optional libraries. (Stephen)
* The throughput claim is dropped from the commit message. (Stephen)
* The subjects keep "io_uring", so check-git-log warns about the
  underscore.

v3:
* No longer an RFC: io_uring stays in af_packet. (Stephen)
* New patch 1/2 detects liburing (>= 2.4) in config/meson.build and sets
  RTE_HAS_LIBURING. (Stephen)
* Probe fails if tx_io_uring_enabled is set and io_uring can't be set
  up, instead of falling back to sendto(). (Stephen)
* io_uring devargs are passed in one struct; __rte_unused replaces
  RTE_SET_USED(); shared_uring_rings needs no #ifdef; shorter logs.
  (Stephen)
* A kick that finds the submission queue full falls back to sendto()
  instead of being dropped.
* Probe fails if the kernel lacks IORING_OP_SEND (Linux 5.6), and
  IOSQE_CQE_SKIP_SUCCESS is used only where supported (5.17); before,
  every kick failed on older kernels and Tx stalled.
* The kick runs on every non-empty burst; sendto() error accounting is
  unchanged.
* Docs: tx_io_uring_q_cpu indexing with tx_io_uring_wq_num,
  sq_thread_idle=0, and Tx queue selection by the SQPOLL thread CPU.
* Tests skip when io_uring SQPOLL is unavailable, check that the SQPOLL
  thread exists, wait long enough for it to sleep at HZ=100, and require
  stable thread counts; a new test checks that probe fails cleanly.

Scott Mitchell (3):
  config: detect liburing
  net/af_packet: add io_uring Tx acceleration
  test/af_packet: add io_uring Tx tests

 app/test/test_pmd_af_packet.c             | 357 ++++++++++++++++++++++
 config/meson.build                        |   6 +
 doc/guides/linux_gsg/sys_reqs.rst         |   2 +
 doc/guides/nics/af_packet.rst             |  30 +-
 doc/guides/rel_notes/release_27_03.rst    |   1 +
 drivers/net/af_packet/meson.build         |   5 +
 drivers/net/af_packet/rte_eth_af_packet.c | 310 ++++++++++++++++++-
 7 files changed, 698 insertions(+), 13 deletions(-)

-- 
2.54.0 (Apple Git-157)


  parent reply	other threads:[~2026-12-03 17:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 16:12 [RFC v1] net/af_packet: add io_uring TX acceleration scott.k.mitch1
2026-02-04 16:52 ` Stephen Hemminger
2026-02-05  0:08   ` Scott Mitchell
2026-12-01 22:36 ` [RFC PATCH v2] " Scott Mitchell
2026-12-01 22:44   ` Scott Mitchell
2026-12-02 17:16     ` Stephen Hemminger
2026-12-02 18:52       ` Scott Mitchell
2026-12-02 18:54   ` [PATCH v3 0/2] net/af_packet: add io_uring Tx acceleration Scott Mitchell
2026-12-02 18:54     ` [PATCH v3 1/2] config: detect liburing Scott Mitchell
2026-12-02 18:54     ` [PATCH v3 2/2] net/af_packet: add iouring Tx acceleration Scott Mitchell
2026-12-02 23:43       ` Stephen Hemminger
2026-12-03  0:00     ` [PATCH v3 0/2] net/af_packet: add io_uring " Stephen Hemminger
2026-12-03  0:52       ` Scott Mitchell
2026-12-03 17:42     ` Scott Mitchell [this message]
2026-12-03 17:43       ` [PATCH v4 1/3] config: detect liburing Scott Mitchell
2026-12-03 17:43       ` [PATCH v4 2/3] net/af_packet: add io_uring Tx acceleration Scott Mitchell
2026-12-03 18:10         ` Stephen Hemminger
2026-12-03 19:20           ` Scott Mitchell
2026-12-03 17:43       ` [PATCH v4 3/3] test/af_packet: add io_uring Tx tests Scott Mitchell
2026-12-04 16:07       ` [PATCH v5 0/3] net/af_packet: add io_uring Tx acceleration Scott Mitchell
2026-12-04 16:07         ` [PATCH v5 1/3] config: detect liburing Scott Mitchell
2026-12-04 16:07         ` [PATCH v5 2/3] net/af_packet: add io_uring Tx acceleration Scott Mitchell
2026-12-04 20:22           ` Stephen Hemminger
2026-12-04 16:07         ` [PATCH v5 3/3] test/af_packet: add io_uring Tx tests Scott Mitchell
2026-12-02 16:59 ` [RFC v1] net/af_packet: add io_uring TX acceleration Stephen Hemminger
2026-12-02 17:02 ` Stephen Hemminger
2026-12-02 17:03 ` Stephen Hemminger
2026-12-02 17:04 ` Stephen Hemminger

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=20261203174302.1418-1-scott.k.mitch1@gmail.com \
    --to=scott.k.mitch1@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.