FD.io VPP  v19.08-27-gf4dcae4
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

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

Definition at line 38 of file node.c.

Enumeration Type Documentation

Enumerator
ANALYSE_N_ERROR 

Definition at line 42 of file node.c.

Enumerator
ANALYSE_NEXT_IP4_LOOKUP 
ANALYSE_NEXT_IP4_DROP 
ANALYSE_N_NEXT 

Definition at line 56 of file node.c.

Function Documentation

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

Definition at line 67 of file node.c.

+ Here is the call graph for this function:

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 79 of file node.c.

+ Here is the caller graph for this function:

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

Definition at line 401 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 372 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 355 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 141 of file node.c.

+ Here is the call graph for this function:

void ip6_ioam_analyse_register_handlers ( void  )

Definition at line 448 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 414 of file node.c.

+ Here is the caller graph for this function:

void ip6_ioam_analyse_unregister_handlers ( void  )

Definition at line 459 of file node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_ioam_analyse_unregister_hbh_handler ( u8  option)

Definition at line 433 of file node.c.

+ Here is the caller graph for this function:

Variable Documentation

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

Definition at line 50 of file node.c.

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:67
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:141
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * analyse_error_strings[]
Definition: node.c:50

(constructor) VLIB_REGISTER_NODE (analyse_node_local)

Definition at line 35 of file node.c.

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:67
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:141
#define ARRAY_LEN(x)
Definition: clib.h:62
static char * analyse_error_strings[]
Definition: node.c:50

(constructor) VLIB_REGISTER_NODE (analyse_node_remote)

Definition at line 36 of file node.c.

ip6_ioam_analyser_main_t ioam_analyser_main

Definition at line 63 of file node.c.