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 104F3606A337 for ; Fri, 4 Dec 2026 16:01:36 +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=ZtXZBgr3 Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B7AC402E1; Fri, 4 Dec 2026 17:01:34 +0100 (CET) Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) by mails.dpdk.org (Postfix) with ESMTPS id EAAE3402DF for ; Fri, 4 Dec 2026 17:01:33 +0100 (CET) Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-1b5d5f9938cso1298364c88.1 for ; Fri, 04 Dec 2026 08:01:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796400092; x=1797004892; 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=9CEeTRvi1+wxwekIpKrbsySYhZB8qgCuhVNbni56X0Y=; b=ZtXZBgr3LDdrNMBE6j/AeXNtkZy9s7g0NhrFIjjPezjonvv3pxwozukzwQDFeTMsOX gc5UsXk4dGMYqqKqchCQjeoP2GiLDGX7HuxNMxotajUKRKbSG/4EfH58fwQ0KbZNCUmn ivHvrNTEhFf6hz/h8/J2TQL1wKyD9TsPUGcYYdlH6CTrnBWs7Qq+BOqpulrTjy4wa5Vn qsKmRLOEYUxuuN2C6huLW1/MQdHMKSGONSQtEK68h4ttVLUxOOAkeEJ1Ke60zS0bKrOp uxz1UOj2C4Dr0WVCFAtW/JTI742FKP1uR+yEnY5bK2+yAOnnLv5b4irT8BrWUBm09oG9 AhfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796400092; x=1797004892; 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=9CEeTRvi1+wxwekIpKrbsySYhZB8qgCuhVNbni56X0Y=; b=IiQQsHJTF9XuZFWi0UChppuTTUJbGbFCDOS6SCyvzxZ3clbGwh/B0xghA8OFt58f2Q 2cVTUYsb0d/Im+d2vTA1slwjhyB6pRrVppxmxvs9iuymT8rSe2EGYqmx6YdToMGgLR5i Xy3KVVWg2vqJkHb58QYRiPxqguxpi6WXXRap6CU09F5UgOo9KPwK+gpnH3s//yE8Hm02 oBLpN/ghkKlh1BAVKBHSp428wjichNp5oEbhwtKIxfFkQgo4Y46trBpjslXWUk35aR7i BwQPxG05GeZqRtkaA/0dEoSTmX3H9kjCPE+aPzL2J/WiVe1oME+rl0W576+5+45pclMD f7MA== X-Gm-Message-State: APuU4Z/6zZWrIPGTDyUhZxINf0UBaj4PivNE47yUrYNSTFNKbPPs7bQb vNFb4KEtm7NUT12WIlJy8vXnSqYAsj/cdwHR1DkdP3GGBXw9MJcPNXH7YQS9tw== X-Gm-Gg: AZFdTZelcHZjUDix40nVuSJHQ5OhOXyT9KT/5URebSv/VKVZcBqmsQ8DnkbJxrq3lGj ky5rV71ktJr6Bjxd4lGbDezgivZkOQP058zDZ0qAT6Y6Sm3cni5VnWrr/D1xWR7Bb7pgsHVCwTn 1aD/bHYkRUZda9lyFqodt5Ks6KTiC858Cc3MoRXx7JY77HC1ZSDXk85F+gnzpKLIyjILxZfue9H CWTWEiuSmftlhbOx77B/DwyiyJX8yTmetfrjzfDFBprP2roEPYmz+yV8RUNghsby7gzJjeTUA8a a4D0lPUlDDrylIjXEXck77apBiTxjy49c1Ix0hP81oqm7HI410YF7Vrw2xjVmff3tzE/FN/4la7 x1stO8tWq+P3OzJofUpSifgbcMo+G2BnAXMlrScmBECJIxbSBuNvU/X8s/qcQAS7/fDEwppX6iS f8oJ+UhWLi8Tvh2diybRHx66P4GuKQXsUKkYOXPXY2PxffRsEeJHLczUtWuoibzGJ0/4PZ8zEGu Gra8qJ9sHULzF/jenyVDJv/efpIImvKWz0ocuMxHqYL+f+O3f1+a8MSdxWNwAov1BEJZTO1/tjr 3/AG2bM57goWUTA/eEH8KLbOwqWrFRsOSsa9bafPvZ2ywX7k9Z5rfIqqIoC9g7UuT28w91/bqY/ qPjCPjTRK5BXOosVb6FxXjQyaDw0QGJ8= X-Received: by 2002:a05:701b:4594:20b0:1b5:23e7:3387 with SMTP id a92af1059eb24-1b5d711f9b0mr2158094c88.19.1796400092043; Fri, 04 Dec 2026 08:01:32 -0800 (PST) Received: from mac.com ([136.24.82.250]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5d642de41sm7687604c88.3.2026.12.04.08.01.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Dec 2026 08:01:31 -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 v10 0/8] net/af_packet fixes and Tx features Date: Fri, 4 Dec 2026 08:01:20 -0800 Message-ID: <20261204160128.17277-1-scott.k.mitch1@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261203164211.48531-1-scott.k.mitch1@gmail.com> References: <20261203164211.48531-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 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. v10: * Frame size must hold a minimum Ethernet frame after the 66 byte Rx offset (minimum 144), so the maximum Rx length can't wrap; documented and tested with framesz=64. (Stephen) * Fixes tags of "fix maximum Rx packet length" corrected. (Stephen) * "clean up Tx and bulk free mbufs" commit message mentions its tests. (Stephen) 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 | 245 +++-- 5 files changed, 1212 insertions(+), 76 deletions(-) -- 2.54.0 (Apple Git-157)