patch 'test/security: fix MTU calculation underflow' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Tue Jul 28 17:56:16 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/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/a6ecbbfd01f2223404ba9081eb62adb94f6814c3
Thanks.
Kevin
---
>From a6ecbbfd01f2223404ba9081eb62adb94f6814c3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Mon, 22 Jun 2026 12:18:33 +0100
Subject: [PATCH] test/security: fix MTU calculation underflow
[ upstream commit 8635cb5c5c6f6432a2212c93ece006352acd418a ]
When testing with some NICs it was observed that the max MTU calculation
could underflow. Despite the RTE_MIN, due to integer promotion, this
lead to the configuring of the port with an excessively large, invalid
value. For example, if lim_nb_seg_max == 0, that meant that
max_data_room - 256 is -256 for comparison purposes using standard
integers (promoted from uint16_t). That is lower than the max mtu so the
-256 value is chosen, which becomes >65000 when converted back to
uint16_t.
Fix this by a) checking for seg_max == 0 b) doing calculations using
uint32_t and c) checking explicitly for underflow before subtracting.
Fixes: 3edd1197a605 ("test/security: add multi-segment inline IPsec cases")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
app/test/test_security_inline_proto.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c
index 260f72acfa..34de877c36 100644
--- a/app/test/test_security_inline_proto.c
+++ b/app/test/test_security_inline_proto.c
@@ -2013,6 +2013,17 @@ inline_ipsec_testsuite_setup(void)
/* Add Multi seg flags */
if (sg_mode) {
- uint16_t max_data_room = RTE_MBUF_DEFAULT_DATAROOM *
- dev_info.rx_desc_lim.nb_seg_max;
+ uint32_t max_data_room;
+
+ if (dev_info.rx_desc_lim.nb_seg_max == 0) {
+ printf("SG mode unsupported: invalid max Rx segments (0)\n");
+ return TEST_SKIPPED;
+ }
+
+ max_data_room = RTE_MBUF_DEFAULT_DATAROOM * dev_info.rx_desc_lim.nb_seg_max;
+ if (max_data_room <= 256) {
+ printf("SG mode unsupported: max data room (%u) too small\n",
+ max_data_room);
+ return TEST_SKIPPED;
+ }
local_port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_SCATTER;
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-28 16:54:52.142127273 +0100
+++ 0046-test-security-fix-MTU-calculation-underflow.patch 2026-07-28 16:54:50.782870965 +0100
@@ -1 +1 @@
-From 8635cb5c5c6f6432a2212c93ece006352acd418a Mon Sep 17 00:00:00 2001
+From a6ecbbfd01f2223404ba9081eb62adb94f6814c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8635cb5c5c6f6432a2212c93ece006352acd418a ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 4e074712f5..36658f4778 100644
+index 260f72acfa..34de877c36 100644
@@ -31 +32 @@
-@@ -2066,6 +2066,17 @@ inline_ipsec_testsuite_setup(void)
+@@ -2013,6 +2013,17 @@ inline_ipsec_testsuite_setup(void)
More information about the stable
mailing list