FD.io VPP  v16.06
Vector Packet Processing
hash.c File Reference
+ Include dependency graph for hash.c:

Go to the source code of this file.

Macros

#define CHECK(x)   if ((error = ERROR_ASSERT (x))) goto done;
 

Enumerations

enum  lookup_opcode { GET = 1, SET = 2, UNSET = 3 }
 

Functions

always_inline void zero_pair (hash_t *h, hash_pair_t *p)
 
always_inline void init_pair (hash_t *h, hash_pair_t *p)
 
always_inline hash_pair_union_tget_pair (void *v, uword i)
 
always_inline void set_is_user (void *v, uword i, uword is_user)
 
static u8hash_format_pair_default (u8 *s, va_list *args)
 
static u32 zap32 (u32 x, word n)
 
static u32 hash_memory32 (void *p, word n_bytes, u32 state)
 
uword hash_memory (void *p, word n_bytes, uword state)
 
always_inline uword hash_uword (uword x)
 
always_inline uword key_sum (hash_t *h, uword key)
 
always_inline uword key_equal1 (hash_t *h, uword key1, uword key2, uword e)
 
always_inline uword key_equal (hash_t *h, uword key1, uword key2)
 
static hash_pair_union_tget_indirect (void *v, hash_pair_indirect_t *pi, uword key)
 
static hash_pair_union_tset_indirect_is_user (void *v, uword i, hash_pair_union_t *p, uword key)
 
static hash_pair_union_tset_indirect (void *v, hash_pair_indirect_t *pi, uword key, uword *found_key)
 
static void unset_indirect (void *v, uword i, hash_pair_t *q)
 
static hash_pair_tlookup (void *v, uword key, enum lookup_opcode op, void *new_value, void *old_value)
 
hash_pair_thash_next (void *v, hash_next_t *hn)
 
static voidhash_resize_internal (void *old, uword new_size, uword free_old)
 
voidhash_resize (void *old, uword new_size)
 
voidhash_dup (void *old)
 
uword vec_key_sum (hash_t *h, uword key)
 
uword vec_key_equal (hash_t *h, uword key1, uword key2)
 
u8vec_key_format_pair (u8 *s, va_list *args)
 
uword mem_key_sum (hash_t *h, uword key)
 
uword mem_key_equal (hash_t *h, uword key1, uword key2)
 
uword string_key_sum (hash_t *h, uword key)
 
uword string_key_equal (hash_t *h, uword key1, uword key2)
 
u8string_key_format_pair (u8 *s, va_list *args)
 
uword hash_bytes (void *v)
 
u8format_hash (u8 *s, va_list *va)
 
static uword unformat_hash_string_internal (unformat_input_t *input, va_list *va, int is_vec)
 
uword unformat_hash_vec_string (unformat_input_t *input, va_list *va)
 
uword unformat_hash_string (unformat_input_t *input, va_list *va)
 
clib_error_thash_validate (void *v)
 

Macro Definition Documentation

#define CHECK (   x)    if ((error = ERROR_ASSERT (x))) goto done;

Enumeration Type Documentation

Enumerator
GET 
SET 
UNSET 

Definition at line 458 of file hash.c.

Function Documentation

u8* format_hash ( u8 s,
va_list *  va 
)

Definition at line 900 of file hash.c.

+ Here is the call graph for this function:

static hash_pair_union_t* get_indirect ( void v,
hash_pair_indirect_t pi,
uword  key 
)
static

Definition at line 312 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline hash_pair_union_t* get_pair ( void v,
uword  i 
)

Definition at line 50 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword hash_bytes ( void v)

Definition at line 876 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* hash_dup ( void old)

Definition at line 734 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 * hash_format_pair_default ( u8 s,
va_list *  args 
)
static

Definition at line 863 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword hash_memory ( void p,
word  n_bytes,
uword  state 
)

Definition at line 208 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 hash_memory32 ( void p,
word  n_bytes,
u32  state 
)
inlinestatic

Definition at line 158 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

hash_pair_t* hash_next ( void v,
hash_next_t hn 
)

Definition at line 569 of file hash.c.

+ Here is the call graph for this function:

void* hash_resize ( void old,
uword  new_size 
)

Definition at line 731 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* hash_resize_internal ( void old,
uword  new_size,
uword  free_old 
)
static

Definition at line 711 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword hash_uword ( uword  x)

Definition at line 231 of file hash.c.

+ Here is the caller graph for this function:

clib_error_t* hash_validate ( void v)

Definition at line 990 of file hash.c.

+ Here is the call graph for this function:

always_inline void init_pair ( hash_t h,
hash_pair_t p 
)

Definition at line 46 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword key_equal ( hash_t h,
uword  key1,
uword  key2 
)

Definition at line 301 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword key_equal1 ( hash_t h,
uword  key1,
uword  key2,
uword  e 
)

Definition at line 274 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline uword key_sum ( hash_t h,
uword  key 
)

Definition at line 245 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static hash_pair_t* lookup ( void v,
uword  key,
enum lookup_opcode  op,
void new_value,
void old_value 
)
static

Definition at line 464 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword mem_key_equal ( hash_t h,
uword  key1,
uword  key2 
)

Definition at line 827 of file hash.c.

uword mem_key_sum ( hash_t h,
uword  key 
)

Definition at line 821 of file hash.c.

+ Here is the call graph for this function:

static hash_pair_union_t* set_indirect ( void v,
hash_pair_indirect_t pi,
uword  key,
uword found_key 
)
static

Definition at line 367 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static hash_pair_union_t* set_indirect_is_user ( void v,
uword  i,
hash_pair_union_t p,
uword  key 
)
static

Definition at line 334 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void set_is_user ( void v,
uword  i,
uword  is_user 
)

Definition at line 60 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword string_key_equal ( hash_t h,
uword  key1,
uword  key2 
)

Definition at line 840 of file hash.c.

+ Here is the caller graph for this function:

u8* string_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 847 of file hash.c.

+ Here is the call graph for this function:

uword string_key_sum ( hash_t h,
uword  key 
)

Definition at line 834 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_hash_string ( unformat_input_t input,
va_list *  va 
)

Definition at line 987 of file hash.c.

+ Here is the call graph for this function:

static uword unformat_hash_string_internal ( unformat_input_t input,
va_list *  va,
int  is_vec 
)
static

Definition at line 962 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword unformat_hash_vec_string ( unformat_input_t input,
va_list *  va 
)

Definition at line 983 of file hash.c.

+ Here is the call graph for this function:

static void unset_indirect ( void v,
uword  i,
hash_pair_t q 
)
static

Definition at line 408 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uword vec_key_equal ( hash_t h,
uword  key1,
uword  key2 
)

Definition at line 763 of file hash.c.

u8* vec_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 772 of file hash.c.

+ Here is the call graph for this function:

uword vec_key_sum ( hash_t h,
uword  key 
)

Definition at line 757 of file hash.c.

+ Here is the call graph for this function:

static u32 zap32 ( u32  x,
word  n 
)
inlinestatic

Definition at line 142 of file hash.c.

+ Here is the caller graph for this function:

always_inline void zero_pair ( hash_t h,
hash_pair_t p 
)

Definition at line 43 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: