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 E37F9606A322 for ; Thu, 3 Dec 2026 16:43:33 +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=Ue7Z1CHx Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 269DB402E7; Thu, 3 Dec 2026 17:43:32 +0100 (CET) Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175]) by mails.dpdk.org (Postfix) with ESMTPS id 77E9040291 for ; Thu, 3 Dec 2026 17:43:31 +0100 (CET) Received: by mail-dy1-f175.google.com with SMTP id 5a478bee46e88-38190551625so26578165eec.1 for ; Thu, 03 Dec 2026 08:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796316210; x=1796921010; 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=pPS3rkj5UJxeMsRcFF/xraIb0BCUn2npGlwcQoEN4ng=; b=Ue7Z1CHxiuV7pSxV9BGJIGPDwFZy4ScTBJGNLHwfbD22hrptK8CcVWomHf2qSLaJdi 1iXSnDv8KRyV6XOfJK2FosuPfVcaxABwCw1WTGSKKl5g1YFQTYhh8F5DG4ucDVtew7wx +ZxfvooUTGb5dmY7p6h6LaIP3YUZWuEklCnoX+ucCBknE1xRtaPWRoDAF/GXaLhM1glH mP/u0qeDBnouFbbIQ06tU98b1mqycYKMyVm9I+4ctAo87CgXlPLViYCnNv0L3yVJDs14 uSDGdfW3jHA0xvF4G0kKVVTSP/r7MF7iue7NzPrJ5fUAx9m6pMZeYnPtDaClyRnSegkN Sp7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796316210; x=1796921010; 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=pPS3rkj5UJxeMsRcFF/xraIb0BCUn2npGlwcQoEN4ng=; b=UT8a5EKJvVA/qHB4RQT9O9mm8iDDm3pFCuTOSo3OWmqIc5h+RwlARl0rbZ9SzCIeRF bfWcI6i7SEOPD7zPaMLOalMY9Q/EAxA1s9gIsCerpgDSKP03K6xXBV772N75ksENBfSH nn5Vj2/ZDdIklQ1gDeKu4UZmRN99S35JejP4jjAe5Jucg2FEbFfu1q6BvBsF76bbBXWB qmtqr3bqUMwJO4+dj6yWUuqi+fga2e7X93xqiCOtWDUqyk8QumzNRQmc4/9KdEu/MLlN IV+NxeEz8mi1dAjGuYXAu2vf03DSfG+zQXpnO6nswTv8LNiLVh2qHLREelRvwElHUNlO yLOw== X-Gm-Message-State: APuU4Z+C/C81NBVLFcSTyVoOPsjKMG/MEe5yA2PizCklFu8mfrehzz21 7UwG//PPQToJ9zob7WgWTDZG915Z1VifNUAg0xnttW4f0KU1xgXFLI3uyEtNIw== X-Gm-Gg: AZFdTZebLLw4M83JWPoDJUJ/psYSPIUi0sRmlWEnYlA2j7ZJbDb43nNw3Lu9xR6BeEj I9+yIfNaTN44uZw6lViEqeGUhF3MufsI3g2WNEUPF5UkrpEw9/kzchEG27R5BXSyRnAnwAaDhZ2 F/acwYBrOdNAOMll7G6CEhon/ym5EI+jxZ+Nf26UUvoAuW9iBT7JwQhPZEhpq+Kw63Z6poQQzWB 4ZI0iBOIls+gNqIOwP0jEMqIKFWIpp+4z5XtUoK2uIJNBh2pPwgb92DAf7Cv5BHQIeFzrm9nHGn HwoqNoCs5NfE2RCnLcNRDE2d0ElUXvz8GSAKCBaqcqM6FVXkrlGuUHkf9Z/Wl0FzhLZeDY4FM6o 34IQgFEcuqKCU498ZRG8wBS9z4KaYLtRzW71tYs1e5eFJ5lqBLhj9O4jmqEsGADOd90PHFqJNut hMizaVEf79AsqOUa1CJx9PZndiwCNKhEHXq3DhfNXbx2MSoShkUbYWwA3LXKhaFE+pQvE4bHTsu mM7FKK7WCXberorrF7EYRlLfS/BqiVCXF2GV6mSIt20PnrnOQR8bcNr8N/O8lnHAiJ3IExe5p0W GhtZ+JYVtbDRedqLHjL6O10mMmgKNn5CWJ8i/5rmoND6dtgJjjTpsyiT7BLM7AumchvqbnkDq9v B4bXGHvqDYKunPX5lScjUUkZue6kis5En8d2gQAKi7GraxXO07fj+vNWW8SrP X-Received: by 2002:a05:7300:d508:b0:387:3f07:4869 with SMTP id 5a478bee46e88-3873f075a3dmr4682829eec.37.1796316209656; Thu, 03 Dec 2026 08:43:29 -0800 (PST) Received: from mr55p01nt-relayp03.apple.com ([17.199.97.123]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-385677c0c1dsm146280665eec.21.2026.12.03.08.43.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 08:43:29 -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 v9 0/8] net/af_packet fixes and Tx features Date: Thu, 3 Dec 2026 08:42:03 -0800 Message-ID: <20261203164211.48531-1-scott.k.mitch1@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261202171804.50287-1-scott.k.mitch1@gmail.com> References: <20261202171804.50287-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 Fixes for af_packet ring handling, then Tx features: non-blocking Tx and software checksum offload. Patches 1-3 are fixes for stable, and 4 tests them. 5-8 are not for stable. v9: * tp_status helpers cast to (uint32_t __rte_atomic *). (Stephen) * The invalid ring parameter error prints blocksz, framesz and framecnt instead of describing the constraints; af_packet.rst documents them, including the 2GB blocksz limit. (Stephen) v8: * Split as suggested: the memory ordering and frame address fixes are separate stable patches; the test, ring parameter validation and Tx cleanup are their own patches. Dropped unrelated changes from the fixes (counter types, loop form). * tp_status uses rte_atomic_load/store_explicit with acquire/release instead of fences, as libpcap and memif do. (Stephen) * New fix: the maximum Rx packet length and MTU used the Tx frame offset, so packets up to 34 bytes over the real limit were silently truncated. * Invalid ring parameters are rejected at probe, matching what packet_set_ring() rejects, instead of logged as warnings; the hint warnings are gone, so configurations the kernel accepts still work. (Stephen) * The Tx kick runs on every burst, so a full ring drains on later bursts once the kernel can send again. The ring full test now checks this. (Stephen) * Removed poll() from Tx instead of adding the txpollnotrdy devarg. A full ring returns a short count, so Tx no longer blocks. (Stephen) * Checksums are computed in the ring frame after the copy, so the checksum code does not modify the mbuf. Dropped rte_net_ip_udptcp_cksum_mbuf() and the tap conversion, and with them the dependency on "test/cksum: fix EtherType of IPv6 TCP packet". (Stephen, Morten) IPv6 extension headers are supported; packets with tunnel offload flags are dropped. * Tests use ring geometry derived from the page size. Scott Mitchell (8): net/af_packet: fix frame status memory ordering net/af_packet: fix frame address with unused block tail net/af_packet: fix maximum Rx packet length test/af_packet: add frame layout tests net/af_packet: reject invalid ring parameters at probe net/af_packet: clean up Tx and bulk free mbufs net/af_packet: do not block in Tx when the ring is full net/af_packet: add Tx checksum offload app/test/test_pmd_af_packet.c | 1029 +++++++++++++++++++++ doc/guides/nics/af_packet.rst | 8 +- doc/guides/nics/features/af_packet.ini | 2 + doc/guides/rel_notes/release_27_03.rst | 4 + drivers/net/af_packet/rte_eth_af_packet.c | 244 +++-- 5 files changed, 1211 insertions(+), 76 deletions(-) -- 2.54.0 (Apple Git-157)