FD.io VPP  v21.10.1-2-g0a485f517
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)
 
__clib_export 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)
 
__clib_export 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)
 
__clib_export void * hash_dup (void *old)
 
__clib_export uword vec_key_sum (hash_t *h, uword key)
 
__clib_export uword vec_key_equal (hash_t *h, uword key1, uword key2)
 
__clib_export u8vec_key_format_pair (u8 *s, va_list *args)
 
__clib_export uword mem_key_sum (hash_t *h, uword key)
 
__clib_export 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)
 
__clib_export uword hash_bytes (void *v)
 
__clib_export u8format_hash (u8 *s, va_list *va)
 
static uword unformat_hash_string_internal (unformat_input_t *input, va_list *va, int is_vec)
 
__clib_export uword unformat_hash_vec_string (unformat_input_t *input, va_list *va)
 
__clib_export uword unformat_hash_string (unformat_input_t *input, va_list *va)
 
__clib_export 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 537 of file hash.c.

Function Documentation

◆ format_hash()

__clib_export u8* format_hash ( u8 s,
va_list *  va 
)

Definition at line 1019 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 394 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()

__clib_export uword hash_bytes ( void *  v)

Definition at line 994 of file hash.c.

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

◆ hash_dup()

__clib_export void* hash_dup ( void *  old)

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

+ Here is the call graph for this function:

◆ hash_memory()

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

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

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

◆ hash_next()

__clib_export hash_pair_t* hash_next ( void *  v,
hash_next_t hn 
)

Definition at line 657 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 828 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 805 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 300 of file hash.c.

+ Here is the caller graph for this function:

◆ hash_validate()

__clib_export clib_error_t* hash_validate ( void *  v)

Definition at line 1114 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 383 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 349 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 315 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 545 of file hash.c.

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

◆ mem_key_equal()

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

Definition at line 936 of file hash.c.

+ Here is the caller graph for this function:

◆ mem_key_sum()

__clib_export uword mem_key_sum ( hash_t h,
uword  key 
)

Definition at line 929 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 446 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 416 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 951 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 959 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 944 of file hash.c.

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

◆ unformat_hash_string()

__clib_export uword unformat_hash_string ( unformat_input_t input,
va_list *  va 
)

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

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

◆ unformat_hash_vec_string()

__clib_export uword unformat_hash_vec_string ( unformat_input_t input,
va_list *  va 
)

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

+ Here is the call graph for this function:

◆ vec_key_equal()

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

Definition at line 868 of file hash.c.

◆ vec_key_format_pair()

__clib_export u8* vec_key_format_pair ( u8 s,
va_list *  args 
)

Definition at line 878 of file hash.c.

+ Here is the call graph for this function:

◆ vec_key_sum()

__clib_export uword vec_key_sum ( hash_t h,
uword  key 
)

Definition at line 861 of file hash.c.

+ Here is the call graph for this function:

◆ zap32()

static u32 zap32 ( u32  x,
word  n 
)
inlinestatic

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