FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
hash.h File Reference
+ Include dependency graph for hash.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_hash_function_registration
 
struct  vnet_hash_main_t
 

Macros

#define foreach_vnet_hash_fn_types
 
#define VNET_REGISTER_HASH_FUNCTION(x, ...)
 

Typedefs

typedef void(* vnet_hash_fn_t) (void **p, u32 *h, u32 n_packets)
 
typedef struct vnet_hash_function_registration vnet_hash_function_registration_t
 

Enumerations

enum  vnet_hash_fn_type_t { VNET_HASH_FN_TYPE_N }
 

Functions

vnet_hash_fn_t vnet_hash_default_function (vnet_hash_fn_type_t ftype)
 select hash func with highest priority More...
 
vnet_hash_fn_t vnet_hash_function_from_name (const char *name, vnet_hash_fn_type_t ftype)
 
vnet_hash_function_registration_tvnet_hash_function_from_func (vnet_hash_fn_t fn, vnet_hash_fn_type_t ftype)
 

Variables

vnet_hash_main_t vnet_hash_main
 
format_function_t format_vnet_hash
 

Macro Definition Documentation

◆ foreach_vnet_hash_fn_types

#define foreach_vnet_hash_fn_types
Value:
_ (ETHERNET, 0, "hash-fn-ethernet") \
_ (IP, 1, "hash-fn-ip")

Definition at line 11 of file hash.h.

◆ VNET_REGISTER_HASH_FUNCTION

#define VNET_REGISTER_HASH_FUNCTION (   x,
  ... 
)
Value:
__VA_ARGS__ vnet_hash_function_registration_t __vnet_hash_function_##x; \
static void __clib_constructor __vnet_hash_function_registration_##x (void) \
{ \
vnet_hash_main_t *hm = &vnet_hash_main; \
__vnet_hash_function_##x.next = hm->hash_registrations; \
hm->hash_registrations = &__vnet_hash_function_##x; \
} \
__VA_ARGS__ vnet_hash_function_registration_t __vnet_hash_function_##x

Definition at line 42 of file hash.h.

Typedef Documentation

◆ vnet_hash_fn_t

typedef void(* vnet_hash_fn_t) (void **p, u32 *h, u32 n_packets)

Definition at line 23 of file hash.h.

◆ vnet_hash_function_registration_t

Enumeration Type Documentation

◆ vnet_hash_fn_type_t

Enumerator
VNET_HASH_FN_TYPE_N 

Definition at line 15 of file hash.h.

Function Documentation

◆ vnet_hash_default_function()

vnet_hash_fn_t vnet_hash_default_function ( vnet_hash_fn_type_t  ftype)

select hash func with highest priority

Definition at line 29 of file hash.c.

◆ vnet_hash_function_from_func()

vnet_hash_function_registration_t* vnet_hash_function_from_func ( vnet_hash_fn_t  fn,
vnet_hash_fn_type_t  ftype 
)

Definition at line 58 of file hash.c.

◆ vnet_hash_function_from_name()

vnet_hash_fn_t vnet_hash_function_from_name ( const char *  name,
vnet_hash_fn_type_t  ftype 
)

Definition at line 43 of file hash.c.

Variable Documentation

◆ format_vnet_hash

format_function_t format_vnet_hash

Definition at line 57 of file hash.h.

◆ vnet_hash_main

vnet_hash_main_t vnet_hash_main

Definition at line 11 of file hash.c.

IP
IP(src='1.1.1.1', dst='1.2.3.4', options=[IPOption('\x07')])/TCP(sport
vnet_hash_main
vnet_hash_main_t vnet_hash_main
Definition: hash.c:11
vnet_hash_function_registration
Definition: hash.h:25
vnet_hash_main_t::hash_registrations
vnet_hash_function_registration_t * hash_registrations
Definition: hash.h:37