FD.io VPP  v18.07-rc0-415-g6c78436
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 407 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 377 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 360 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 454 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 420 of file node.c.

+ Here is the caller graph for this function:

void ip6_ioam_analyse_unregister_handlers ( void  )

Definition at line 465 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 439 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
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:59
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
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:59
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.