[PATCH v3 1/7] net/mlx5/hws: fix bug in matcher disconnect error flow
Maayan Kashani
mkashani at nvidia.com
Mon Jun 3 12:56:28 CEST 2024
From: Yevgeny Kliteynik <kliteyn at nvidia.com>
If error happens during disconnect of the first matcher in the
list, the matcher should be reconnected back as the first matcher.
Fixes: b81f95ca770d ("net/mlx5/hws: support default miss table")
Cc: stable at dpdk.org
Signed-off-by: Yevgeny Kliteynik <kliteyn at nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_matcher.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 79e7401dfd..2a84145566 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -340,7 +340,7 @@ static int mlx5dr_matcher_disconnect(struct mlx5dr_matcher *matcher)
return 0;
matcher_reconnect:
- if (LIST_EMPTY(&tbl->head))
+ if (LIST_EMPTY(&tbl->head) || prev_matcher == matcher)
LIST_INSERT_HEAD(&matcher->tbl->head, matcher, next);
else
LIST_INSERT_AFTER(prev_matcher, matcher, next);
--
2.25.1
More information about the dev
mailing list