FD.io VPP
v18.01-8-g0eacf49
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | clib_cuckoo_path_t |
struct | CVT |
Macros | |
#define | CV(a) __cv (a, CLIB_CUCKOO_TYPE) |
#define | CVT(a) __cvt (a, CLIB_CUCKOO_TYPE) |
#define | CLIB_CUCKOO_USE_COUNT_BIT_WIDTH (1 + CLIB_CUCKOO_LOG2_KVP_PER_BUCKET) |
#define | PATH_BITS_REQ (CLIB_CUCKOO_BFS_MAX_PATH_LENGTH * CLIB_CUCKOO_LOG2_KVP_PER_BUCKET) |
#define | clib_cuckoo_bucket_foreach_idx(var) for (var = 0; var < CLIB_CUCKOO_KVP_PER_BUCKET; var++) |
#define | clib_cuckoo_bucket_foreach_idx_unrolled(var, body) |
#define | clib_cuckoo_bucket_foreach_elt_index(var, bucket) for (var = 0; var < CLIB_CUCKOO_KVP_PER_BUCKET; ++i) |
#define | clib_cuckoo_foreach_bucket(var, h, body) |
Typedefs | |
typedef u64 | clib_cuckoo_bucket_aux_t |
typedef u8 | path_data_t |
#define clib_cuckoo_bucket_foreach_elt_index | ( | var, | |
bucket | |||
) | for (var = 0; var < CLIB_CUCKOO_KVP_PER_BUCKET; ++i) |
Definition at line 232 of file cuckoo_template.h.
#define clib_cuckoo_bucket_foreach_idx | ( | var | ) | for (var = 0; var < CLIB_CUCKOO_KVP_PER_BUCKET; var++) |
Definition at line 167 of file cuckoo_template.h.
#define clib_cuckoo_bucket_foreach_idx_unrolled | ( | var, | |
body | |||
) |
Definition at line 225 of file cuckoo_template.h.
#define clib_cuckoo_foreach_bucket | ( | var, | |
h, | |||
body | |||
) |
Definition at line 235 of file cuckoo_template.h.
#define CLIB_CUCKOO_USE_COUNT_BIT_WIDTH (1 + CLIB_CUCKOO_LOG2_KVP_PER_BUCKET) |
Definition at line 74 of file cuckoo_template.h.
#define CV | ( | a | ) | __cv (a, CLIB_CUCKOO_TYPE) |
Definition at line 66 of file cuckoo_template.h.
#define CVT | ( | a | ) | __cvt (a, CLIB_CUCKOO_TYPE) |
Definition at line 70 of file cuckoo_template.h.
#define PATH_BITS_REQ (CLIB_CUCKOO_BFS_MAX_PATH_LENGTH * CLIB_CUCKOO_LOG2_KVP_PER_BUCKET) |
Definition at line 128 of file cuckoo_template.h.
typedef u64 clib_cuckoo_bucket_aux_t |
Definition at line 72 of file cuckoo_template.h.
typedef u8 path_data_t |
Definition at line 132 of file cuckoo_template.h.
Definition at line 822 of file cuckoo_template.c.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 111 of file cuckoo_template.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
search for key within bucket
Definition at line 358 of file cuckoo_template.h.
|
inlinestatic |
Definition at line 332 of file cuckoo_template.h.
perform garbage collection
this function assumes there is no other thread touching the cuckoo hash, not even a reader, it's meant to be called from main thread in a stop-the-world situation
Definition at line 696 of file cuckoo_template.c.
void CV() clib_cuckoo_init | ( | CVT(clib_cuckoo)* | h, |
const char * | name, | ||
u64 | nbuckets, | ||
void(*)(CVT(clib_cuckoo)*, void *) | garbage_callback, | ||
void * | garbage_ctx | ||
) |
Definition at line 165 of file cuckoo_template.c.
int CV() clib_cuckoo_search | ( | CVT(clib_cuckoo)* | h, |
CVT(clib_cuckoo_kv)* | search_v, | ||
CVT(clib_cuckoo_kv)* | return_v | ||
) |
Definition at line 26 of file cuckoo_template.c.
|
inlinestatic |
Definition at line 409 of file cuckoo_template.h.
struct CV | ( | clib_cuckoo | ) |
vector of elements containing key-value pairs and auxiliary data
garbage to be freed once its safe to do so ..
hash table name
pool of cuckoo paths (reused when doing bfd search)
vector used as queue when doing cuckoo path searches - holds offsets in paths pool
writer lock - whether this lock is taken or not has zero effect on readers
caller context passed to callback with garbage notification
garbage notify function - called when some garbage needs to be collected in main thread while other threads are stopped
Definition at line 246 of file cuckoo_template.h.
format_function_t CV | ( | format_cuckoo | ) |
format_function_t CV | ( | format_cuckoo_kvp | ) |
CVT | ( | clib_cuckoo | ) |
STATIC_ASSERT | ( | CLIB_CUCKOO_KVP_PER_BUCKET | = =(1<< CLIB_CUCKOO_LOG2_KVP_PER_BUCKET) | ) |