patch 'net/af_packet: fix MTU set data size calculation' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Mar 19 11:03:05 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/23/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/be7bb2a318eb5cee136a75eef72f311ed68c71fc
Thanks.
Kevin
---
>From be7bb2a318eb5cee136a75eef72f311ed68c71fc Mon Sep 17 00:00:00 2001
From: Xavier Guillaume <xavier.guillaume at ovhcloud.com>
Date: Tue, 10 Mar 2026 12:21:20 +0100
Subject: [PATCH] net/af_packet: fix MTU set data size calculation
[ upstream commit b1cd278e97315fc4c19d4157a54d05e974a8d121 ]
The data_size in eth_dev_mtu_set() is calculated as:
tp_frame_size - TPACKET2_HDRLEN
Since TPACKET2_HDRLEN is defined as:
TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)
it includes sizeof(struct sockaddr_ll), but the actual packet data
in the TPACKET ring starts at TPACKET_ALIGN(sizeof(struct tpacket2_hdr)).
The sockaddr_ll does not consume frame data space. This makes the
current formula 20 bytes too restrictive, matching neither the
RX queue setup nor the TX queue init path, which both correctly use:
tp_frame_size - TPACKET2_HDRLEN + sizeof(struct sockaddr_ll)
Fix the calculation to be consistent and accept all valid MTU values.
Fixes: 8020573894a8 ("net/af_packet: fix setting MTU decrements sockaddr twice")
Signed-off-by: Xavier Guillaume <xavier.guillaume at ovhcloud.com>
---
.mailmap | 1 +
drivers/net/af_packet/rte_eth_af_packet.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 8f8f17593b..f911940243 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1786,4 +1786,5 @@ Wojciech Liguzinski <wojciechx.liguzinski at intel.com>
Wojciech Panfil <wojciech.panfil at intel.com>
Wojciech Zmuda <woz at semihalf.com>
+Xavier Guillaume <xavier.guillaume at ovhcloud.com>
Xavier Simonart <xavier.simonart at intel.com>
Xi Zhang <xix.zhang at intel.com>
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index ef11b8fb6b..4ed5ee5737 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -613,5 +613,5 @@ eth_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
int s;
unsigned int data_size = internals->req.tp_frame_size -
- TPACKET2_HDRLEN;
+ TPACKET2_HDRLEN + sizeof(struct sockaddr_ll);
if (mtu > data_size)
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 10:01:09.025206908 +0000
+++ 0067-net-af_packet-fix-MTU-set-data-size-calculation.patch 2026-03-19 10:01:07.125331260 +0000
@@ -1 +1 @@
-From b1cd278e97315fc4c19d4157a54d05e974a8d121 Mon Sep 17 00:00:00 2001
+From be7bb2a318eb5cee136a75eef72f311ed68c71fc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1cd278e97315fc4c19d4157a54d05e974a8d121 ]
+
@@ -22 +23,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index 91866f13c5..e23cd100eb 100644
+index 8f8f17593b..f911940243 100644
@@ -34 +35 @@
-@@ -1792,4 +1792,5 @@ Wojciech Liguzinski <wojciechx.liguzinski at intel.com>
+@@ -1786,4 +1786,5 @@ Wojciech Liguzinski <wojciechx.liguzinski at intel.com>
@@ -41 +42 @@
-index c0ba3381ea..bfa68297a6 100644
+index ef11b8fb6b..4ed5ee5737 100644
More information about the stable
mailing list