patch 'net/mlx5: fix flow sample with ConnectX-5' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 08:00:30 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=d5be08262127a74d41e2db1f740dbdc099b1399d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d5be08262127a74d41e2db1f740dbdc099b1399d Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw at nvidia.com>
Date: Fri, 9 Dec 2022 16:34:06 +0200
Subject: [PATCH] net/mlx5: fix flow sample with ConnectX-5
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ]

The sample flow tried to get the reserved metadata register for
the match implicitly, and if the reserved metadata register was
invalid then back to use the application tag.

The assertion failure was caused while getting registered due to
the reserved metadata regC is invalid on CX-5 trusted device(VF/SF).

This patch adds the checking for reserved metadata register before
getting the register, to avoid assertion failure.

Fixes: 9a726360dd30 ("net/mlx5: fix sample flow action on trusted device")

Signed-off-by: Jiawei Wang <jiaweiw at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index a0cf677fb0..1768ec3cdb 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -6125,13 +6125,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
 		/* Prepare the prefix tag action. */
 		append_index++;
 		set_tag = (void *)(actions_pre + actions_n + append_index);
-		ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
 		/* Trust VF/SF on CX5 not supported meter so that the reserved
 		 * metadata regC is REG_NON, back to use application tag
 		 * index 0.
 		 */
-		if (unlikely(ret == REG_NON))
+		if (unlikely(priv->mtr_color_reg == REG_NON))
 			ret = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, 0, error);
+		else
+			ret = mlx5_flow_get_reg_id(dev, MLX5_SAMPLE_ID, 0, error);
 		if (ret < 0)
 			return ret;
 		mlx5_ipool_malloc(priv->sh->ipool
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:44.826674300 +0800
+++ 0123-net-mlx5-fix-flow-sample-with-ConnectX-5.patch	2023-02-27 14:08:40.899237000 +0800
@@ -1 +1 @@
-From 7aa6d7998a9e59dc510e4e5706f675493855ff27 Mon Sep 17 00:00:00 2001
+From d5be08262127a74d41e2db1f740dbdc099b1399d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index 51547aa78f..ea2016598e 100644
+index a0cf677fb0..1768ec3cdb 100644
@@ -29 +31 @@
-@@ -6186,13 +6186,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+@@ -6125,13 +6125,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,


More information about the stable mailing list