FD.io VPP  v18.07-34-g55fbdb9
Vector Packet Processing
ioam_cache.h File Reference
+ Include dependency graph for ioam_cache.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ioam_cache_entry_t
 
struct  ioam_cache_ts_entry_t
 
struct  ioam_cache_ts_pool_stats_t
 
struct  ioam_cache_main_t
 

Macros

#define MAX_CACHE_ENTRIES   4096
 
#define MAX_CACHE_TS_ENTRIES   1048576
 
#define IOAM_CACHE_TABLE_DEFAULT_HASH_NUM_BUCKETS   (4 * 1024)
 
#define IOAM_CACHE_TABLE_DEFAULT_HASH_MEMORY_SIZE   (2<<20)
 
#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE_ID   30
 
#define HBH_OPTION_TYPE_IOAM_E2E_CACHE_ID   31
 
#define IOAM_E2E_ID_OPTION_RND   ((sizeof(ioam_e2e_id_option_t) + 7) & ~7)
 
#define IOAM_E2E_ID_HBH_EXT_LEN   (IOAM_E2E_ID_OPTION_RND >> 3)
 
#define IOAM_E2E_CACHE_OPTION_RND   ((sizeof(ioam_e2e_cache_option_t) + 7) & ~7)
 
#define IOAM_E2E_CACHE_HBH_EXT_LEN   (IOAM_E2E_CACHE_OPTION_RND >> 3)
 
#define IOAM_CACHE_TS_TIMEOUT   1.0
 
#define IOAM_CACHE_TS_TICK   100e-3
 
#define IOAM_CACHE_TS_TIMEOUT_TICKS   IOAM_CACHE_TS_TICK*9
 
#define TIMER_HANDLE_INVALID   ((u32) ~0)
 

Functions

static u32 ip6_compute_flow_hash_ext (const ip6_header_t *ip, u8 protocol, u16 src_port, u16 dst_port, flow_hash_config_t flow_hash_config)
 
typedef CLIB_PACKED (struct{ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 reserved[5];ip6_address_t id;}) ioam_e2e_id_option_t
 
typedef CLIB_PACKED (struct{ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 pool_id;u32 pool_index;}) ioam_e2e_cache_option_t
 
static void ioam_e2e_id_rewrite_handler (ioam_e2e_id_option_t *e2e_option, ip6_address_t *address)
 
static void ioam_cache_entry_free (ioam_cache_entry_t *entry)
 
static ioam_cache_entry_tioam_cache_entry_cleanup (u32 pool_index)
 
static ioam_cache_entry_tioam_cache_lookup (ip6_header_t *ip0, u16 src_port, u16 dst_port, u32 seq_no)
 
static int ioam_cache_add (vlib_buffer_t *b0, ip6_header_t *ip0, u16 src_port, u16 dst_port, ip6_hop_by_hop_header_t *hbh0, u32 seq_no)
 
static void ioam_cache_sr_rewrite_template_create (void)
 
static int ioam_cache_table_init (vlib_main_t *vm)
 
static int ioam_cache_table_destroy (vlib_main_t *vm)
 
static u8format_ioam_cache_entry (u8 *s, va_list *args)
 
void ioam_cache_ts_timer_node_enable (vlib_main_t *vm, u8 enable)
 
void expired_cache_ts_timer_callback (u32 *expired_timers)
 
static int ioam_cache_ts_table_init (vlib_main_t *vm)
 
static void ioam_cache_ts_timer_set (ioam_cache_main_t *cm, ioam_cache_ts_entry_t *entry, u32 interval)
 
static void ioam_cache_ts_timer_reset (ioam_cache_main_t *cm, ioam_cache_ts_entry_t *entry)
 
static void ioam_cache_ts_entry_free (u32 thread_id, ioam_cache_ts_entry_t *entry, u32 node_index)
 
static int ioam_cache_ts_table_destroy (vlib_main_t *vm)
 
static int ioam_cache_ts_entry_cleanup (u32 thread_id, u32 pool_index)
 
static int ioam_cache_ts_add (ip6_header_t *ip0, u16 src_port, u16 dst_port, u32 seq_no, u8 max_responses, u64 now, u32 thread_id, u32 *pool_index)
 
static void ioam_cache_ts_send (u32 thread_id, i32 pool_index)
 
