net/mlx5: fix invalid entry assert

Message ID 1604631741-128270-1-git-send-email-suanmingm@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: fix invalid entry assert |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Suanming Mou Nov. 6, 2020, 3:02 a.m. UTC
  The entry variable assert in the mlx5_hlist_register() function is not
correct. Remove the invalid entry variable.

Fixes: e69a59227db0 ("net/mlx5: support concurrent access for hash list")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Slava Ovsiienko Nov. 6, 2020, 5:41 p.m. UTC | #1
> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Sent: Friday, November 6, 2020 5:02
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad
> <matan@nvidia.com>
> Cc: Raslan Darawsheh <rasland@nvidia.com>; dev@dpdk.org
> Subject: [PATCH] net/mlx5: fix invalid entry assert
> 
> The entry variable assert in the mlx5_hlist_register() function is not correct.
> Remove the invalid entry variable.
> 
> Fixes: e69a59227db0 ("net/mlx5: support concurrent access for hash list")
> 
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

> ---
>  drivers/net/mlx5/mlx5_utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c index
> 13590dd..9889437 100644
> --- a/drivers/net/mlx5/mlx5_utils.c
> +++ b/drivers/net/mlx5/mlx5_utils.c
> @@ -132,7 +132,7 @@ struct mlx5_hlist_entry*
>  	struct mlx5_hlist_entry *entry;
>  	uint32_t prev_gen_cnt = 0;
> 
> -	MLX5_ASSERT(h && entry);
> +	MLX5_ASSERT(h);
>  	/* Use write lock directly for write-most list. */
>  	if (!h->write_most) {
>  		prev_gen_cnt = __atomic_load_n(&h->gen_cnt,
> __ATOMIC_ACQUIRE);
> --
> 1.8.3.1
  
Raslan Darawsheh Nov. 9, 2020, 8:21 a.m. UTC | #2
Hi,

> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Sent: Friday, November 6, 2020 5:02 AM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad
> <matan@nvidia.com>
> Cc: Raslan Darawsheh <rasland@nvidia.com>; dev@dpdk.org
> Subject: [PATCH] net/mlx5: fix invalid entry assert
> 
> The entry variable assert in the mlx5_hlist_register() function is not
> correct. Remove the invalid entry variable.
> 
> Fixes: e69a59227db0 ("net/mlx5: support concurrent access for hash list")
> 
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> ---
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index 13590dd..9889437 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -132,7 +132,7 @@  struct mlx5_hlist_entry*
 	struct mlx5_hlist_entry *entry;
 	uint32_t prev_gen_cnt = 0;
 
-	MLX5_ASSERT(h && entry);
+	MLX5_ASSERT(h);
 	/* Use write lock directly for write-most list. */
 	if (!h->write_most) {
 		prev_gen_cnt = __atomic_load_n(&h->gen_cnt, __ATOMIC_ACQUIRE);