patch 'net/mlx5: fix GENEVE resource overwrite' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:27 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 03/01/23. 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=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=4434048bbecd86cafba6e27af7f4ff3871b1773f

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 4434048bbecd86cafba6e27af7f4ff3871b1773f Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm at nvidia.com>
Date: Wed, 23 Nov 2022 13:57:12 +0200
Subject: [PATCH] net/mlx5: fix GENEVE resource overwrite
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 579c00411ac87970b685de80239bc35b74e7a33e ]

Currently, one rte_flow may be split to multiple sub mlx5_flows.
While GENEVE option resource was allocated in the first mlx5_flow,
the flag will be overwritten by next sub mlx5_flow. This caused
GENEVE option resource leakage.

This commit adds the check of GENEVE option resource to avoid the
GENEVE option flag be overwritten.

Fixes: cd4ab742064a ("net/mlx5: split flow item matcher and value translation")

Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 62c38b87a1..7ca909999b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -13717,7 +13717,12 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
 	 * is the suffix flow.
 	 */
 	dev_flow->handle->layers |= wks.item_flags;
-	dev_flow->flow->geneve_tlv_option = wks.geneve_tlv_option;
+	/*
+	 * Update geneve_tlv_option flag only it is set in workspace.
+	 * Avoid be overwritten by other sub mlx5_flows.
+	 */
+	if (wks.geneve_tlv_option)
+		dev_flow->flow->geneve_tlv_option = wks.geneve_tlv_option;
 	return 0;
 }

--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:44.723854500 +0800
+++ 0120-net-mlx5-fix-GENEVE-resource-overwrite.patch	2023-02-27 14:08:40.889237000 +0800
@@ -1 +1 @@
-From 579c00411ac87970b685de80239bc35b74e7a33e Mon Sep 17 00:00:00 2001
+From 4434048bbecd86cafba6e27af7f4ff3871b1773f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 579c00411ac87970b685de80239bc35b74e7a33e ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index bf98c26018..9e5db6b945 100644
+index 62c38b87a1..7ca909999b 100644
@@ -27 +29 @@
-@@ -13793,7 +13793,12 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,
+@@ -13717,7 +13717,12 @@ flow_dv_translate_items_sws(struct rte_eth_dev *dev,


More information about the stable mailing list