[PATCH 1/2] net/mlx5/hws: fix order of destroying default tables

Dariusz Sosnowski dsosnowski at nvidia.com
Wed Nov 9 10:54:30 CET 2022


From: Erez Shitrit <erezsh at nvidia.com>

This patch fixes the order dereferencing default FDB miss table and
destroying the flow table object. Flow table should be destroyed
before the dereference.

Fixes: 394cc7ba4033 ("net/mlx5/hws: add table object")
Cc: valex at nvidia.com

Signed-off-by: Erez Shitrit <erezsh at nvidia.com>
Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Reviewed-by: Alex Vesker <valex at nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_table.c b/drivers/net/mlx5/hws/mlx5dr_table.c
index d3f77e4780..33052abce8 100644
--- a/drivers/net/mlx5/hws/mlx5dr_table.c
+++ b/drivers/net/mlx5/hws/mlx5dr_table.c
@@ -131,8 +131,8 @@ mlx5dr_table_create_default_ft(struct mlx5dr_table *tbl)
 void mlx5dr_table_destroy_default_ft(struct mlx5dr_table *tbl,
 				     struct mlx5dr_devx_obj *ft_obj)
 {
-	mlx5dr_table_down_default_fdb_miss_tbl(tbl);
 	mlx5dr_cmd_destroy_obj(ft_obj);
+	mlx5dr_table_down_default_fdb_miss_tbl(tbl);
 }
 
 static int mlx5dr_table_init(struct mlx5dr_table *tbl)
-- 
2.25.1



More information about the dev mailing list