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

static void zero_pair (hash_t *h, hash_pair_t *p)
 
static void init_pair (hash_t *h, hash_pair_t *p)
 
static hash_pair_union_tget_pair (void *v, uword i)
 
static void set_is_user (void *v, uword i, uword is_user)
 
static u8hash_format_pair_default (u8 *s, va_list *args)
 
static u64 zap64 (u64 x, word n)
 
static u64 hash_memory64 (void *p, word n_bytes, u64 state)
 
uword hash_memory (void *p, word n_bytes, uword state)
 
static uword hash_uword (uword x)
 
static uword key_sum (hash_t *h, uword key)
 
static uword key_equal1 (hash_t *h, uword key1, uword key2, uword e)
 
static 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 void * hash_resize_internal (void *old, uword new_size, uword free_old)
 
void * hash_resize (void *old, uword new_size)
 
void * hash_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 468 of file hash.c.

Function Documentation

u8* format_hash ( u8 s,
va_list *  va 
)

Definition at line 950 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 325 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* get_pair ( void *  v,
uword  i 
)
inlinestatic

Definition at line 56 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 925 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 765 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 909 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 214 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 hash_memory64 ( void *  p,
word  n_bytes,
u64  state 
)
inlinestatic

Definition at line 100 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 588 of file hash.c.

+ Here is the call graph for this function:

void* hash_resize ( void *  old,
uword  new_size 
)

Definition at line 759 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 736 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword hash_uword ( uword  x)
inlinestatic

Definition at line 227 of file hash.c.

+ Here is the caller graph for this function:

clib_error_t* hash_validate ( void *  v)

Definition at line 1045 of file hash.c.

+ Here is the call graph for this function:

static void init_pair ( hash_t h,
hash_pair_t p 
)
inlinestatic

Definition at line 50 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword key_equal ( hash_t h,
uword  key1,
uword  key2 
)
inlinestatic

Definition at line 314 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword key_equal1 ( hash_t h,
uword  key1,
uword  key2,
uword  e 
)
inlinestatic

Definition at line 284 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword key_sum ( hash_t h,
uword  key 
)
inlinestatic

Definition at line 254 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 476 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 867 of file hash.c.

uword mem_key_sum ( hash_t h,
uword  key 
)

Definition at line 860 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 377 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 347 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_is_user ( void *  v,
uword  i,
uword  is_user 
)
inlinestatic

Definition at line 67 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 882 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 890 of file hash.c.

+ Here is the call graph for this function:

uword string_key_sum ( hash_t h,
uword  key 
)

Definition at line 875 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 1039 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 1013 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 1033 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 419 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 799 of file hash.c.

u8* vec_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 809 of file hash.c.

+ Here is the call graph for this function:

uword vec_key_sum ( hash_t h,
uword  key 
)

Definition at line 792 of file hash.c.

+ Here is the call graph for this function:

static u64 zap64 ( u64  x,
word  n 
)
inlinestatic

Definition at line 83 of file hash.c.

+ Here is the caller graph for this function:

static void zero_pair ( hash_t h,
hash_pair_t p 
)
inlinestatic

Definition at line 44 of file hash.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: