15 #undef CLIB_CUCKOO_TYPE 17 #define CLIB_CUCKOO_TYPE _8_8 18 #define CLIB_CUCKOO_KVP_PER_BUCKET (4) 19 #define CLIB_CUCKOO_LOG2_KVP_PER_BUCKET (2) 20 #define CLIB_CUCKOO_BFS_MAX_STEPS (2000) 21 #define CLIB_CUCKOO_BFS_MAX_PATH_LENGTH (8) 23 #ifndef __included_cuckoo_8_8_h__ 24 #define __included_cuckoo_8_8_h__ 33 #undef CLIB_CUCKOO_OPTIMIZE_PREFETCH 34 #undef CLIB_CUCKOO_OPTIMIZE_UNROLL 35 #undef CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 36 #define CLIB_CUCKOO_OPTIMIZE_PREFETCH 1 37 #define CLIB_CUCKOO_OPTIMIZE_UNROLL 1 38 #define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1 40 #if __SSE4_2__ && !defined (__i386__) 41 #include <x86intrin.h> 57 if (v->
key == ~0ULL && v->
value == ~0ULL)
80 s =
format (s,
" -- empty -- ");
92 #if defined(clib_crc32c_uses_intrinsics) && !defined (__i386__) 93 return crc32_u64 (0, v->
key);
109 #undef __included_cuckoo_template_h__
Fixed length block allocator.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static u64 clib_xxhash(u64 key)
static int clib_cuckoo_key_compare_8_8(u64 a, u64 b)
Compare two clib_cuckoo_kv_8_8_t instances.
static u64 clib_cuckoo_hash_8_8(clib_cuckoo_kv_8_8_t *v)
8 octet key, 8 octet key value pair
static void clib_cuckoo_kv_set_free_8_8(clib_cuckoo_kv_8_8_t *v)
static int clib_cuckoo_kv_is_free_8_8(const clib_cuckoo_kv_8_8_t *v)
Decide if a clib_cuckoo_kv_8_8_t instance is free.
static u8 * format_cuckoo_kvp_8_8(u8 *s, va_list *args)
Format a clib_cuckoo_kv_8_8_t instance.