FD.io VPP  v18.01.2-1-g9b554f3
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 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)
 
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 478 of file hash.c.

Function Documentation

u8* format_hash ( u8 s,
va_list *  va 
)

Definition at line 960 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 335 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 935 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 775 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 919 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 224 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 176 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 598 of file hash.c.

+ Here is the call graph for this function:

void* hash_resize ( void *  old,
uword  new_size 
)

Definition at line 769 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 746 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 249 of file hash.c.

+ Here is the caller graph for this function:

clib_error_t* hash_validate ( void *  v)

Definition at line 1055 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 324 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 294 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 264 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 486 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 877 of file hash.c.

uword mem_key_sum ( hash_t h,
uword  key 
)

Definition at line 870 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 387 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 357 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 892 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 900 of file hash.c.

+ Here is the call graph for this function:

uword string_key_sum ( hash_t h,
uword  key 
)

Definition at line 885 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 1049 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 1023 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 1043 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 429 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 809 of file hash.c.

u8* vec_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 819 of file hash.c.

+ Here is the call graph for this function:

uword vec_key_sum ( hash_t h,
uword  key 
)

Definition at line 802 of file hash.c.

+ Here is the call graph for this function:

static u32 zap32 ( u32  x,
word  n 
)
inlinestatic

Definition at line 159 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: