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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:55 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/25/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5286c2391c6714374b3da8123f0fcb00e62ba0fd

Thanks.

Luca Boccassi

---
>From 5286c2391c6714374b3da8123f0fcb00e62ba0fd 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

[ 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 87d55fc6be..ad11611027 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -4821,13 +4821,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
 	if (!fdb_tx) {
 		/* Prepare the prefix tag action. */
 		set_tag = (void *)(actions_pre + actions_n + 1);
-		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;
 		set_tag->id = ret;
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 09:36:30.268107363 +0000
+++ 0051-net-mlx5-fix-flow-sample-with-ConnectX-5.patch	2023-02-23 09:36:28.302171339 +0000
@@ -1 +1 @@
-From 7aa6d7998a9e59dc510e4e5706f675493855ff27 Mon Sep 17 00:00:00 2001
+From 5286c2391c6714374b3da8123f0fcb00e62ba0fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7aa6d7998a9e59dc510e4e5706f675493855ff27 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 51547aa78f..ea2016598e 100644
+index 87d55fc6be..ad11611027 100644
@@ -29 +30,2 @@
-@@ -6186,13 +6186,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+@@ -4821,13 +4821,14 @@ flow_sample_split_prep(struct rte_eth_dev *dev,
+ 	if (!fdb_tx) {
@@ -31,2 +33 @@
- 		append_index++;
- 		set_tag = (void *)(actions_pre + actions_n + append_index);
+ 		set_tag = (void *)(actions_pre + actions_n + 1);
@@ -45 +46 @@
- 		mlx5_ipool_malloc(priv->sh->ipool
+ 		set_tag->id = ret;


More information about the stable mailing list