patch 'net/mlx5: fix sync flow meter action' has been queued to stable release 23.11.1

Xueming Li xuemingl at nvidia.com
Sat Apr 13 14:49:58 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=df1119d4a906b1644c231059579315d84ee9772c

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From df1119d4a906b1644c231059579315d84ee9772c Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Tue, 19 Mar 2024 13:24:55 +0200
Subject: [PATCH] net/mlx5: fix sync flow meter action
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit dc7faa135188ede2455c66e79110538f1f92e08c ]

PMD implements sync METER flow action as async.
Queue selected for sync operations is `MLX5_HW_INV_QUEUE`.
That dummy queue value is translated into `CTRL_QUEUE_ID(priv)`.
Async job allocation converts INV queue into the real value, but
job release does not.

This patch fixes the queue value provided to `flow_hw_job_put()`.

This patch also removes dead code found in METER_MARK
destroy handler.

Coverity issue: 415804, 415806
Fixes: 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c    | 5 +----
 drivers/net/mlx5/mlx5_flow_meter.c | 2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index a54075ed7e..47fbbd0818 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -10497,10 +10497,7 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,
 				NULL, "Unable to wait for ASO meter CQE");
 			break;
 		}
-		if (!job)
-			mlx5_ipool_free(pool->idx_pool, idx);
-		else
-			aso = true;
+		aso = true;
 		break;
 	case MLX5_INDIRECT_ACTION_TYPE_RSS:
 		ret = flow_dv_action_destroy(dev, handle, error);
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 249dc73691..7bf5018c70 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -1981,7 +1981,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE, aso_mtr,
 					   &priv->mtr_bulk, job, true);
 	if (ret) {
-		flow_hw_job_put(priv, job, MLX5_HW_INV_QUEUE);
+		flow_hw_job_put(priv, job, CTRL_QUEUE_ID(priv));
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  NULL, "Failed to create devx meter.");
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-04-13 20:43:08.648623763 +0800
+++ 0118-net-mlx5-fix-sync-flow-meter-action.patch	2024-04-13 20:43:05.157753723 +0800
@@ -1 +1 @@
-From dc7faa135188ede2455c66e79110538f1f92e08c Mon Sep 17 00:00:00 2001
+From df1119d4a906b1644c231059579315d84ee9772c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit dc7faa135188ede2455c66e79110538f1f92e08c ]
@@ -19 +21,0 @@
-Cc: stable at dpdk.org
@@ -29 +31 @@
-index 35f1ed7a03..9ebbe664d1 100644
+index a54075ed7e..47fbbd0818 100644
@@ -32 +34 @@
-@@ -11494,10 +11494,7 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,
+@@ -10497,10 +10497,7 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,
@@ -45 +47 @@
-index 4045c4c249..ca361f7efa 100644
+index 249dc73691..7bf5018c70 100644
@@ -48 +50 @@
-@@ -2265,7 +2265,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
+@@ -1981,7 +1981,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,


More information about the stable mailing list