patch 'net/af_packet: check packet size after VLAN insertion' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:04:41 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/775302cb9c11091b42d7c83067a24639d66c68e6

Thanks.

Kevin

---
>From 775302cb9c11091b42d7c83067a24639d66c68e6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 28 Oct 2026 15:48:07 -0700
Subject: [PATCH] net/af_packet: check packet size after VLAN insertion

[ upstream commit 7424874516a93758a2f69974971196072a0de155 ]

This fixes a corner case where vlan is insert and the resulting
packet exceeds the TPACKET_V2 ring slot size.

Fixes: 23deeebfcfa8 ("net/af_packet: support 802.1Q VLAN")

Reported-by: Anthropic OSS scanner
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index c64de528ac..7908dd6b04 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -258,10 +258,4 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		mbuf = *bufs++;
 
-		/* drop oversized packets */
-		if (mbuf->pkt_len > pkt_q->frame_data_size) {
-			rte_pktmbuf_free(mbuf);
-			continue;
-		}
-
 		/* insert vlan info if necessary */
 		if (mbuf->ol_flags & RTE_MBUF_F_TX_VLAN) {
@@ -272,4 +266,10 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		}
 
+		/* drop oversized packets */
+		if (mbuf->pkt_len > pkt_q->frame_data_size) {
+			rte_pktmbuf_free(mbuf);
+			continue;
+		}
+
 		/* point at the next incoming frame */
 		if (!tx_ring_status_available(ppd->tp_status)) {
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:49.243061514 +0000
+++ 0355-net-af_packet-check-packet-size-after-VLAN-insertion.patch	2026-12-03 12:52:39.274997997 +0000
@@ -1 +1 @@
-From 7424874516a93758a2f69974971196072a0de155 Mon Sep 17 00:00:00 2001
+From 775302cb9c11091b42d7c83067a24639d66c68e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7424874516a93758a2f69974971196072a0de155 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 77c017f676..44f82c0309 100644
+index c64de528ac..7908dd6b04 100644
@@ -22 +23 @@
-@@ -336,10 +336,4 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -258,10 +258,4 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -33 +34 @@
-@@ -350,4 +344,10 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -272,4 +266,10 @@ eth_af_packet_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)



More information about the stable mailing list