FD.io VPP  v16.06
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

always_inline qhash_tqhash_header (void *v)
 
always_inline uword qhash_elts (void *v)
 
always_inline uword qhash_n_overflow (void *v)
 
always_inline 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 101 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); \
})
u32 qhash_get_first_match(void *v, uword *search_keys, uword n_search_keys, uword *matching_key)
Definition: qhash.c:243
u64 uword
Definition: types.h:112

Definition at line 109 of file qhash.h.

#define QHASH_KEYS_PER_BUCKET   (1 << QHASH_LOG2_KEYS_PER_BUCKET)

Definition at line 77 of file qhash.h.

#define QHASH_LOG2_KEYS_PER_BUCKET   2

Definition at line 76 of file qhash.h.

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

Definition at line 98 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; \
})
u64 uword
Definition: types.h:112
#define qhash_set_multiple(v, keys, n, results)
Definition: qhash.h:103

Definition at line 115 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 103 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 qhash_unset_multiple(v, keys, n, results)
Definition: qhash.h:106
u64 uword
Definition: types.h:112

Definition at line 122 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 106 of file qhash.h.

Function Documentation

always_inline uword qhash_elts ( void v)

Definition at line 69 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 243 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 113 of file qhash.c.

+ Here is the call graph for this function:

always_inline uword qhash_hash_mix ( qhash_t h,
uword  key 
)

Definition at line 80 of file qhash.h.

+ Here is the call graph for this function:

always_inline qhash_t* qhash_header ( void v)

Definition at line 65 of file qhash.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword qhash_n_overflow ( void v)

Definition at line 73 of file qhash.h.

+ Here is the call graph for this function: