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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Mar 18 16:39:11 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.11.5

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/20/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://github.com/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From 7858502f9ae5ff1df72fd9ccf4ff12d8a57bbf38 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

[ 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 d41b0d1363..4d76da484b 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2058,6 +2058,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	mlx5_flex_item_port_cleanup(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);
 	if (priv->sh->config.dv_flow_en == 2) {
@@ -2093,6 +2094,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 927be86c36..881aa40262 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -7407,8 +7407,6 @@ 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));
-	priv->dr_ctx = NULL;
 	priv->nb_queue = 0;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-18 12:58:40.176495177 +0000
+++ 0021-net-mlx5-fix-DR-context-release-ordering.patch	2024-03-18 12:58:39.211347416 +0000
@@ -1 +1 @@
-From d068681b637da6b7857c13711eb1a675b2a341e3 Mon Sep 17 00:00:00 2001
+From 7858502f9ae5ff1df72fd9ccf4ff12d8a57bbf38 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d068681b637da6b7857c13711eb1a675b2a341e3 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 39dc1830d1..8b54843a43 100644
+index d41b0d1363..4d76da484b 100644
@@ -26,2 +27,2 @@
-@@ -2355,6 +2355,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
- 	mlx5_indirect_list_handles_release(dev);
+@@ -2058,6 +2058,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ 	mlx5_flex_item_port_cleanup(dev);
@@ -33,2 +34,2 @@
- 	if (priv->tlv_options != NULL) {
-@@ -2391,6 +2392,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ 	if (priv->sh->config.dv_flow_en == 2) {
+@@ -2093,6 +2094,12 @@ mlx5_dev_close(struct rte_eth_dev *dev)
@@ -48 +49 @@
-index 817461017f..c89bd00fb0 100644
+index 927be86c36..881aa40262 100644
@@ -51 +52 @@
-@@ -10734,13 +10734,11 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
+@@ -7407,8 +7407,6 @@ flow_hw_resource_release(struct rte_eth_dev *dev)
@@ -56,5 +56,0 @@
- 	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;
- 	}
@@ -62,2 +57,0 @@
- 	mlx5_free(priv->hw_attr);
- 	priv->hw_attr = NULL;
@@ -64,0 +59,2 @@
+ }
+ 


More information about the stable mailing list