static void ioam_cache_ts_check_and_send (u32 thread_id, i32 pool_index)
 
static int ioam_cache_ts_update (u32 thread_id, i32 pool_index, u32 buffer_index, ip6_hop_by_hop_header_t *hbh)
 
static int ioam_cache_ts_lookup (ip6_header_t *ip0, u8 protocol, u16 src_port, u16 dst_port, u32 seq_no, ip6_hop_by_hop_header_t **hbh, u32 *pool_index, u8 *thread_id, u8 response_seen)
 
static u8format_ioam_cache_ts_entry (u8 *s, va_list *args)
 
static int ip6_ioam_ts_cache_set_rewrite (void)
 
static int ip6_ioam_ts_cache_cleanup_rewrite (void)
 

Variables

ioam_cache_main_t ioam_cache_main
 
vlib_node_registration_t ioam_cache_node
 (constructor) VLIB_REGISTER_NODE (ioam_cache_node) More...
 
vlib_node_registration_t ioam_cache_ts_node
 (constructor) VLIB_REGISTER_NODE (ioam_cache_ts_node) More...
 

Macro Definition Documentation

#define HBH_OPTION_TYPE_IOAM_E2E_CACHE_ID   31

Definition at line 264 of file ioam_cache.h.

#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE_ID   30

Definition at line 263 of file ioam_cache.h.

#define IOAM_CACHE_TABLE_DEFAULT_HASH_MEMORY_SIZE   (2<<20)

Definition at line 164 of file ioam_cache.h.

#define IOAM_CACHE_TABLE_DEFAULT_HASH_NUM_BUCKETS   (4 * 1024)

Definition at line 163 of file ioam_cache.h.

#define IOAM_CACHE_TS_TICK   100e-3

Definition at line 508 of file ioam_cache.h.

#define IOAM_CACHE_TS_TIMEOUT   1.0

Definition at line 507 of file ioam_cache.h.

#define IOAM_CACHE_TS_TIMEOUT_TICKS   IOAM_CACHE_TS_TICK*9

Definition at line 510 of file ioam_cache.h.

#define IOAM_E2E_CACHE_HBH_EXT_LEN   (IOAM_E2E_CACHE_OPTION_RND >> 3)

Definition at line 281 of file ioam_cache.h.

#define IOAM_E2E_CACHE_OPTION_RND   ((sizeof(ioam_e2e_cache_option_t) + 7) & ~7)

Definition at line 280 of file ioam_cache.h.

#define IOAM_E2E_ID_HBH_EXT_LEN   (IOAM_E2E_ID_OPTION_RND >> 3)

Definition at line 279 of file ioam_cache.h.

#define IOAM_E2E_ID_OPTION_RND   ((sizeof(ioam_e2e_id_option_t) + 7) & ~7)

Definition at line 278 of file ioam_cache.h.

#define MAX_CACHE_ENTRIES   4096

Definition at line 159 of file ioam_cache.h.

#define MAX_CACHE_TS_ENTRIES   1048576

Definition at line 161 of file ioam_cache.h.

#define TIMER_HANDLE_INVALID   ((u32) ~0)

Definition at line 511 of file ioam_cache.h.

Function Documentation

typedef CLIB_PACKED ( struct{ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 reserved[5];ip6_address_t id;}  )
typedef CLIB_PACKED ( struct{ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 pool_id;u32 pool_index;}  )
void expired_cache_ts_timer_callback ( u32 expired_timers)

Definition at line 699 of file ioam_cache_tunnel_select_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_ioam_cache_entry ( u8 s,
va_list *  args 
)
inlinestatic

Definition at line 483 of file ioam_cache.h.

+ Here is the call graph for this function:

static u8* format_ioam_cache_ts_entry ( u8 s,
va_list *  args 
)
inlinestatic

Definition at line 793 of file ioam_cache.h.

+ Here is the call graph for this function:

static int ioam_cache_add ( vlib_buffer_t b0,
ip6_header_t ip0,
u16  src_port,
u16  dst_port,
ip6_hop_by_hop_header_t hbh0,
u32  seq_no 
)
inlinestatic

Definition at line 362 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ioam_cache_entry_t* ioam_cache_entry_cleanup ( u32  pool_index)
inlinestatic

Definition at line 308 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_cache_entry_free ( ioam_cache_entry_t entry)
inlinestatic

