FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
qhash.h File Reference
+ Include dependency graph for qhash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  qhash_t
 

Macros

#define QHASH_LOG2_KEYS_PER_BUCKET   2
 
#define QHASH_KEYS_PER_BUCKET   (1 << QHASH_LOG2_KEYS_PER_BUCKET)
 
#define qhash_resize(v, n)   (v) = _qhash_resize ((v), (n), sizeof ((v)[0]))
 
#define qhash_foreach(var, v, body)
 
#define qhash_set_multiple(v, keys, n, results)   (v) = _qhash_set_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))
 
#define qhash_unset_multiple(v, keys, n, results)   _qhash_unset_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))
 
#define qhash_get(v, key)
 
#define qhash_set(v, k)
 
#define qhash_unset(v, k)
 

Functions

static qhash_tqhash_header (void *v)
 
static uword qhash_elts (void *v)
 
static uword qhash_n_overflow (void *v)
 
static uword qhash_hash_mix (qhash_t *h, uword key)
 
void qhash_get_multiple (void *v, uword *search_keys, uword n_search_keys, u32 *result_indices)
 
u32 qhash_get_first_match (void *v, uword *search_keys, uword n_search_keys, uword *matching_key)
 

Macro Definition Documentation

◆ qhash_foreach

#define qhash_foreach (   var,
  v,
  body 
)

Definition at line 107 of file qhash.h.

◆ qhash_get

#define qhash_get (   v,
  key 
)
Value:
({ \
uword _qhash_get_k = (key); \
qhash_get_first_match ((v), &_qhash_get_k, 1, &_qhash_get_k); \
})

Definition at line 115 of file qhash.h.

◆ QHASH_KEYS_PER_BUCKET

#define QHASH_KEYS_PER_BUCKET   (1 << QHASH_LOG2_KEYS_PER_BUCKET)

Definition at line 84 of file qhash.h.

◆ QHASH_LOG2_KEYS_PER_BUCKET

#define QHASH_LOG2_KEYS_PER_BUCKET   2

Definition at line 83 of file qhash.h.

◆ qhash_resize

#define qhash_resize (   v,
 
)    (v) = _qhash_resize ((v), (n), sizeof ((v)[0]))

Definition at line 105 of file qhash.h.

◆ qhash_set

#define qhash_set (   v,
 
)
Value:
({ \
uword _qhash_set_k = (k); \
qhash_set_multiple ((v), &_qhash_set_k, 1, &_qhash_set_k); \
_qhash_set_k; \
})

Definition at line 121 of file qhash.h.

◆ qhash_set_multiple

#define qhash_set_multiple (   v,
  keys,
  n,
  results 
)    (v) = _qhash_set_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))

Definition at line 109 of file qhash.h.

◆ qhash_unset

#define qhash_unset (   v,
 
)
Value:
({ \
uword _qhash_unset_k = (k); \
qhash_unset_multiple ((v), &_qhash_unset_k, 1, &_qhash_unset_k); \
_qhash_unset_k; \
})

Definition at line 128 of file qhash.h.

◆ qhash_unset_multiple

#define qhash_unset_multiple (   v,
  keys,
  n,
  results 
)    _qhash_unset_multiple ((v), sizeof ((v)[0]), (keys), (n), (results))

Definition at line 112 of file qhash.h.

Function Documentation

◆ qhash_elts()

static uword qhash_elts ( void *  v)
inlinestatic

Definition at line 72 of file qhash.h.

+ Here is the call graph for this function:

◆ qhash_get_first_match()

u32 qhash_get_first_match ( void *  v,
uword search_keys,
uword  n_search_keys,
uword matching_key 
)

Definition at line 245 of file qhash.c.

+ Here is the call graph for this function:

◆ qhash_get_multiple()

void qhash_get_multiple ( void *  v,
uword search_keys,
uword  n_search_keys,
u32 result_indices 
)

Definition at line 115 of file qhash.c.

+ Here is the call graph for this function:

◆ qhash_hash_mix()

static uword qhash_hash_mix ( qhash_t h,
uword  key 
)
inlinestatic

Definition at line 87 of file qhash.h.

+ Here is the call graph for this function:

◆ qhash_header()

static qhash_t* qhash_header ( void *  v)
inlinestatic

Definition at line 66 of file qhash.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qhash_n_overflow()

static uword qhash_n_overflow ( void *  v)
inlinestatic

Definition at line 78 of file qhash.h.

+ Here is the call graph for this function:
key
typedef key
Definition: ipsec_types.api:88