patch 'net/mlx5: fix build with LTO' has been queued to stable release 25.11.1
Kevin Traynor
ktraynor at redhat.com
Thu Mar 19 11:02:01 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/5f5dae34ff21564cb9b466b4e6baaea4646c2692
Thanks.
Kevin
---
>From 5f5dae34ff21564cb9b466b4e6baaea4646c2692 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 5 Feb 2026 09:55:58 -0800
Subject: [PATCH] net/mlx5: fix build with LTO
[ upstream commit 00d41387a5863affd3a018ddb784f3b2195d7fa1 ]
When LTO inlines mlx5dr_action_prepare_decap_l3_data() into
its callers, GCC sees the 64-byte stack buffer 'mh_data' but
cannot prove num_of_actions is bounded, producing a false
-Wstringop-overflow warning.
Add __rte_assume(num_of_actions <= DECAP_L3_NUM_ACTIONS_W_VLAN)
so GCC can verify the loop stays within buffer bounds.
Bugzilla ID: 1710
Fixes: f8c8a6d8440d ("net/mlx5/hws: add action object")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index b35bf07c3c..afb638250d 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -3621,4 +3621,15 @@ mlx5dr_action_prepare_decap_l3_data(uint8_t *src, uint8_t *dst,
int i;
+ /*
+ * When LTO inlines this into mlx5dr_action_handle_tunnel_l3_to_l2(),
+ * GCC sees the 64-byte mh_data buffer but cannot prove num_of_actions
+ * is bounded, causing false -Wstringop-overflow warnings.
+ *
+ * Valid num_of_actions values are DECAP_L3_NUM_ACTIONS_W_NO_VLAN (6)
+ * or DECAP_L3_NUM_ACTIONS_W_VLAN (7). This check gives GCC the proof
+ * it needs that the loop iterations stay within buffer bounds.
+ */
+ __rte_assume(num_of_actions <= DECAP_L3_NUM_ACTIONS_W_VLAN);
+
/* num_of_actions = remove l3l2 + 4/5 inserts + remove extra 2 bytes
* copy from end of src to the start of dst.
--
2.53.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-19 10:01:07.231167166 +0000
+++ 0003-net-mlx5-fix-build-with-LTO.patch 2026-03-19 10:01:07.058331264 +0000
@@ -1 +1 @@
-From 00d41387a5863affd3a018ddb784f3b2195d7fa1 Mon Sep 17 00:00:00 2001
+From 5f5dae34ff21564cb9b466b4e6baaea4646c2692 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00d41387a5863affd3a018ddb784f3b2195d7fa1 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list