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.
Depends-on: series-40243 ("net/af_packet fixes and Tx features")
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 (2):
config: detect liburing
net/af_packet: add iouring Tx acceleration
app/test/test_pmd_af_packet.c | 391 ++++++++++++++++++++++
config/meson.build | 6 +
doc/guides/nics/af_packet.rst | 24 ++
doc/guides/rel_notes/release_27_03.rst | 1 +
drivers/net/af_packet/meson.build | 7 +
drivers/net/af_packet/rte_eth_af_packet.c | 327 +++++++++++++++++-
6 files changed, 752 insertions(+), 4 deletions(-)
--
2.54.0 (Apple Git-157)