Definition at line 296 of file ioam_cache.h.

+ Here is the caller graph for this function:

static ioam_cache_entry_t* ioam_cache_lookup ( ip6_header_t ip0,
u16  src_port,
u16  dst_port,
u32  seq_no 
)
inlinestatic

Definition at line 319 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_cache_sr_rewrite_template_create ( void  )
inlinestatic

Definition at line 431 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ioam_cache_table_destroy ( vlib_main_t vm)
inlinestatic

Definition at line 465 of file ioam_cache.h.

+ Here is the caller graph for this function:

static int ioam_cache_table_init ( vlib_main_t vm)
inlinestatic

Definition at line 446 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ioam_cache_ts_add ( ip6_header_t ip0,
u16  src_port,
u16  dst_port,
u32  seq_no,
u8  max_responses,
u64  now,
u32  thread_id,
u32 pool_index 
)
inlinestatic

Definition at line 640 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_cache_ts_check_and_send ( u32  thread_id,
i32  pool_index 
)
inlinestatic

Definition at line 694 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ioam_cache_ts_entry_cleanup ( u32  thread_id,
u32  pool_index 
)
inlinestatic

Definition at line 626 of file ioam_cache.h.

+ Here is the call graph for this function:

static void ioam_cache_ts_entry_free ( u32  thread_id,
ioam_cache_ts_entry_t entry,
u32  node_index 
)
inlinestatic

Definition at line 574 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ioam_cache_ts_lookup ( ip6_header_t ip0,
u8  protocol,
u16  src_port,
u16  dst_port,
u32  seq_no,
ip6_hop_by_hop_header_t **  hbh,
u32 pool_index,
u8 thread_id,
u8  response_seen 
)
inlinestatic

Definition at line 751 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_cache_ts_send ( u32  thread_id,
i32  pool_index 
)
inlinestatic

Definition at line 680 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int ioam_cache_ts_table_destroy ( vlib_main_t vm)
inlinestatic

Definition at line 600 of file ioam_cache.h.

+ Here is the caller graph for this function:

static int ioam_cache_ts_table_init ( vlib_main_t vm)
inlinestatic

Definition at line 525 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ioam_cache_ts_timer_node_enable ( vlib_main_t vm,
u8  enable 
)

Definition at line 690 of file ioam_cache_tunnel_select_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_cache_ts_timer_reset ( ioam_cache_main_t cm,
ioam_cache_ts_entry_t entry 
)
inlinestatic

Definition at line 565 of file ioam_cache.h.

+ Here is the caller graph for this function:

static void ioam_cache_ts_timer_set ( ioam_cache_main_t cm,
ioam_cache_ts_entry_t entry,
u32  interval 
)
inlinestatic

Definition at line 556 of file ioam_cache.h.

+ Here is the caller graph for this function:

static int ioam_cache_ts_update ( u32  thread_id,
i32  pool_index,
u32  buffer_index,
ip6_hop_by_hop_header_t hbh 
)
inlinestatic

Definition at line 712 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_e2e_id_rewrite_handler ( ioam_e2e_id_option_t *  e2e_option,
ip6_address_t address 
)
inlinestatic

Definition at line 284 of file ioam_cache.h.

+ Here is the caller graph for this function:

static u32 ip6_compute_flow_hash_ext ( const ip6_header_t ip,
u8  protocol,
u16  src_port,
u16  dst_port,
flow_hash_config_t  flow_hash_config 
)
inlinestatic

Definition at line 225 of file ioam_cache.h.

+ Here is the caller graph for this function:

static int ip6_ioam_ts_cache_cleanup_rewrite ( void  )
inlinestatic

Definition at line 889 of file ioam_cache.h.

+ Here is the caller graph for this function:

static int ip6_ioam_ts_cache_set_rewrite ( void  )
inlinestatic

Definition at line 850 of file ioam_cache.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

ioam_cache_main_t ioam_cache_main

Definition at line 58 of file ioam_cache.c.

vlib_node_registration_t ioam_cache_node

(constructor) VLIB_REGISTER_NODE (ioam_cache_node)

Definition at line 183 of file ioam_cache_node.c.

vlib_node_registration_t ioam_cache_ts_node

(constructor) VLIB_REGISTER_NODE (ioam_cache_ts_node)

Definition at line 239 of file ioam_cache_tunnel_select_node.c.