From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F7E3606A31A for ; Wed, 2 Dec 2026 17:16:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=lkRmyu65 Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C994640609; Wed, 2 Dec 2026 18:16:34 +0100 (CET) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTPS id 0E4C9402D5 for ; Wed, 2 Dec 2026 18:16:33 +0100 (CET) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-ccca948203aso9240215a12.3 for ; Wed, 02 Dec 2026 09:16:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796231791; x=1796836591; darn=dpdk.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=nCBE8JKlHLSqqulIthbRl0jOkbZcWsFBtDrMxBZ8hmY=; b=lkRmyu65WGPdsUEZWaV00Zd3KCrmQZJq6dxasGODtXb1753ucfMB0KJvsO+Xf6qqBF d9x5tm2pg5Ds4UEmVO2KljJxRjSfScOGTrZt6/R/IRZqK9FiGaC5d8V7I+bVh9LsQGOv H2bs37UK7bwIyWgLLpqeLmn8jWnfx/vLWjrTEbV4ZpZLWJP5f2XjSTekysIxG3n6w4Cg TXCie8f2UWOCApweynmndnXu8jcloS7A51Tw0KxLbfIooBirJvdjtgf1zTtUsUjPblBQ ARGfLJtnSw45XcA+wqlbc2+epguOmjapifD+6vyvvrCzlTiEOq4Lw1za73RokEt47lSh jv+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796231791; x=1796836591; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nCBE8JKlHLSqqulIthbRl0jOkbZcWsFBtDrMxBZ8hmY=; b=jUHXwAguTT0FKaWUi6quonU0tfxAztanMM/VREHIxoMLHFfJTry5a+wqbG/edtqVZz BmnjHk95QvwHEW+OgnNDA+lX+GJyKpev3+Uh/y7FRttMRKpenQpL/uIhdFXjX97MUn3x yWW5zytz190QfzkK4hFHN8Pp7XsfgoojAcnieLmCDKc+lPEo4oNNqIgYtLyXSVCKEAy0 eub+lvq16sIHnO8saBPbdkYdh725UIDIikCBpYAmky7SOK6dDkhY8VkSaIIli5JqebFl zop7hYlqA7cZeem8GRlLluhEMzBN8Xb+ivMjj+ZrVDUoSNZscpuk/LtRv2f6O8ncpQdw AeEQ== X-Gm-Message-State: APuU4Z/yMJBuhpV9v8QAWM5ZwpFNXTUha5uGMqqf5y2bPYcl6NNqDERG +oe/qC/u/eVZIhHYio89PU4dKMwYn8DvbmGpTLN6C727FKBIlREM0bdKwzHOItLDykk= X-Gm-Gg: AZFdTZeLG8X8UAht4trTnv3VAIJGwdyfB7buYv00p7TLjJ39KVpLeB3u1K9QiuUIXG+ s+xFYWsPI+eE0ulm17MMoikP2ThN5l4x1XnaJJEHYTbiamN4+Qd23AAfAfdLIXFVIe88ZFDhUXm LkCtqqrZshMIdSygyWIa5Hr707hAogmEwvU5WhHAjtixF62YzivWPC97z3Yf3oHUavsMI1fGsqB vLVJuCGtbg0oIkihEiWjVI9xNkJLCA1WhT1RS+qRi3Xk0y0vRSS0H6JLOx06UwYnbb2eqL2Jd0T ou8Xr/nprdvhVrXgP9gkRDg88d9aqsFpfmUz7Q1gjhEJsjlGlaXIt5nPz7UoSR6MCQwy4kVYmt3 FGJ0uMUi88renZdm45P6HLY/3ow1P1WnFsPCPu3SYohNOySjREKCwST+LjeHRj635sk/WAl56AA WuEbDYSY1EedNcLnf6nN8uoN/3UHNH7wn4IN19O373GJDycWv1PT0jME8ohW+oxSl6rVcmM6AW4 dgvRqCejSwN0VKHR+0hcw0xmcGfZpbgmFO83c9STSHG1gfkTQlfbOZCOxF+3VTPmeOVi9cRdlNx 3hgFRPPziMpUiyv88IVxNGuMdgkvMDae1/f5/FdIXfmmih7XBrRju+saXtR/Cwyp0KaooYXa/RC DVLo/gy8r9Y2L6GY= X-Received: by 2002:a05:6a21:a0c:b0:40a:4b8e:b7c6 with SMTP id adf61e73a8af0-40a4b8ec31dmr22224418637.27.1796231791378; Wed, 02 Dec 2026 09:16:31 -0800 (PST) Received: from phoenix.local (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cde6d026d6fsm22402257a12.19.2026.12.02.09.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 09:16:31 -0800 (PST) Date: Wed, 2 Dec 2026 09:16:29 -0800 From: Stephen Hemminger To: Scott Mitchell Cc: dev@dpdk.org Subject: Re: [RFC PATCH v2] net/af_packet: add io_uring TX acceleration Message-ID: <20261202091629.493ffee6@phoenix.local> In-Reply-To: References: <20260204161202.36805-1-scott.k.mitch1@gmail.com> <20261201223626.97745-1-scott.k.mitch1@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, 1 Dec 2026 14:44:56 -0800 Scott Mitchell 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)