hash: use x86 common flag for jhash

Message ID 20201022075959.19638-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series hash: use x86 common flag for jhash |

Checks

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

Commit Message

David Marchand Oct. 22, 2020, 7:59 a.m. UTC
  jhash has been forgotten when factorising the x86 arch check.

Fixes: dbf17d44f375 ("hash: use common x86 flag")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_hash/rte_jhash.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson Oct. 22, 2020, 8:22 a.m. UTC | #1
On Thu, Oct 22, 2020 at 09:59:59AM +0200, David Marchand wrote:
> jhash has been forgotten when factorising the x86 arch check.
> 
> Fixes: dbf17d44f375 ("hash: use common x86 flag")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  lib/librte_hash/rte_jhash.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h
> index 7a1eeff74e..f2446f081e 100644
> --- a/lib/librte_hash/rte_jhash.h
> +++ b/lib/librte_hash/rte_jhash.h
> @@ -91,7 +91,7 @@ __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc,
>  	 * Check key alignment. For x86 architecture, first case is always optimal
>  	 * If check_align is not set, first case will be used
>  	 */
> -#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32)
> +#if defined(RTE_ARCH_X86)
>  	const uint32_t *k = (const uint32_t *)key;

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
David Marchand Oct. 22, 2020, 8:08 p.m. UTC | #2
On Thu, Oct 22, 2020 at 10:23 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Thu, Oct 22, 2020 at 09:59:59AM +0200, David Marchand wrote:
> > jhash has been forgotten when factorising the x86 arch check.
> >
> > Fixes: dbf17d44f375 ("hash: use common x86 flag")
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied.
  

Patch

diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h
index 7a1eeff74e..f2446f081e 100644
--- a/lib/librte_hash/rte_jhash.h
+++ b/lib/librte_hash/rte_jhash.h
@@ -91,7 +91,7 @@  __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc,
 	 * Check key alignment. For x86 architecture, first case is always optimal
 	 * If check_align is not set, first case will be used
 	 */
-#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32)
+#if defined(RTE_ARCH_X86)
 	const uint32_t *k = (const uint32_t *)key;
 	const uint32_t s = 0;
 #else