patch 'net/mlx5/hws: fix memory leak in modify header' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:49:57 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

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/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=3c9aff8fbf6d58dd55c365b351e1367c4681d489

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3c9aff8fbf6d58dd55c365b351e1367c4681d489 Mon Sep 17 00:00:00 2001
From: Erez Shitrit <erezsh at nvidia.com>
Date: Tue, 9 Jul 2024 15:30:57 +0300
Subject: [PATCH] net/mlx5/hws: fix memory leak in modify header
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 ]

When creating action from type MLX5DR_ACTION_TYP_REFORMAT_TNL_L3_TO_L2
we use modify-header object, we support few of that type at the same
time over this action depends on the number of headers.
Now when destroying the modify-header object we run over the
number_of_patterns, this variable was not set in the creation of that
action.

Fixes: 3a6c50215c07 ("net/mlx5/hws: support multi-pattern")

Signed-off-by: Erez Shitrit <erezsh at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index d21bca294c..7a0d1b49c6 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -1491,6 +1491,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
 
 		action[i].modify_header.max_num_of_actions = num_of_actions;
 		action[i].modify_header.num_of_actions = num_of_actions;
+		action[i].modify_header.num_of_patterns = num_of_hdrs;
 		action[i].modify_header.arg_obj = arg_obj;
 		action[i].modify_header.pat_obj = pat_obj;
 		action[i].modify_header.require_reparse =
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:06.307806397 +0800
+++ 0120-net-mlx5-hws-fix-memory-leak-in-modify-header.patch	2024-08-12 20:44:02.485069371 +0800
@@ -1 +1 @@
-From 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 Mon Sep 17 00:00:00 2001
+From 3c9aff8fbf6d58dd55c365b351e1367c4681d489 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3d22ef2dc1c830c5bc29a974b8a1cc67b1f6c1a4 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 03c3683f71..b90f18df8a 100644
+index d21bca294c..7a0d1b49c6 100644
@@ -26 +28 @@
-@@ -1820,6 +1820,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,
+@@ -1491,6 +1491,7 @@ mlx5dr_action_handle_tunnel_l3_to_l2(struct mlx5dr_action *action,


More information about the stable mailing list