FD.io VPP  v19.04.4-rc0-5-ge88582fac
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

◆ HBH_OPTION_TYPE_IOAM_E2E_CACHE_ID

#define HBH_OPTION_TYPE_IOAM_E2E_CACHE_ID   31

Definition at line 267 of file ioam_cache.h.

◆ HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE_ID

#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE_ID   30

Definition at line 266 of file ioam_cache.h.

◆ IOAM_CACHE_TABLE_DEFAULT_HASH_MEMORY_SIZE

#define IOAM_CACHE_TABLE_DEFAULT_HASH_MEMORY_SIZE   (2<<20)

Definition at line 164 of file ioam_cache.h.

◆ IOAM_CACHE_TABLE_DEFAULT_HASH_NUM_BUCKETS

#define IOAM_CACHE_TABLE_DEFAULT_HASH_NUM_BUCKETS   (4 * 1024)

Definition at line 163 of file ioam_cache.h.

◆ IOAM_CACHE_TS_TICK

#define IOAM_CACHE_TS_TICK   100e-3

Definition at line 511 of file ioam_cache.h.

◆ IOAM_CACHE_TS_TIMEOUT

#define IOAM_CACHE_TS_TIMEOUT   1.0

Definition at line 510 of file ioam_cache.h.

◆ IOAM_CACHE_TS_TIMEOUT_TICKS

#define IOAM_CACHE_TS_TIMEOUT_TICKS   IOAM_CACHE_TS_TICK*9

Definition at line 513 of file ioam_cache.h.

◆ IOAM_E2E_CACHE_HBH_EXT_LEN

#define IOAM_E2E_CACHE_HBH_EXT_LEN   (IOAM_E2E_CACHE_OPTION_RND >> 3)

Definition at line 284 of file ioam_cache.h.

◆ IOAM_E2E_CACHE_OPTION_RND

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

Definition at line 283 of file ioam_cache.h.

◆ IOAM_E2E_ID_HBH_EXT_LEN

#define IOAM_E2E_ID_HBH_EXT_LEN   (IOAM_E2E_ID_OPTION_RND >> 3)

Definition at line 282 of file ioam_cache.h.

◆ IOAM_E2E_ID_OPTION_RND

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

Definition at line 281 of file ioam_cache.h.

◆ MAX_CACHE_ENTRIES

#define MAX_CACHE_ENTRIES   4096

Definition at line 159 of file ioam_cache.h.

◆ MAX_CACHE_TS_ENTRIES

#define MAX_CACHE_TS_ENTRIES   1048576

Definition at line 161 of file ioam_cache.h.

◆ TIMER_HANDLE_INVALID

#define TIMER_HANDLE_INVALID   ((u32) ~0)

Definition at line 514 of file ioam_cache.h.

Function Documentation

◆ CLIB_PACKED() [1/2]

typedef CLIB_PACKED ( struct { ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 reserved[5];ip6_address_t id;}  )

◆ CLIB_PACKED() [2/2]

typedef CLIB_PACKED ( struct { ip6_hop_by_hop_option_t hdr;u8 e2e_type;u8 pool_id;u32 pool_index;}  )

◆ expired_cache_ts_timer_callback()

void expired_cache_ts_timer_callback ( u32 expired_timers)

Definition at line 698 of file ioam_cache_tunnel_select_node.c.

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

◆ format_ioam_cache_entry()

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

Definition at line 486 of file ioam_cache.h.

+ Here is the call graph for this function:

◆ format_ioam_cache_ts_entry()

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

Definition at line 796 of file ioam_cache.h.

+ Here is the call graph for this function:

◆ ioam_cache_add()

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 365 of file ioam_cache.h.

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

◆ ioam_cache_entry_cleanup()

static ioam_cache_entry_t* ioam_cache_entry_cleanup ( u32  pool_index)
inlinestatic

Definition at line 311 of file ioam_cache.h.

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

◆ ioam_cache_entry_free()

static void ioam_cache_entry_free ( ioam_cache_entry_t entry)
inlinestatic

Definition at line 299 of file ioam_cache.h.

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

◆ ioam_cache_lookup()

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 322 of file ioam_cache.h.

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

◆ ioam_cache_sr_rewrite_template_create()

static void ioam_cache_sr_rewrite_template_create ( void  )
inlinestatic

Definition at line 434 of file ioam_cache.h.

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

◆ ioam_cache_table_destroy()

static int ioam_cache_table_destroy ( vlib_main_t vm)
inlinestatic

Definition at line 468 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ioam_cache_table_init()

static int ioam_cache_table_init ( vlib_main_t vm)
inlinestatic

Definition at line 449 of file ioam_cache.h.

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

◆ ioam_cache_ts_add()

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 643 of file ioam_cache.h.

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

◆ ioam_cache_ts_check_and_send()

static void ioam_cache_ts_check_and_send ( u32  thread_id,
i32  pool_index 
)
inlinestatic

Definition at line 697 of file ioam_cache.h.

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

◆ ioam_cache_ts_entry_cleanup()

static int ioam_cache_ts_entry_cleanup ( u32  thread_id,
u32  pool_index 
)
inlinestatic

Definition at line 629 of file ioam_cache.h.

+ Here is the call graph for this function:

◆ ioam_cache_ts_entry_free()

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

Definition at line 577 of file ioam_cache.h.

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

◆ ioam_cache_ts_lookup()

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 754 of file ioam_cache.h.

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

◆ ioam_cache_ts_send()

static void ioam_cache_ts_send ( u32  thread_id,
i32  pool_index 
)
inlinestatic

Definition at line 683 of file ioam_cache.h.

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

◆ ioam_cache_ts_table_destroy()

static int ioam_cache_ts_table_destroy ( vlib_main_t vm)
inlinestatic

Definition at line 603 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ioam_cache_ts_table_init()

static int ioam_cache_ts_table_init ( vlib_main_t vm)
inlinestatic

Definition at line 528 of file ioam_cache.h.

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

◆ ioam_cache_ts_timer_node_enable()

void ioam_cache_ts_timer_node_enable ( vlib_main_t vm,
u8  enable 
)

Definition at line 689 of file ioam_cache_tunnel_select_node.c.

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

◆ ioam_cache_ts_timer_reset()

static void ioam_cache_ts_timer_reset ( ioam_cache_main_t cm,
ioam_cache_ts_entry_t entry 
)
inlinestatic

Definition at line 568 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ioam_cache_ts_timer_set()

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

Definition at line 559 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ioam_cache_ts_update()

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 715 of file ioam_cache.h.

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

◆ ioam_e2e_id_rewrite_handler()

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

Definition at line 287 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ip6_compute_flow_hash_ext()

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 228 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ip6_ioam_ts_cache_cleanup_rewrite()

static int ip6_ioam_ts_cache_cleanup_rewrite ( void  )
inlinestatic

Definition at line 892 of file ioam_cache.h.

+ Here is the caller graph for this function:

◆ ip6_ioam_ts_cache_set_rewrite()

static int ip6_ioam_ts_cache_set_rewrite ( void  )
inlinestatic

Definition at line 853 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

ioam_cache_main_t ioam_cache_main

Definition at line 58 of file ioam_cache.c.

◆ ioam_cache_node

vlib_node_registration_t ioam_cache_node

(constructor) VLIB_REGISTER_NODE (ioam_cache_node)

Definition at line 183 of file ioam_cache_node.c.

◆ ioam_cache_ts_node

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.