36 rte_hash_k16_cmp_eq(
const void *key1,
const void *key2,
size_t key_len
__rte_unused)
38 const __m128i k1 = _mm_loadu_si128((
const __m128i *) key1);
39 const __m128i k2 = _mm_loadu_si128((
const __m128i *) key2);
40 const __m128i x = _mm_xor_si128(k1, k2);
42 return !_mm_test_all_zeros(x, x);
46 rte_hash_k32_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
48 return rte_hash_k16_cmp_eq(key1, key2, key_len) ||
49 rte_hash_k16_cmp_eq((
const char *) key1 + 16,
50 (
const char *) key2 + 16, key_len);
54 rte_hash_k48_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
56 return rte_hash_k16_cmp_eq(key1, key2, key_len) ||
57 rte_hash_k16_cmp_eq((
const char *) key1 + 16,
58 (
const char *) key2 + 16, key_len) ||
59 rte_hash_k16_cmp_eq((
const char *) key1 + 32,
60 (
const char *) key2 + 32, key_len);
64 rte_hash_k64_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
66 return rte_hash_k32_cmp_eq(key1, key2, key_len) ||
67 rte_hash_k32_cmp_eq((
const char *) key1 + 32,
68 (
const char *) key2 + 32, key_len);
72 rte_hash_k80_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
74 return rte_hash_k64_cmp_eq(key1, key2, key_len) ||
75 rte_hash_k16_cmp_eq((
const char *) key1 + 64,
76 (
const char *) key2 + 64, key_len);
80 rte_hash_k96_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
82 return rte_hash_k64_cmp_eq(key1, key2, key_len) ||
83 rte_hash_k32_cmp_eq((
const char *) key1 + 64,
84 (
const char *) key2 + 64, key_len);
88 rte_hash_k112_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
90 return rte_hash_k64_cmp_eq(key1, key2, key_len) ||
91 rte_hash_k32_cmp_eq((
const char *) key1 + 64,
92 (
const char *) key2 + 64, key_len) ||
93 rte_hash_k16_cmp_eq((
const char *) key1 + 96,
94 (
const char *) key2 + 96, key_len);
98 rte_hash_k128_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
100 return rte_hash_k64_cmp_eq(key1, key2, key_len) ||
101 rte_hash_k64_cmp_eq((
const char *) key1 + 64,
102 (
const char *) key2 + 64, key_len);