FD.io VPP  v19.01.3-6-g70449b9b9
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

◆ CHECK

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

Enumeration Type Documentation

◆ lookup_opcode

Enumerator
GET 
SET 
UNSET 

Definition at line 486 of file hash.c.

Function Documentation

◆ format_hash()

u8* format_hash ( u8 s,
va_list *  va 
)

Definition at line 968 of file hash.c.

+ Here is the call graph for this function:

◆ get_indirect()

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

Definition at line 343 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_pair()

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:

◆ hash_bytes()

uword hash_bytes ( void *  v)

Definition at line 943 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hash_dup()

void* hash_dup ( void *  old)

Definition at line 783 of file hash.c.

+ Here is the call graph for this function:

◆ hash_format_pair_default()

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

Definition at line 927 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hash_memory()

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:

◆ hash_memory32()

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_next()

hash_pair_t* hash_next ( void *  v,
hash_next_t hn 
)

Definition at line 606 of file hash.c.

+ Here is the call graph for this function:

◆ hash_resize()

void* hash_resize ( void *  old,
uword  new_size 
)

Definition at line 777 of file hash.c.

+ Here is the call graph for this function:

◆ hash_resize_internal()

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

Definition at line 754 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hash_uword()

static uword hash_uword ( uword  x)
inlinestatic

Definition at line 249 of file hash.c.

+ Here is the caller graph for this function:

◆ hash_validate()

clib_error_t* hash_validate ( void *  v)

Definition at line 1063 of file hash.c.

+ Here is the call graph for this function:

◆ init_pair()

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:

◆ key_equal()

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

Definition at line 332 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ key_equal1()

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

Definition at line 298 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ key_sum()

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:

◆ lookup()

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

Definition at line 494 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mem_key_equal()

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

Definition at line 885 of file hash.c.

+ Here is the caller graph for this function:

◆ mem_key_sum()

uword mem_key_sum ( hash_t h,
uword  key 
)

Definition at line 878 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_indirect()

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

Definition at line 395 of file hash.c.

+ Here is the call graph for this function:

◆ set_indirect_is_user()

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

Definition at line 365 of file hash.c.

+ Here is the call graph for this function:

◆ set_is_user()

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:

◆ string_key_equal()

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

Definition at line 900 of file hash.c.

+ Here is the caller graph for this function:

◆ string_key_format_pair()

u8* string_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 908 of file hash.c.

+ Here is the call graph for this function:

◆ string_key_sum()

uword string_key_sum ( hash_t h,
uword  key 
)

Definition at line 893 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_hash_string()

uword unformat_hash_string ( unformat_input_t input,
va_list *  va 
)

Definition at line 1057 of file hash.c.

+ Here is the call graph for this function:

◆ unformat_hash_string_internal()

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

Definition at line 1031 of file hash.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_hash_vec_string()

uword unformat_hash_vec_string ( unformat_input_t input,
va_list *  va 
)

Definition at line 1051 of file hash.c.

+ Here is the call graph for this function:

◆ unset_indirect()

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

Definition at line 437 of file hash.c.

+ Here is the call graph for this function:

◆ vec_key_equal()

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

Definition at line 817 of file hash.c.

◆ vec_key_format_pair()

u8* vec_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 827 of file hash.c.

+ Here is the call graph for this function:

◆ vec_key_sum()

uword vec_key_sum ( hash_t h,
uword  key 
)

Definition at line 810 of file hash.c.

+ Here is the call graph for this function:

◆ zap32()

static u32 zap32 ( u32  x,
word  n 
)
inlinestatic

Definition at line 159 of file hash.c.

+ Here is the caller graph for this function:

◆ zero_pair()

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: