|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
38 #ifndef included_qhash_h
39 #define included_qhash_h
83 #define QHASH_LOG2_KEYS_PER_BUCKET 2
84 #define QHASH_KEYS_PER_BUCKET (1 << QHASH_LOG2_KEYS_PER_BUCKET)
105 #define qhash_resize(v,n) (v) = _qhash_resize ((v), (n), sizeof ((v)[0]))
107 #define qhash_foreach(var,v,body)
109 #define qhash_set_multiple(v,keys,n,results) \
110 (v) = _qhash_set_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))
112 #define qhash_unset_multiple(v,keys,n,results) \
113 _qhash_unset_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))
115 #define qhash_get(v,key) \
117 uword _qhash_get_k = (key); \
118 qhash_get_first_match ((v), &_qhash_get_k, 1, &_qhash_get_k); \
121 #define qhash_set(v,k) \
123 uword _qhash_set_k = (k); \
124 qhash_set_multiple ((v), &_qhash_set_k, 1, &_qhash_set_k); \
128 #define qhash_unset(v,k) \
130 uword _qhash_unset_k = (k); \
131 qhash_unset_multiple ((v), &_qhash_unset_k, 1, &_qhash_unset_k); \
141 uword n_search_keys,
u32 * result_indices);
151 void *_qhash_set_multiple (
void *v,
154 uword n_search_keys,
u32 * result_indices);
156 _qhash_unset_multiple (
void *v,
159 uword n_search_keys,
u32 * result_indices);
static uword qhash_n_overflow(void *v)
static uword pow2_mask(uword x)
#define hash_mix32(a0, b0, c0)
static uword qhash_elts(void *v)
u32 qhash_get_first_match(void *v, uword *search_keys, uword n_search_keys, uword *matching_key)
static void * vec_header(void *v, uword header_bytes)
Find a user vector header.
static uword hash_elts(void *v)
void qhash_get_multiple(void *v, uword *search_keys, uword n_search_keys, u32 *result_indices)
static uword qhash_hash_mix(qhash_t *h, uword key)
u8 * hash_key_valid_bitmap
u32 * overflow_free_indices
static qhash_t * qhash_header(void *v)