From: Jerin Jacob Date: Mon, 23 Nov 2015 18:45:37 +0000 (+0530) Subject: hash: select CRC hash if armv8-a CRC extension available X-Git-Tag: spdx-start~7944 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3e3a1a4fc4295485b214c9690456248c74566908;p=dpdk.git hash: select CRC hash if armv8-a CRC extension available select hash function for cuckoo, fbk as rte_hash_crc_4byte if arm64-CRC extension available Signed-off-by: Jerin Jacob --- diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index e6520ddde5..88f77c307c 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -85,7 +85,7 @@ EAL_REGISTER_TAILQ(rte_hash_tailq) #endif /* Hash function used if none is specified */ -#ifdef RTE_MACHINE_CPUFLAG_SSE4_2 +#if defined(RTE_MACHINE_CPUFLAG_SSE4_2) || defined(RTE_MACHINE_CPUFLAG_CRC32) #include #define DEFAULT_HASH_FUNC rte_hash_crc #else diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_hash.h index c9b5a6a63b..a430961d0e 100644 --- a/lib/librte_hash/rte_fbk_hash.h +++ b/lib/librte_hash/rte_fbk_hash.h @@ -55,7 +55,7 @@ extern "C" { #include #ifndef RTE_FBK_HASH_FUNC_DEFAULT -#ifdef RTE_MACHINE_CPUFLAG_SSE4_2 +#if defined(RTE_MACHINE_CPUFLAG_SSE4_2) || defined(RTE_MACHINE_CPUFLAG_CRC32) #include /** Default four-byte key hash function if none is specified. */ #define RTE_FBK_HASH_FUNC_DEFAULT rte_hash_crc_4byte