rte_swx: fix typo

Message ID 20210524085341.15184-1-thierry.herbelot@6wind.com (mailing list archive)
State Superseded, archived
Headers
Series rte_swx: fix typo |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-abi-testing success Testing PASS
ci/github-robot success github build: passed
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-mellanox-Performance fail Performance Testing issues
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Thierry Herbelot May 24, 2021, 8:53 a.m. UTC
  Check Bucket key for all possible indices.

Fixes: d0a00966618ba ("table: add exact match SWX table")
Cc: stable@dpdk.org
Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 lib/table/rte_swx_table_em.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Cristian Dumitrescu May 24, 2021, 11:25 a.m. UTC | #1
> -----Original Message-----
> From: Thierry Herbelot <thierry.herbelot@6wind.com>
> Sent: Monday, May 24, 2021 9:54 AM
> To: dev@dpdk.org
> Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; Thomas Monjalon
> <thomas@monjalon.net>; stable@dpdk.org; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>
> Subject: [PATCH] rte_swx: fix typo
> 
> Check Bucket key for all possible indices.
> 
> Fixes: d0a00966618ba ("table: add exact match SWX table")
> Cc: stable@dpdk.org
> Cc: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> 
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> ---
>  lib/table/rte_swx_table_em.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/table/rte_swx_table_em.c b/lib/table/rte_swx_table_em.c
> index 788e25f6b912..03b28c4c9da0 100644
> --- a/lib/table/rte_swx_table_em.c
> +++ b/lib/table/rte_swx_table_em.c
> @@ -280,7 +280,7 @@ table_key_data(struct table *t, uint32_t key_id)
>  static inline int
>  bkt_is_empty(struct bucket_extension *bkt)
>  {
> -	return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[2])
> ?
> +	return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[3])
> ?
>  		1 : 0;
>  }
> 
> --
> 2.29.2

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Thanks very much, Thierry!

It would be great though if we could send a V2 with "table" instead of "rte_swx" in the title:
	[PATCH] table: fix typo
  

Patch

diff --git a/lib/table/rte_swx_table_em.c b/lib/table/rte_swx_table_em.c
index 788e25f6b912..03b28c4c9da0 100644
--- a/lib/table/rte_swx_table_em.c
+++ b/lib/table/rte_swx_table_em.c
@@ -280,7 +280,7 @@  table_key_data(struct table *t, uint32_t key_id)
 static inline int
 bkt_is_empty(struct bucket_extension *bkt)
 {
-	return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[2]) ?
+	return (!bkt->sig[0] && !bkt->sig[1] && !bkt->sig[2] && !bkt->sig[3]) ?
 		1 : 0;
 }