patch 'net/mlx5/hws: set default miss when replacing table' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Fri Jul 12 13:01:38 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/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=2b25e7e741fd0b3a5a928abb542faafab422d6a9
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 2b25e7e741fd0b3a5a928abb542faafab422d6a9 Mon Sep 17 00:00:00 2001
From: Itamar Gozlan <igozlan at nvidia.com>
Date: Mon, 6 May 2024 14:44:16 +0300
Subject: [PATCH] net/mlx5/hws: set default miss when replacing table
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 4711950b04e2124e8d3796853cfd16bf22026ebc ]
Allowing the replacement of a miss table without enforcing
a previous disconnecting. This feature extension allows the
user to change the destination miss table when the system
runs without losing traffic.
Fixes: b81f95ca770d ("net/mlx5/hws: support default miss table")
Signed-off-by: Itamar Gozlan <igozlan at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_table.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_table.c b/drivers/net/mlx5/hws/mlx5dr_table.c
index 55b9b20150..ab73017ade 100644
--- a/drivers/net/mlx5/hws/mlx5dr_table.c
+++ b/drivers/net/mlx5/hws/mlx5dr_table.c
@@ -611,8 +611,7 @@ static int mlx5dr_table_set_default_miss_not_valid(struct mlx5dr_table *tbl,
if (mlx5dr_table_is_root(tbl) ||
(miss_tbl && mlx5dr_table_is_root(miss_tbl)) ||
- (miss_tbl && miss_tbl->type != tbl->type) ||
- (miss_tbl && tbl->default_miss.miss_tbl)) {
+ (miss_tbl && miss_tbl->type != tbl->type)) {
DR_LOG(ERR, "Invalid arguments");
rte_errno = EINVAL;
return -rte_errno;
@@ -625,6 +624,7 @@ int mlx5dr_table_set_default_miss(struct mlx5dr_table *tbl,
struct mlx5dr_table *miss_tbl)
{
struct mlx5dr_context *ctx = tbl->ctx;
+ struct mlx5dr_table *old_miss_tbl;
int ret;
ret = mlx5dr_table_set_default_miss_not_valid(tbl, miss_tbl);
@@ -632,15 +632,16 @@ int mlx5dr_table_set_default_miss(struct mlx5dr_table *tbl,
return ret;
pthread_spin_lock(&ctx->ctrl_lock);
-
+ old_miss_tbl = tbl->default_miss.miss_tbl;
ret = mlx5dr_table_connect_to_miss_table(tbl, miss_tbl);
if (ret)
goto out;
+ if (old_miss_tbl)
+ LIST_REMOVE(tbl, default_miss.next);
+
if (miss_tbl)
LIST_INSERT_HEAD(&miss_tbl->default_miss.head, tbl, default_miss.next);
- else
- LIST_REMOVE(tbl, default_miss.next);
pthread_spin_unlock(&ctx->ctrl_lock);
return 0;
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-12 18:40:17.999092060 +0800
+++ 0087-net-mlx5-hws-set-default-miss-when-replacing-table.patch 2024-07-12 18:40:14.246594210 +0800
@@ -1 +1 @@
-From 4711950b04e2124e8d3796853cfd16bf22026ebc Mon Sep 17 00:00:00 2001
+From 2b25e7e741fd0b3a5a928abb542faafab422d6a9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4711950b04e2124e8d3796853cfd16bf22026ebc ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list