On Tue, 1 Dec 2026 14:44:56 -0800
Scott Mitchell <[email protected]> wrote:

> Hi Stephen,
> 
> RFCv2 is a rebase with tests and fixes. Before going further I'd
> like to settle where this belongs, since the v1 feedback was
> "I would rather it be a different driver than af_packet".
> 
> As far as I can tell the io_uring driver RFC wasn't merged, so I want
> to understand what you'd like to see. The two solve different problems:
> 
> - A TAP-style io_uring driver replaces per-packet read()/write() with
>   io_uring ops.
> - af_packet has no per-packet syscalls; PACKET_MMAP rings carry the
>   data. The only syscall is the sendto() TX notify, and that is all
>   this patch replaces, so the kernel's TX processing runs on an SQPOLL
>   thread instead of the PMD lcore.
> 
> A separate driver would duplicate the PACKET_MMAP ring handling to
> change that one call. The feature is opt-in (tx_io_uring_enabled=0 by
> default) and compiled out without liburing.
> 
> Would you accept it in af_packet in this form? If not, what would you
> want changed, or is there a driver it should be built on instead?

Several items here:
  - yes af_packet and tap are solving different things. So both need to
    stay in DPDK and be as efficient as possible.
  - I never went farther with rtap because it only had small gains over tap
    and virtio was better. Virtio with ring buffer is going to win over 
syscalls.
  - Testing using liburing for pcapng write path and probably other places will
    need it over time.

Put detection in common place:

diff --git a/config/meson.build b/config/meson.build
index bfac1cd93d..8212cb2cb2 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -301,6 +301,12 @@ if (pcap_dep.found() and cc.has_header('pcap.h', 
dependencies: pcap_dep)
     dpdk_extra_ldflags += '-l@0@'.format(pcap_lib)
 endif
 
+# check for liburing
+iouring_dep = dependency('liburing', required: false, method: 'pkg-config')
+if iouring_dep.found()
+    dpdk_conf.set('RTE_HAS_LIBURING', 1)
+endif
+
 # for clang 32-bit compiles we need libatomic for 64-bit atomic ops
 if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
     atomic_dep = cc.find_library('atomic', required: true)

Reply via email to