|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
15 #undef CLIB_CUCKOO_TYPE
17 #define CLIB_CUCKOO_TYPE _16_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_16_8_h__
24 #define __included_cuckoo_16_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[0] == ~0ULL && v->
value == ~0ULL)
80 s =
format (s,
" -- empty -- ");
93 #ifdef clib_crc32c_uses_intrinsics
94 return clib_crc32c ((
u8 *) v->
key, 16);
108 #if defined(CLIB_HAVE_VEC128) && defined(CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE)
110 v = u64x2_load_unaligned (
a) ^ u64x2_load_unaligned (
b);
111 return u64x2_is_all_zero (v);
113 return ((
a[0] ^
b[0]) | (
a[1] ^
b[1])) == 0;
117 #undef __included_cuckoo_template_h__
static int clib_cuckoo_kv_is_free_16_8(const clib_cuckoo_kv_16_8_t *v)
Decide if a clib_cuckoo_kv_16_8_t instance is free.
8 octet key, 8 octet key value pair
epu8_epi32 epu16_epi32 u64x2
static u8 * format_cuckoo_kvp_16_8(u8 *s, va_list *args)
Format a clib_cuckoo_kv_16_8_t instance.
static void clib_cuckoo_kv_set_free_16_8(clib_cuckoo_kv_16_8_t *v)
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
static int clib_cuckoo_key_compare_16_8(u64 *a, u64 *b)
Compare two clib_cuckoo_kv_16_8_t instances.
static u64 clib_xxhash(u64 key)
description fragment has unexpected format
static u64 clib_cuckoo_hash_16_8(clib_cuckoo_kv_16_8_t *v)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)