|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #error do not #include this file!
131 (clib_bihash *
h,
u64 hash, clib_bihash_kv * in_out_kv);
167 (clib_bihash *
h, clib_bihash_kv * search_key, clib_bihash_kv * valuep);
187 * callback,
void *arg);
void clib_bihash_prefetch_data(clib_bihash *h, u64 hash)
Prefetch bi-hash (key,value) data given a hash code.
#define BIHASH_KVP_PER_PAGE
clib_bihash_value * next_free
used when a KVP page (or block thereof) is on a freelist
static void * clib_bihash_get_value(clib_bihash *h, uword offset)
Get pointer to value page given its clib mheap offset.
int clib_bihash_search_inline(clib_bihash *h, clib_bihash_kv *in_out_kv)
Search a bi-hash table.
int clib_bihash_search_inline_2(clib_bihash *h, clib_bihash_kv *search_key, clib_bihash_kv *valuep)
Search a bi-hash table.
static uword clib_bihash_get_offset(clib_bihash *h, void *v)
Get clib mheap offset given a pointer.
void clib_bihash_init(clib_bihash *h, char *name, u32 nbuckets, uword memory_size)
initialize a bounded index extensible hash table
clib_bihash_bucket_t saved_bucket
Saved bucket pointer.
struct clib_bihash_value offset
template key/value backing page structure
void clib_bihash_prefetch_bucket(clib_bihash *h, u64 hash)
Prefetch a bi-hash bucket given a hash code.
void clib_bihash_free(clib_bihash *h)
Destroy a bounded index extensible hash table.
volatile u32 * writer_lock
Writer lock, in its own cache line.
BVT(clib_bihash)
The table of adjacencies indexed by the rewrite string.
u32 log2_nbuckets
lg(nbuckets)
uword alloc_arena_next
first available mem chunk
template key/value backing page structure
uword alloc_arena_size
size of the arena
int clib_bihash_add_del(clib_bihash *h, clib_bihash_kv *add_v, int is_add)
Add or delete a (key,value) pair from a bi-hash table.
A bounded index extensible hash table.
clib_bihash_kv kvp[BIHASH_KVP_PER_PAGE]
the actual key/value pairs
uword alloc_arena
memory allocation arena
void clib_bihash_foreach_key_value_pair(clib_bihash *h, clib_bihash_foreach_key_value_pair_cb *callback, void *arg)
Visit active (key,value) pairs in a bi-hash table.
u32 nbuckets
Number of hash buckets.
int(* clib_bihash_foreach_key_value_pair_cb)(clib_bihash_kv *kv, void *ctx)
u8 pad[3]
log2 (size of the packing page block)
uword alloc_arena_mapped
size of mapped memory in the arena
int clib_bihash_search_inline_with_hash(clib_bihash *h, u64 hash, clib_bihash_kv *in_out_kv)
Search a bi-hash table, use supplied hash code.
clib_bihash_bucket_t * buckets
Hash bucket vector, power-of-two in size.