FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  analyse_trace_t
 

Macros

#define foreach_analyse_error
 

Enumerations

enum  analyse_error_t { ANALYSE_N_ERROR }
 
enum  analyse_next_t { ANALYSE_NEXT_IP4_LOOKUP, ANALYSE_NEXT_IP4_DROP, ANALYSE_N_NEXT }
 

Functions

static u8format_analyse_trace (u8 *s, va_list *args)
 
static u8 ioam_analyse_hbh (u32 flow_id, ip6_hop_by_hop_header_t *hbh0, ip6_hop_by_hop_option_t *opt0, ip6_hop_by_hop_option_t *limit0, u16 len)
 
static uword ip6_ioam_analyse_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 IPv6 InBandOAM Analyse node. More...
 
int ip6_ioam_analyse_hbh_trace_internal (u32 flow_id, ip6_hop_by_hop_option_t *opt, u16 len)
 
int ip6_ioam_analyse_hbh_pot (u32 flow_id, ip6_hop_by_hop_option_t *opt0, u16 len)
 
int ip6_ioam_analyse_hbh_e2e_internal (u32 flow_id, ip6_hop_by_hop_option_t *opt, u16 len)
 
int ip6_ioam_analyse_register_hbh_handler (u8 option, int options(u32 flow_id, ip6_hop_by_hop_option_t *opt, u16 len))
 
int ip6_ioam_analyse_unregister_hbh_handler (u8 option)
 
void ip6_ioam_analyse_register_handlers ()
 
void ip6_ioam_analyse_unregister_handlers ()
 

Variables

vlib_node_registration_t analyse_node_local
 (constructor) VLIB_REGISTER_NODE (analyse_node_local) More...
 
vlib_node_registration_t analyse_node_remote
 (constructor) VLIB_REGISTER_NODE (analyse_node_remote) More...
 
static char * analyse_error_strings []
 
ip6_ioam_analyser_main_t ioam_analyser_main
 

Macro Definition Documentation

◆ foreach_analyse_error

#define foreach_analyse_error
Value:
_(ANALYSED, "Packets analysed for summarization") \
_(FAILED, "Packets analysis failed") \

Definition at line 39 of file node.c.

Enumeration Type Documentation

◆ analyse_error_t

Enumerator
ANALYSE_N_ERROR 

Definition at line 43 of file node.c.

◆ analyse_next_t

Enumerator
ANALYSE_NEXT_IP4_LOOKUP 
ANALYSE_NEXT_IP4_DROP 
ANALYSE_N_NEXT 

Definition at line 57 of file node.c.

Function Documentation

◆ format_analyse_trace()

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

Definition at line 68 of file node.c.

+ Here is the call graph for this function:

◆ ioam_analyse_hbh()

static u8 ioam_analyse_hbh ( u32  flow_id,
ip6_hop_by_hop_header_t hbh0,
ip6_hop_by_hop_option_t opt0,
ip6_hop_by_hop_option_t limit0,
u16  len 
)
inlinestatic

Definition at line 80 of file node.c.

+ Here is the caller graph for this function:

◆ ip6_ioam_analyse_hbh_e2e_internal()

int ip6_ioam_analyse_hbh_e2e_internal ( u32  flow_id,
ip6_hop_by_hop_option_t opt,
u16  len 
)

Definition at line 402 of file node.c.

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

◆ ip6_ioam_analyse_hbh_pot()

int ip6_ioam_analyse_hbh_pot ( u32  flow_id,
ip6_hop_by_hop_option_t opt0,
u16  len 
)

Definition at line 373 of file node.c.

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

◆ ip6_ioam_analyse_hbh_trace_internal()

int ip6_ioam_analyse_hbh_trace_internal ( u32  flow_id,
ip6_hop_by_hop_option_t opt,
u16  len 
)

Definition at line 356 of file node.c.

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

◆ ip6_ioam_analyse_node_fn()

static uword ip6_ioam_analyse_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

IPv6 InBandOAM Analyse node.

Node Identifier:
ip6-hbh-analyse-local, ip6-hbh-analyse-remote

This function receives IP-FIX packets containing IPv6-iOAM records, analyses them and collects/aggregates the statistics.

Parameters
vmvlib_main_t corresponding to the current thread.
nodevlib_node_runtime_t data for this node.
framevlib_frame_t whose contents should be dispatched.
Graph mechanics: buffer, next index usage

Uses:

  • vlib_buffer_get_current(p0)
    • Walks on each ioam record present in IP-Fix record, analyse them and store the statistics.

Next Index:

  • Dispatches the packet to ip4-lookup if executed under ip6-hbh-analyse-local node context and to ip4-drop if executed under ip6-hbh-analyse-remote node context.

Definition at line 142 of file node.c.

+ Here is the call graph for this function:

◆ ip6_ioam_analyse_register_handlers()

void ip6_ioam_analyse_register_handlers ( void  )

Definition at line 449 of file node.c.

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

◆ ip6_ioam_analyse_register_hbh_handler()

int ip6_ioam_analyse_register_hbh_handler ( u8  option,
int   optionsu32 flow_id, ip6_hop_by_hop_option_t * opt, u16 len 
)

Definition at line 415 of file node.c.

+ Here is the caller graph for this function:

◆ ip6_ioam_analyse_unregister_handlers()

void ip6_ioam_analyse_unregister_handlers ( void  )

Definition at line 460 of file node.c.

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

◆ ip6_ioam_analyse_unregister_hbh_handler()

int ip6_ioam_analyse_unregister_hbh_handler ( u8  option)

Definition at line 434 of file node.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ analyse_error_strings

char* analyse_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_analyse_error
Definition: node.c:39

Definition at line 51 of file node.c.

◆ analyse_node_local

vlib_node_registration_t analyse_node_local
Initial value:
= {
.name = "ip6-hbh-analyse-local",
.vector_size = sizeof (u32),
.format_trace = format_analyse_trace,
.error_strings = analyse_error_strings,
.n_next_nodes = ANALYSE_N_NEXT,
.next_nodes = {
[ANALYSE_NEXT_IP4_LOOKUP] = "ip4-lookup",
[ANALYSE_NEXT_IP4_DROP] = "ip4-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_analyse_trace(u8 *s, va_list *args)
Definition: node.c:68
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static uword ip6_ioam_analyse_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
IPv6 InBandOAM Analyse node.
Definition: node.c:142
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * analyse_error_strings[]
Definition: node.c:51

(constructor) VLIB_REGISTER_NODE (analyse_node_local)

Definition at line 36 of file node.c.

◆ analyse_node_remote

vlib_node_registration_t analyse_node_remote
Initial value:
=
{
.name = "ip6-hbh-analyse-remote",
.vector_size = sizeof (u32),
.format_trace = format_analyse_trace,
.error_strings = analyse_error_strings,
.n_next_nodes = ANALYSE_N_NEXT,
.next_nodes = {
[ANALYSE_NEXT_IP4_LOOKUP] = "ip4-lookup",
[ANALYSE_NEXT_IP4_DROP] = "ip4-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_analyse_trace(u8 *s, va_list *args)
Definition: node.c:68
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static uword ip6_ioam_analyse_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
IPv6 InBandOAM Analyse node.
Definition: node.c:142
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * analyse_error_strings[]
Definition: node.c:51

(constructor) VLIB_REGISTER_NODE (analyse_node_remote)

Definition at line 37 of file node.c.

◆ ioam_analyser_main

ip6_ioam_analyser_main_t ioam_analyser_main

Definition at line 64 of file node.c.