5#ifndef _RTE_CMP_GENERIC_H_
6#define _RTE_CMP_GENERIC_H_
10rte_hash_k16_cmp_eq(
const void *key1,
const void *key2,
size_t key_len
__rte_unused)
13 const unaligned_uint64_t *k1 = key1;
14 const unaligned_uint64_t *k2 = key2;
16 return !!((k1[0] ^ k2[0]) | (k1[1] ^ k2[1]));
18 const unaligned_uint32_t *k1 = key1;
19 const unaligned_uint32_t *k2 = key2;
21 return !!((k1[0] ^ k2[0]) | (k1[1] ^ k2[1]) |
22 (k1[2] ^ k2[2]) | (k1[3] ^ k2[3]));
28rte_hash_k32_cmp_eq(
const void *key1,
const void *key2,
size_t key_len)
30 return rte_hash_k16_cmp_eq(key1, key2, key_len) |
31 rte_hash_k16_cmp_eq((
const uint8_t *) key1 + 16,
32 (
const uint8_t *) key2 + 16, key_len);