net/mlx5: remove unneeded SQ null checking
PATCH 1/1 net/mlx5: remove unneeded SQ null checking
The ASO SQ is a dynamic array in the ASO pool struct. That means the checking of the SQ pointer is incorrect and not needed. And the mlx5_aso_destroy_sq() function internally also checks if inside the SQ any resources need to be released or not. There is no need to have that extra checking.
This commit removes the redundant checking code.
--- drivers/net/mlx5/mlx5_flow_aso.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_flow_aso.c +2 -4
@@ -328,8 +328,7 @@ mlx5_aso_mtr_queue_init(struct mlx5_dev_ctx_shared *sh,return 0 ; error:do { -if (&hws_pool->sq[i]) -mlx5_aso_destroy_sq (hws_pool->sq + i); +mlx5_aso_destroy_sq (hws_pool->sq + i); }while (i--);return -1 ; }
@@ -1149,8 +1148,7 @@ mlx5_aso_ct_queue_init(struct mlx5_dev_ctx_shared *sh,do {if (ct_mng->aso_sqs[i].mr.addr)mlx5_aso_dereg_mr (sh->cdev, &ct_mng->aso_sqs[i].mr); -if (&ct_mng->aso_sqs[i]) -mlx5_aso_destroy_sq (&ct_mng->aso_sqs[i]); +mlx5_aso_destroy_sq (&ct_mng->aso_sqs[i]); }while (i--); ct_mng->nb_sq =0 ;return -1 ;
Signature · 1 line
2.25.1
Hi,
Quoted 14 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Wednesday, October 26, 2022 9:33 AM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>
Subject: [PATCH] net/mlx5: remove unneeded SQ null checkingThe ASO SQ is a dynamic array in the ASO pool struct. That means the checking of the SQ pointer is incorrect and not needed. And the
mlx5_aso_destroy_sq()function internally also checks if inside the SQ any resources need to be released or not. There is no need to have that extra checking.
Quoted 7 lines
This commit removes the redundant checking code.
Fixes aa90929cd5db ("net/mlx5: add HW steering connection trackingsupport")
Signed-off-by Suanming Mou <[email protected]>Acked-by Matan Azrad <[email protected]>
Squashed into relevant commit into next-net-mlx,
Kindest regards,
Raslan Darawsheh