patch 'net/mlx5: fix unlock mismatch' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:49 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 12/13/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From f00e3b40fd33b32fc796cd5b1fda4049d7bf21ce Mon Sep 17 00:00:00 2001
From: Weiguo Li <liweiguo at xencore.cn>
Date: Sat, 4 Nov 2023 12:07:33 +0800
Subject: [PATCH] net/mlx5: fix unlock mismatch
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 29f99df4200eafcc528eea08b0fffb8efb1a595a ]

The 'need_lock' parameter controls whether the function acquires and
releases the spinlock, but the first unlock operation occurs regardless
of the 'need_lock' parameter.

To fix this issue, the spin unlock operation should be invoked within
an 'if (need_lock)' block, ensuring that the function only unlocks the
spinlock if it has previously been acquired.

Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS")

Signed-off-by: Weiguo Li <liweiguo at xencore.cn>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_aso.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c
index 29bd7ce9e8..8441be3dea 100644
--- a/drivers/net/mlx5/mlx5_flow_aso.c
+++ b/drivers/net/mlx5/mlx5_flow_aso.c
@@ -932,7 +932,8 @@ mlx5_aso_mtr_completion_handle(struct mlx5_aso_sq *sq, bool need_lock)
 		rte_spinlock_lock(&sq->sqsl);
 	max = (uint16_t)(sq->head - sq->tail);
 	if (unlikely(!max)) {
-		rte_spinlock_unlock(&sq->sqsl);
+		if (need_lock)
+			rte_spinlock_unlock(&sq->sqsl);
 		return;
 	}
 	do {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.804788300 +0800
+++ 0084-net-mlx5-fix-unlock-mismatch.patch	2023-12-11 17:56:23.137652300 +0800
@@ -1 +1 @@
-From 29f99df4200eafcc528eea08b0fffb8efb1a595a Mon Sep 17 00:00:00 2001
+From f00e3b40fd33b32fc796cd5b1fda4049d7bf21ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 29f99df4200eafcc528eea08b0fffb8efb1a595a ]
@@ -15 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index 3c08da0614..f311443472 100644
+index 29bd7ce9e8..8441be3dea 100644


More information about the stable mailing list