FD.io VPP  v18.04-17-g3a0d853
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

#define qhash_foreach (   var,
  v,
  body 
)

Definition at line 107 of file qhash.h.

#define qhash_get (   v,
  key 
)
Value:
({ \
uword _qhash_get_k = (key); \
qhash_get_first_match ((v), &_qhash_get_k, 1, &_qhash_get_k); \
})
#define v
Definition: acl.c:495
u32 qhash_get_first_match(void *v, uword *search_keys, uword n_search_keys, uword *matching_key)
Definition: qhash.c:244
u64 uword
Definition: types.h:112

Definition at line 115 of file qhash.h.

#define QHASH_KEYS_PER_BUCKET   (1 << QHASH_LOG2_KEYS_PER_BUCKET)

Definition at line 84 of file qhash.h.

#define QHASH_LOG2_KEYS_PER_BUCKET   2

Definition at line 83 of file qhash.h.

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

Definition at line 105 of file qhash.h.

#define qhash_set (   v,
 
)
Value:
({ \
uword _qhash_set_k = (k); \
qhash_set_multiple ((v), &_qhash_set_k, 1, &_qhash_set_k); \
_qhash_set_k; \
})
#define v
Definition: acl.c:495
u64 uword
Definition: types.h:112
#define qhash_set_multiple(v, keys, n, results)
Definition: qhash.h:109

Definition at line 121 of file qhash.h.

#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.

#define qhash_unset (   v,
 
)
Value:
({ \
uword _qhash_unset_k = (k); \
qhash_unset_multiple ((v), &_qhash_unset_k, 1, &_qhash_unset_k); \
_qhash_unset_k; \
})
#define v
Definition: acl.c:495
#define qhash_unset_multiple(v, keys, n, results)
Definition: qhash.h:112
u64 uword
Definition: types.h:112

Definition at line 128 of file qhash.h.

#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

static uword qhash_elts ( void *  v)
inlinestatic

Definition at line 72 of file qhash.h.

+ Here is the call graph for this function:

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

Definition at line 244 of file qhash.c.

+ Here is the call graph for this function:

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:

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:

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:

static uword qhash_n_overflow ( void *  v)
inlinestatic

Definition at line 78 of file qhash.h.

+ Here is the call graph for this function: