FD.io VPP
v16.06
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | hash_header |
struct | hash_pair_t |
struct | hash_pair_indirect_t |
union | hash_pair_union_t |
struct | hash_next_t |
Macros | |
#define | HASH_FLAG_NO_AUTO_GROW (1 << 0) |
#define | HASH_FLAG_NO_AUTO_SHRINK (1 << 1) |
#define | HASH_FLAG_HASH_NEXT_IN_PROGRESS (1 << 2) |
#define | KEY_FUNC_NONE (0) /*< sum = key */ |
#define | KEY_FUNC_POINTER_UWORD (1) /*< sum = *(uword *) key */ |
#define | KEY_FUNC_POINTER_U32 (2) /*< sum = *(u32 *) key */ |
#define | KEY_FUNC_STRING (3) /*< sum = string_key_sum, etc. */ |
#define | LOG2_ALLOC_BITS (5) |
#define | PAIR_BITS (BITS (uword) - LOG2_ALLOC_BITS) |
#define | hash_set3(h, key, value, old_value) |
#define | hash_get(h, key) _hash_get ((h), (uword) (key)) |
#define | hash_get_pair(h, key) _hash_get_pair ((h), (uword) (key)) |
#define | hash_set(h, key, value) hash_set3(h,key,value,0) |
#define | hash_set1(h, key) (h) = _hash_set3(h,(uword) (key),0,0) |
#define | hash_unset(h, key) ((h) = _hash_unset ((h), (uword) (key),0)) |
#define | hash_unset3(h, key, old_value) ((h) = _hash_unset ((h), (uword) (key), (void *) (old_value))) |
#define | hash_get_mem(h, key) _hash_get ((h), pointer_to_uword (key)) |
#define | hash_get_pair_mem(h, key) _hash_get_pair ((h), pointer_to_uword (key)) |
#define | hash_set_mem(h, key, value) hash_set3 (h, pointer_to_uword (key), (value), 0) |
#define | hash_set1_mem(h, key) hash_set3 ((h), pointer_to_uword (key), 0, 0) |
#define | hash_unset_mem(h, key) ((h) = _hash_unset ((h), pointer_to_uword (key),0)) |
#define | hash_free(h) (h) = _hash_free ((h)) |
#define | hash_foreach_pair(p, v, body) |
#define | hash_foreach(key_var, value_var, h, body) |
#define | hash_foreach_mem(key_var, value_var, h, body) |
#define | hash_create2(_elts, _user, _value_bytes, _key_sum, _key_equal, _format_pair, _format_pair_arg) |
#define | hash_mix_step(a, b, c, s0, s1, s2) |
#define | hash_mix32_step_1(a, b, c) hash_mix_step(a,b,c,13,8,13) |
#define | hash_mix32_step_2(a, b, c) hash_mix_step(a,b,c,12,16,5) |
#define | hash_mix32_step_3(a, b, c) hash_mix_step(a,b,c,3,10,15) |
#define | hash_mix64_step_1(a, b, c) hash_mix_step(a,b,c,43,9,8) |
#define | hash_mix64_step_2(a, b, c) hash_mix_step(a,b,c,38,23,5) |
#define | hash_mix64_step_3(a, b, c) hash_mix_step(a,b,c,35,49,11) |
#define | hash_mix64_step_4(a, b, c) hash_mix_step(a,b,c,12,18,22) |
#define | hash_mix64(a0, b0, c0) |
#define | hash_mix32(a0, b0, c0) |
#define | hash_v3_mix32(a, b, c) |
#define | hash_v3_finalize32(a, b, c) |
#define | hash_v3_mix32_step1(a, b, c) |
#define | hash_v3_mix32_step2(a, b, c) |
#define | hash_v3_mix32_step3(a, b, c) |
#define | hash_v3_finalize32_step1(a, b, c) |
#define | hash_v3_finalize32_step2(a, b, c) |
#define | hash_v3_finalize32_step3(a, b, c) |
#define | hash_v3_mix_step_1_u32x(a, b, c) |
#define | hash_v3_mix_step_2_u32x(a, b, c) |
#define | hash_v3_finalize_step_1_u32x(a, b, c) |
#define | hash_v3_finalize_step_2_u32x(a, b, c) |
#define | hash_v3_mix_u32x(a, b, c) |
#define | hash_v3_finalize_u32x(a, b, c) |
#define | hash_create_mem(elts, key_bytes, value_bytes) hash_create2((elts),(key_bytes),(value_bytes),mem_key_sum,mem_key_equal,0,0) |
#define | hash_create_vec(elts, key_bytes, value_bytes) |
#define | hash_create_string(elts, value_bytes) |
#define | hash_create(elts, value_bytes) |
#define | hash_create_uword(elts, value_bytes) |
#define | hash_create_u32(elts, value_bytes) |
Typedefs | |
typedef uword( | hash_key_sum_function_t) (struct hash_header *, uword key) |
typedef uword( | hash_key_equal_function_t) (struct hash_header *, uword key1, uword key2) |
typedef struct hash_header | hash_t |
Variables | |
unformat_function_t | unformat_hash_vec_string |
unformat_function_t | unformat_hash_string |
#define hash_create | ( | elts, | |
value_bytes | |||
) |
#define hash_create2 | ( | _elts, | |
_user, | |||
_value_bytes, | |||
_key_sum, | |||
_key_equal, | |||
_format_pair, | |||
_format_pair_arg | |||
) |
#define hash_create_mem | ( | elts, | |
key_bytes, | |||
value_bytes | |||
) | hash_create2((elts),(key_bytes),(value_bytes),mem_key_sum,mem_key_equal,0,0) |
#define hash_create_string | ( | elts, | |
value_bytes | |||
) |
#define hash_create_u32 | ( | elts, | |
value_bytes | |||
) |
#define hash_create_uword | ( | elts, | |
value_bytes | |||
) |
#define hash_create_vec | ( | elts, | |
key_bytes, | |||
value_bytes | |||
) |
#define hash_foreach | ( | key_var, | |
value_var, | |||
h, | |||
body | |||
) |
#define hash_foreach_mem | ( | key_var, | |
value_var, | |||
h, | |||
body | |||
) |
#define hash_get_mem | ( | h, | |
key | |||
) | _hash_get ((h), pointer_to_uword (key)) |
#define hash_get_pair | ( | h, | |
key | |||
) | _hash_get_pair ((h), (uword) (key)) |
#define hash_get_pair_mem | ( | h, | |
key | |||
) | _hash_get_pair ((h), pointer_to_uword (key)) |
#define hash_mix32 | ( | a0, | |
b0, | |||
c0 | |||
) |
#define hash_mix32_step_1 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,13,8,13) |
#define hash_mix32_step_2 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,12,16,5) |
#define hash_mix32_step_3 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,3,10,15) |
#define hash_mix64 | ( | a0, | |
b0, | |||
c0 | |||
) |
#define hash_mix64_step_1 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,43,9,8) |
#define hash_mix64_step_2 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,38,23,5) |
#define hash_mix64_step_3 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,35,49,11) |
#define hash_mix64_step_4 | ( | a, | |
b, | |||
c | |||
) | hash_mix_step(a,b,c,12,18,22) |
#define hash_mix_step | ( | a, | |
b, | |||
c, | |||
s0, | |||
s1, | |||
s2 | |||
) |
#define hash_set1 | ( | h, | |
key | |||
) | (h) = _hash_set3(h,(uword) (key),0,0) |
#define hash_set1_mem | ( | h, | |
key | |||
) | hash_set3 ((h), pointer_to_uword (key), 0, 0) |
#define hash_set3 | ( | h, | |
key, | |||
value, | |||
old_value | |||
) |
#define hash_set_mem | ( | h, | |
key, | |||
value | |||
) | hash_set3 (h, pointer_to_uword (key), (value), 0) |
#define hash_unset | ( | h, | |
key | |||
) | ((h) = _hash_unset ((h), (uword) (key),0)) |
#define hash_unset_mem | ( | h, | |
key | |||
) | ((h) = _hash_unset ((h), pointer_to_uword (key),0)) |
#define hash_v3_finalize32 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize32_step1 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize32_step2 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize32_step3 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize_step_1_u32x | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize_step_2_u32x | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_finalize_u32x | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix32 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix32_step1 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix32_step2 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix32_step3 | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix_step_1_u32x | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix_step_2_u32x | ( | a, | |
b, | |||
c | |||
) |
#define hash_v3_mix_u32x | ( | a, | |
b, | |||
c | |||
) |
#define KEY_FUNC_POINTER_UWORD (1) /*< sum = *(uword *) key */ |
#define KEY_FUNC_STRING (3) /*< sum = string_key_sum, etc. */ |
#define PAIR_BITS (BITS (uword) - LOG2_ALLOC_BITS) |
typedef uword( hash_key_equal_function_t) (struct hash_header *, uword key1, uword key2) |
typedef uword( hash_key_sum_function_t) (struct hash_header *, uword key) |
typedef struct hash_header hash_t |
always_inline uword hash_capacity | ( | void * | v | ) |
always_inline uword hash_elts | ( | void * | v | ) |
always_inline void* hash_forward | ( | hash_t * | h, |
void * | v, | ||
uword | n | ||
) |
always_inline void* hash_forward1 | ( | hash_t * | h, |
void * | v | ||
) |
always_inline hash_t* hash_header | ( | void * | v | ) |
always_inline uword hash_header_bytes | ( | void * | v | ) |
always_inline uword hash_is_user | ( | void * | v, |
uword | i | ||
) |
hash_pair_t* hash_next | ( | void * | v, |
hash_next_t * | hn | ||
) |
always_inline uword hash_pair_bytes | ( | hash_t * | h | ) |
always_inline uword hash_pair_log2_bytes | ( | hash_t * | h | ) |
always_inline void hash_set_flags | ( | void * | v, |
uword | flags | ||
) |
always_inline void hash_set_pair_format | ( | void * | v, |
format_function_t * | format_pair, | ||
void * | format_pair_arg | ||
) |
always_inline void hash_set_value_bytes | ( | hash_t * | h, |
uword | value_bytes | ||
) |
clib_error_t* hash_validate | ( | void * | v | ) |
always_inline uword hash_value_bytes | ( | hash_t * | h | ) |
always_inline uword indirect_pair_get_len | ( | hash_pair_indirect_t * | p | ) |
always_inline uword indirect_pair_get_log2_bytes | ( | hash_pair_indirect_t * | p | ) |
always_inline void indirect_pair_set | ( | hash_pair_indirect_t * | p, |
uword | log2_alloc, | ||
uword | len | ||
) |
int test_hash_main | ( | unformat_input_t * | input | ) |
unformat_function_t unformat_hash_string |
unformat_function_t unformat_hash_vec_string |