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 E4E17606A322 for ; Fri, 4 Dec 2026 16:07:21 +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=DR89QMT2 Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31A4140A76; Fri, 4 Dec 2026 17:07:20 +0100 (CET) Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) by mails.dpdk.org (Postfix) with ESMTPS id D7AD340A6C for ; Fri, 4 Dec 2026 17:07:18 +0100 (CET) Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-3282db206d3so27761eec.0 for ; Fri, 04 Dec 2026 08:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796400437; x=1797005237; 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=mTdtrp5APTs6o7qrALzSZUoT1CXUmK8zgKq5hr8q+h8=; b=DR89QMT2QEVSK7PJhiJrMajDC8H+H2ukjfsT2NgG/JFB9nwz5FJPDWHQOnfCslonpD sgxHkOCt3Dx+daKlxPqznIPrD3sTXiKGGRjmqGIu+Qme4bpYgaNCGEbcunxhzHFxggcT t4wvE1v1rZaRlBbP2+qNnpvo1QmjWMkmanDSNGFjBKibX863hPZ3YVTfqq6XfywPo6GC OLFjut927ntadZf4tcSvb4FYXdN7Uls5rN2qok7yfQo6O+a+50q4ApLAu9N8EKHJksZD AvvEM4eQUz88LR34sULGrazt8EYQK8Y0ilhH0JQAS67WdrktH6v40hfdzANep8nZDDsk +2FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796400437; x=1797005237; 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=mTdtrp5APTs6o7qrALzSZUoT1CXUmK8zgKq5hr8q+h8=; b=tnQH5D8ckwuz9cFoBihkOJTHNvsko8IyzugF5bEHT9XpBqsP8TOIPhwhPI7cS05HP4 Yod0tWAhQJ8nuGOU+DTWCGmm4bajyx8YRTh3t0Ge/z/P4EunfMVg4AYreea7Qbk4PUbK j0CzK7Kdes4txGVcZ1tx34PR4+Cu0owwDqgHnUBFKslCfblsTFHTQhOCgP1u7KXqEoqb 3dmnhAwS/jhj3h1Pm+kgJVove53Y31AeJ7sBwwtTqtwEEctqnQbog3VUpKl3yzibJatY HGmOiybuQDIKTLkzalwubDoAAbNyR/pfVbBNqpj7/t2T+6NSyTeY36p2IM1mlRQ+VABN 408Q== X-Gm-Message-State: AB4q+uFKDOJYKYHmMrVW6B8HuJmr7MmfvtFSvlc1tItgfeQ9adSVKU6C nZMAoJnMpLA1gJYlXQ4zfdXWu87ryghPxKGAaPo/p7w4oOTQ3y3fXolY/Zm2fQ== X-Gm-Gg: AZFdTZfVNygeWDhB/JaG/WSWTReAcduVrmLMRzncaSYZcicHyBgfX9dQWnUTFhpUaTi 2fKpR/s5+5sG4tOVJaaL2QaUZFLYe0OsSS5VIMS1alfQTmX2hcQGxBsoLcMOtmKCKycwPRucpX7 TBDIX2eOWvLvQqsXmMWt8kSk4jxj51BZIXfYO5wwi9HNCyn9dXKKa9iYe1fcez0qxs04zDQtJOk 8jzApNMBdJY90RqNgqp1OQGDUDnPTlheOqwi4gD2U3QDu6FwGsRu2Qh93wSWov3mTEHo5UFU+o1 /YVFdpwU5bMm9vqlT3MNBjXwHJoOVtitQ4/Y8wK8I7Y3WXvN9uLP3I/lKOJYVbmk1W8tphPC2uC I5x5mf0yiTzZV0SknjoTD2bi24S19CbpejaEuMoBXcl+dRPw6UzKzA/TypWwSK9pg9rxkMJoAyj g8gmxl4gF1rqSoXWGMXC22IezeTa0sfjoDJjK31AVChrkrzvc9ZpdIuVHEWVKvY9htbChIqZSye tP9nnHSwyXGzFRDlS6QAo3CmeHtAS/bmrxbhqT6MfR2RehG8sME+nL++PgtKpqzl0XjnclVBioD XLMyBp2ELOYvYuSSJeI9+6xOsqQydxxTREsIMVg055W20scPq1H5IsmEnWIunZCqEqJlEylnq6z tpNQ9itO0IhXtL6dFLEJpDIbpnX6ZaMY= X-Received: by 2002:a05:7301:4307:b0:386:e4ce:7524 with SMTP id 5a478bee46e88-38752199bd4mr2223997eec.36.1796400437070; Fri, 04 Dec 2026 08:07:17 -0800 (PST) Received: from mac.com ([136.24.82.250]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3875224312fsm9334101eec.26.2026.12.04.08.07.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Dec 2026 08:07:16 -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 v5 0/3] net/af_packet: add io_uring Tx acceleration Date: Fri, 4 Dec 2026 08:07:11 -0800 Message-ID: <20261204160714.25381-1-scott.k.mitch1@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261203174302.1418-1-scott.k.mitch1@gmail.com> References: <20261203174302.1418-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=-11.0 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-40265 ("net/af_packet fixes and Tx features") v5: * tx_io_uring_sq_size is removed; the SQ has a fixed size of 1024, since a kick only tells the kernel to scan the ring. (Stephen) * Rebased on v10 of "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 | 356 ++++++++++++++++++++++ config/meson.build | 6 + doc/guides/linux_gsg/sys_reqs.rst | 2 + doc/guides/nics/af_packet.rst | 28 +- 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 | 292 +++++++++++++++++- 7 files changed, 677 insertions(+), 13 deletions(-) -- 2.54.0 (Apple Git-157)