common/mlx5: fix list unused lcore check
PATCH 1/1 common/mlx5: fix list unused lcore check
While non-lcore list operations were supported, non-lcore index will be converted to MLX5_LIST_NLCORE. In that case, no need to check the lcore index be -1 or not anymore.
This commit removes the unused lcore check in list.
--- drivers/common/mlx5/mlx5_common_utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/common/mlx5/mlx5_common_utils.c +1 -3
@@ -293,11 +293,9 @@ _mlx5_list_unregister(struct mlx5_list_inconst *l_inconst, l_const->cb_clone_free (l_const->ctx, entry); else l_const->cb_remove(l_const->ctx, entry); - }else if (likely (lcore_idx !=-1 )) { + }else {__atomic_add_fetch (&l_inconst->cache[entry->lcore_idx]->inv_cnt,1 , __ATOMIC_RELAXED); - }else { -return 0 ; }if (!l_const->lcores_share) {__atomic_sub_fetch (&l_inconst->count,1 , __ATOMIC_RELAXED);
Signature · 1 line
2.25.1
Hi,
Quoted 13 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Tuesday, May 31, 2022 4:26 AM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: Raslan Darawsheh <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] common/mlx5: fix list unused lcore checkWhile non-lcore list operations were supported, non-lcore index will be converted to
MLX5_LIST_NLCORE. In that case, no need to check the lcore index be -1 or not anymore.
Quoted 7 lines
This commit removes the unused lcore check in list.
Fixes 7e1cf892711b ("common/mlx5: support list non-lcore operations")Signed-off-by Suanming Mou <[email protected]>Acked-by Matan Azrad <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh