Thanks Stephen.

Threads and completions: with sendto(), each Tx burst makes a system
call, and the kernel's packet processing (tpacket_snd() and the stack
below it) runs on the lcore that called it (synchronously, in kernel
context on the DPDK application's thread). SQPOLL removes those system
calls and moves that processing to a kernel thread, which brings
af_packet closer to a hardware PMD: there the NIC does the transmit
work outside the lcore and tx_burst picks up the results
asynchronously. The difference from hardware is that the "NIC" here is
a kernel thread that the kernel creates for the ring, outside EAL, so
DPDK can't place it on an lcore. The kernel thread(s) are the benefit,
and also the reason the proposal is to keep the feature opt-in rather
than enable it automatically: the application has to plan for their
extra busy CPU(s).

Configuration: the SQPOLL thread(s) are why some options stay. Only
tx_io_uring_enabled=1 is needed; the rest are tuning with working
defaults:
- tx_io_uring_q_cpu: keep the thread off the lcores' CPUs. With
real-time lcores, an unpinned SQPOLL thread can be starved and Tx
stalls.
- tx_io_uring_threads: cap how many CPUs the threads take, by sharing
them across queues.
- tx_io_uring_sq_thread_idle: trade wakeup latency for idle CPU.

v5 removes tx_io_uring_sq_size and uses a fixed size: a kick only
tells the kernel to scan the ring, so the SQ just has to absorb short
SQPOLL thread stalls.

Reply via email to