patch 'net/mlx5: fix RETA update without stopping device' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:13 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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 11/30/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6d132c0f7329b26ce88cdb082bc50ca69d38e8b6

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 6d132c0f7329b26ce88cdb082bc50ca69d38e8b6 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz at nvidia.com>
Date: Fri, 5 Nov 2021 08:10:57 +0200
Subject: [PATCH] net/mlx5: fix RETA update without stopping device
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 ]

The global redirection table is used to create the default flow
rules for the ingress traffic with the lowest priority. It is also
used to create the default RSS rule in the destination table when
there is a tunnel offload.

To update the RETA in-flight, there is no restriction in the ethdev
API. In the previous implementation of mlx5, a port restart was
needed to make the new configuration take effect.

The restart is heavy, e.g., all the queues will be released and
reallocated, users' rules will be flushed. Since the restart is
internal, there is a risk to crash the application when some change
in the ethdev is introduced but no workaround is done in mlx5 PMD.

The users' rules, including the default miss rule for tunnel
offload, should not be impacted by the RETA update. It is improper
to flush all rules when updating RETA.

With this patch, only the default rules will be flushed and
re-created with the new table configuration.

Fixes: 3f2fe392bd49 ("net/mlx5: fix crash during RETA update")

Signed-off-by: Bing Zhao <bingz at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_rss.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 0aa3b4ed98..c79cfcbba8 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -215,12 +215,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
 		MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
 		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
 	}
-
 	priv->skip_default_rss_reta = 1;
-
-	if (dev->data->dev_started) {
-		mlx5_dev_stop(dev);
-		return mlx5_dev_start(dev);
-	}
-	return 0;
+	return mlx5_traffic_restart(dev);
 }
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:04.028075704 +0800
+++ 0009-net-mlx5-fix-RETA-update-without-stopping-device.patch	2021-11-28 22:41:03.213542911 +0800
@@ -1 +1 @@
-From 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 Mon Sep 17 00:00:00 2001
+From 6d132c0f7329b26ce88cdb082bc50ca69d38e8b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6b5b3005cb1854e471fa1ef3eb579dbd444c05b0 ]
@@ -28 +30,0 @@
-Cc: stable at dpdk.org
@@ -37 +39 @@
-index 75af05b7b0..e2b478b75c 100644
+index 0aa3b4ed98..c79cfcbba8 100644
@@ -40 +42 @@
-@@ -218,12 +218,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -215,12 +215,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,


More information about the stable mailing list