X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fbihash_8_8.h;h=604cf30808f01ff01bcdb35f8aa2d85568c3a38f;hb=2af0e3a;hp=d70da5966e210965790f75ec179ac484320f3e32;hpb=5e6b9580f202188cbe158368bdbe35c3f39973d7;p=vpp.git diff --git a/src/vppinfra/bihash_8_8.h b/src/vppinfra/bihash_8_8.h index d70da5966e2..604cf30808f 100644 --- a/src/vppinfra/bihash_8_8.h +++ b/src/vppinfra/bihash_8_8.h @@ -13,6 +13,7 @@ * limitations under the License. */ #undef BIHASH_TYPE +#undef BIHASH_KVP_PER_PAGE #define BIHASH_TYPE _8_8 #define BIHASH_KVP_PER_PAGE 4 @@ -24,10 +25,7 @@ #include #include #include - -#if __SSE4_2__ -#include -#endif +#include /** 8 octet key, 8 octet key value pair */ typedef struct @@ -54,8 +52,8 @@ static inline u64 clib_bihash_hash_8_8 (clib_bihash_kv_8_8_t * v) { /* Note: to torture-test linear scan, make this fn return a constant */ -#if __SSE4_2__ - return _mm_crc32_u64 (0, v->key); +#ifdef clib_crc32c_uses_intrinsics + return clib_crc32c ((u8 *) & v->key, 8); #else return clib_xxhash (v->key); #endif