patch 'net/mlx5: fix DR context release ordering' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:41 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/15/24. 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=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=859bafedf3ae9983e143ee35bcbb8046b91430bc

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 859bafedf3ae9983e143ee35bcbb8046b91430bc Mon Sep 17 00:00:00 2001
From: Maayan Kashani <mkashani at nvidia.com>
Date: Wed, 6 Mar 2024 08:02:07 +0200
Subject: [PATCH] net/mlx5: fix DR context release ordering
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ]

Creating rules on group >0, creates a jump action on the group table.
Non template code releases the group data under shared mlx5dr free code,
And the mlx5dr context was already closed in HWS code.

Remove mlx5dr context release from hws resource release function.

Fixes: b401400db24e ("net/mlx5: add port flow configuration")

Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5.c         | 7 +++++++
 drivers/net/mlx5/mlx5_flow_hw.c | 2 --
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index df0383078d..95f2ed073c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2268,6 +2268,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_indirect_list_handles_release(dev);
 #ifdef HAVE_MLX5_HWS_SUPPORT
 	flow_hw_destroy_vport_action(dev);
+	/* dr context will be closed after mlx5_os_free_shared_dr. */
 	flow_hw_resource_release(dev);
 	flow_hw_clear_port_info(dev);
 #endif
@@ -2299,6 +2300,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		mlx5_hlist_destroy(priv->mreg_cp_tbl);
 	mlx5_mprq_free_mp(dev);
 	mlx5_os_free_shared_dr(priv);
+#ifdef HAVE_MLX5_HWS_SUPPORT
+	if (priv->dr_ctx) {
+		claim_zero(mlx5dr_context_close(priv->dr_ctx));
+		priv->dr_ctx = NULL;
+	}
+#endif
 	if (priv->rss_conf.rss_key != NULL)
 		mlx5_free(priv->rss_conf.rss_key);
 	if (priv->reta_idx != NULL)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index aff1ab74e3..9de5552bc8 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -9756,13 +9756,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
 	}
 	mlx5_free(priv->hw_q);
 	priv->hw_q = NULL;
-	claim_zero(mlx5dr_context_close(priv->dr_ctx));
 	if (priv->shared_host) {
 		struct mlx5_priv *host_priv = priv->shared_host->data->dev_private;
 		__atomic_fetch_sub(&host_priv->shared_refcnt, 1, __ATOMIC_RELAXED);
 		priv->shared_host = NULL;
 	}
-	priv->dr_ctx = NULL;
 	mlx5_free(priv->hw_attr);
 	priv->hw_attr = NULL;
 	priv->nb_queue = 0;
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:08.112838763 +0800
+++ 0101-net-mlx5-fix-DR-context-release-ordering.patch	2024-04-13 20:43:05.097753801 +0800
@@ -1 +1 @@
-From d068681b637da6b7857c13711eb1a675b2a341e3 Mon Sep 17 00:00:00 2001
+From 859bafedf3ae9983e143ee35bcbb8046b91430bc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 39dc1830d1..8b54843a43 100644
+index df0383078d..95f2ed073c 100644
@@ -26 +28 @@
-@@ -2355,6 +2355,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -2268,6 +2268,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -33,2 +35,2 @@
- 	if (priv->tlv_options != NULL) {
-@@ -2391,6 +2392,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ #endif
+@@ -2299,6 +2300,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -48 +50 @@
-index 817461017f..c89bd00fb0 100644
+index aff1ab74e3..9de5552bc8 100644
@@ -51 +53 @@
-@@ -10734,13 +10734,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+@@ -9756,13 +9756,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)


More information about the stable mailing list