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 5B1FF606A334 for ; Thu, 3 Dec 2026 17:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ar/z21pL Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45A3C402E7; Thu, 3 Dec 2026 18:44:25 +0100 (CET) Received: from mail-dl1-f48.google.com (mail-dl1-f48.google.com [74.125.82.48]) by mails.dpdk.org (Postfix) with ESMTPS id B8D28402A7 for ; Thu, 3 Dec 2026 18:44:23 +0100 (CET) Received: by mail-dl1-f48.google.com with SMTP id a92af1059eb24-1b5d5f0ba39so49500c88.0 for ; Thu, 03 Dec 2026 09:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796319862; x=1796924662; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=4e7OxQtKM+kVa5Vcf7kj1jqWBN6Rt2Q2b+O6BQLVQNU=; b=ar/z21pLpbUV6yUJ84HMiCvMsGXs3Lw2hkiQxQF5WncdU2Yc1+M6DQPAnrl1ws1j03 l7rHp3G6VRNsfFj6zeyDWnIC60WBC6oorBpALOQdN6nBaRRbpmj5RntxB/4opE7YbXSf yRvb6tbO6uiTZKwX4h+IZvmyK7h0JyoB2nOYv1loJNSVXmy8pN7tP0BF+jing4a8yQWo lyAbFsmA1w74W0lPqLSyFxm83kdQMLrCGSMcll7LxhO/xL3pnZEVF8nsvOq2bAPaqIQB 8ZnYPLSthSkAoMwbdPnLBtr45AK2NQMkNWmFfcIiKGity/eoFUd4tcds6MlKj1Hc2joc RhkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796319862; x=1796924662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=4e7OxQtKM+kVa5Vcf7kj1jqWBN6Rt2Q2b+O6BQLVQNU=; b=jXijKDsq690oGHLRQcb+Z1A0FPnBbfLgpqQLk2U/8nQeh4Qu2PUkTP4D+kdXSEhlkS EzyY4EceSqoto51hYqkywUALnhnYToJhNpfDLeDHger6Nvh3ABNdSGech6t7h78Nrh6q kMF+5wE7J9Y9PBB1StTTiZWJjHlPnmy+UgWZKMy1Nji6z+lLuxakcsw4/23MpGpG9HN6 4hI2AqDbNtEHMnQEyJJUoCUFL24/FxL10OkQCUv5lekKkCf0i5cUJ5yv3xDjGTX5LTZf l2I2CtJGwTaZi1oeCD+L1DV/KH9yBd4+C4uwcNZ1aytG5NC1E8d4xHTN0LvW8h9AqBwR 1yyA== X-Gm-Message-State: APuU4Z81bBgS4mqQAijckAV15pSlF1z5nVvtV02LaGeSzfgNBkC7aRYT Kz72J5fZlEk0bwRn1jPkk6SetKJWsV258EBh5NJsZO58rPTOxj6S7HIeDo18ew== X-Gm-Gg: AZFdTZfotiXJej8elp++ePr5u92osgNFgQ3DJaNt+VHfTXZkW90pygRYyscjEZVA8SS P9P+gr+DKfLV2YwZ08BdFGlpQdVilmBcrc8L1LvSV6MuIyB7iVCPsrfdE8fXK6RJmx5vTsYSdlT pLGQbBgvx6eox19+uV2J8KAkS3VYr42kwgDmboFe+Xr7b2eCNwvzjOImcfrq0mPLZFFcT3ZisOF 1Q+Tl+nNplwisML8vOacJrAZGqCSK9lXB0PEbU8hGuJ04IELtWGgPgg5a9wBrdbfHjDOqvD4Kk7 XuFrVBaiwhjbIl6BWPwdzB7UzTNdJFZ82ogOo6rsvs4EgKaVtWXs8SheMfP0s+IXAU41NCjaS5w TqmaSf6e9SgMpn+hUgzfL3oTzlX/U7nCXCi4dCXW+Vj1hS04OwOn1r1rRZ0gHNjVRbHH6ZDfSNT Et3HcBJxLcMT+SxZQJvgcY50QIfmgsp8vD/SU+uVjtaRbUZKevJzoVRyjz6BM5o89j5yZAUmZdJ aaxc6l+8CbrfvhQf15UqqHbbRbkekZrmIbvvwm3lBwseIiDUi9pWiBx6yvfoWxVnazn3io6iC/x MSz89piqjT1RkxPLIwmiSCBWFAnPRc7dhPjWPX2jXDqIT1d8YHXjnH77MQqp+EusSjOaX2vBS+U QAIprQOaOrV2WB8Z3cfYjwNIoQsJJSDXIN++1lNwj5SLX8tUyoaDBdrF+TDo= X-Received: by 2002:a05:701b:290a:b0:1b0:c224:5bdc with SMTP id a92af1059eb24-1b5568808b4mr38565030c88.14.1796319861690; Thu, 03 Dec 2026 09:44:21 -0800 (PST) Received: from mr55p01nt-relayp01.apple.com ([17.199.97.123]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5569bffd2sm96788380c88.0.2026.12.03.09.44.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 09:44:21 -0800 (PST) From: Scott Mitchell To: dev@dpdk.org Cc: stephen@networkplumber.org, thomas@monjalon.net, david.marchand@redhat.com, mb@smartsharesystems.com, Scott Mitchell Subject: [PATCH v4 0/3] net/af_packet: add io_uring Tx acceleration Date: Thu, 3 Dec 2026 09:42:59 -0800 Message-ID: <20261203174302.1418-1-scott.k.mitch1@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261202185420.17858-1-scott.k.mitch1@gmail.com> References: <20261202185420.17858-1-scott.k.mitch1@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 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)