patch 'net/mlx5: fix decap action checking in sample flow' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:12 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/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=74b594dfd3c7aa431cea5f1db0527d32d4f3a9fe

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 74b594dfd3c7aa431cea5f1db0527d32d4f3a9fe Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw at nvidia.com>
Date: Wed, 11 Oct 2023 09:36:31 +0300
Subject: [PATCH] net/mlx5: fix decap action checking in sample flow
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit c40023aece2ec9a7899fafecf474d7337212776e ]

This patch uses the temp variable to check the current action type,
to avoid overlap the sample action following the decap.

Fixes: 7356aec64c48 ("net/mlx5: fix mirror flow split with L3 encapsulation")

Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
Acked-by: Suanming Mou <suanmingm at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 942dccf518..ea0a49827f 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -5891,6 +5891,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
 {
 	const struct rte_flow_action_sample *sample;
 	const struct rte_flow_action_raw_decap *decap;
+	const struct rte_flow_action *action_cur = NULL;
 	int actions_n = 0;
 	uint32_t ratio = 0;
 	int sub_type = 0;
@@ -5951,12 +5952,12 @@ flow_check_match_action(const struct rte_flow_action actions[],
 			break;
 		case RTE_FLOW_ACTION_TYPE_RAW_DECAP:
 			decap = actions->conf;
-			while ((++actions)->type == RTE_FLOW_ACTION_TYPE_VOID)
+			action_cur = actions;
+			while ((++action_cur)->type == RTE_FLOW_ACTION_TYPE_VOID)
 				;
-			actions_n++;
-			if (actions->type == RTE_FLOW_ACTION_TYPE_RAW_ENCAP) {
+			if (action_cur->type == RTE_FLOW_ACTION_TYPE_RAW_ENCAP) {
 				const struct rte_flow_action_raw_encap *encap =
-								actions->conf;
+								action_cur->conf;
 				if (decap->size <=
 					MLX5_ENCAPSULATION_DECISION_SIZE &&
 				    encap->size >
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:24.658756900 +0800
+++ 0047-net-mlx5-fix-decap-action-checking-in-sample-flow.patch	2023-12-11 17:56:22.997652300 +0800
@@ -1 +1 @@
-From c40023aece2ec9a7899fafecf474d7337212776e Mon Sep 17 00:00:00 2001
+From 74b594dfd3c7aa431cea5f1db0527d32d4f3a9fe Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit c40023aece2ec9a7899fafecf474d7337212776e ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 8ad85e6027..772f6afb66 100644
+index 942dccf518..ea0a49827f 100644
@@ -22 +24 @@
-@@ -6159,6 +6159,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
+@@ -5891,6 +5891,7 @@ flow_check_match_action(const struct rte_flow_action actions[],
@@ -30 +32 @@
-@@ -6219,12 +6220,12 @@ flow_check_match_action(const struct rte_flow_action actions[],
+@@ -5951,12 +5952,12 @@ flow_check_match_action(const struct rte_flow_action actions[],


More information about the stable mailing list