FD.io VPP  v16.06
Vector Packet Processing
ip6_hop_by_hop.c File Reference
+ Include dependency graph for ip6_hop_by_hop.c:

Go to the source code of this file.

Data Structures

struct  ip6_hop_by_hop_trace_t
 
union  time_u64_t
 
struct  ip6_add_hop_by_hop_trace_t
 
struct  ip6_pop_hop_by_hop_trace_t
 

Macros

#define OI_DECAP   100
 
#define foreach_ip6_hbyh_input_next
 
#define foreach_ip6_hop_by_hop_error
 
#define foreach_ip6_add_hop_by_hop_error   _(PROCESSED, "Pkts w/ added ip6 hop-by-hop options")
 
#define foreach_ip6_pop_hop_by_hop_error
 

Enumerations

enum  ip6_hbyh_input_next_t { IP6_HBYH_INPUT_N_NEXT }
 
enum  ip6_hop_by_hop_error_t { IP6_HOP_BY_HOP_N_ERROR }
 
enum  ip6_add_hop_by_hop_error_t { IP6_ADD_HOP_BY_HOP_N_ERROR }
 
enum  ip6_pop_hop_by_hop_error_t { IP6_POP_HOP_BY_HOP_N_ERROR }
 

Functions

static u8 fetch_trace_data_size (u8 trace_type)
 
static u8format_ioam_data_list_element (u8 *s, va_list *args)
 
static u8format_ioam_pow (u8 *s, va_list *args)
 
static u8format_ip6_hop_by_hop_trace (u8 *s, va_list *args)
 
static uword ip6_hop_by_hop_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_ip6_add_hop_by_hop_trace (u8 *s, va_list *args)
 
static uword ip6_add_hop_by_hop_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_ip6_pop_hop_by_hop_trace (u8 *s, va_list *args)
 
static void ioam_end_of_path_validation (vlib_main_t *vm, ip6_header_t *ip0, ip6_hop_by_hop_header_t *hbh0)
 
static uword ip6_pop_hop_by_hop_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tip6_hop_by_hop_init (vlib_main_t *vm)
 
int ip6_ioam_set_rewrite (u8 **rwp, u32 trace_type, u32 trace_option_elts, int has_pow_option, int has_ppc_option)
 
clib_error_tclear_ioam_rewrite_fn (void)
 
clib_error_tclear_ioam_rewrite_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tip6_ioam_trace_profile_set (u32 trace_option_elts, u32 trace_type, u32 node_id, u32 app_data, int has_pow_option, u32 trace_tsp, int has_ppc_option)
 
static clib_error_tip6_set_ioam_rewrite_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tip6_show_ioam_summary_cmd_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
int ip6_ioam_set_destination (ip6_address_t *addr, u32 mask_width, u32 vrf_id, int is_add, int is_pop, int is_none)
 
static clib_error_tip6_set_ioam_destination_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void vnet_register_ioam_end_of_path_callback (void *cb)
 

Variables

static f64 trace_tsp_mul [4] = {1, 1e3, 1e6, 1e9}
 
char * ppc_state [] = {"None", "Encap", "Decap"}
 
ip6_hop_by_hop_main_t ip6_hop_by_hop_main
 
vlib_node_registration_t ip6_hop_by_hop_node
 (constructor) VLIB_REGISTER_NODE (ip6_hop_by_hop_node) More...
 
static char * ip6_hop_by_hop_error_strings []
 
vlib_node_registration_t ip6_add_hop_by_hop_node
 (constructor) VLIB_REGISTER_NODE (ip6_add_hop_by_hop_node) More...
 
static char * ip6_add_hop_by_hop_error_strings []
 
vlib_node_registration_t ip6_pop_hop_by_hop_node
 (constructor) VLIB_REGISTER_NODE (ip6_pop_hop_by_hop_node) More...
 
static char * ip6_pop_hop_by_hop_error_strings []
 
vlib_cli_command_t ip6_clear_ioam_trace_cmd
 (constructor) VLIB_CLI_COMMAND (ip6_clear_ioam_trace_cmd) More...
 
vlib_cli_command_t ip6_set_ioam_rewrite_cmd
 (constructor) VLIB_CLI_COMMAND (ip6_set_ioam_rewrite_cmd) More...
 
vlib_cli_command_t ip6_show_ioam_run_cmd
 (constructor) VLIB_CLI_COMMAND (ip6_show_ioam_run_cmd) More...
 
vlib_cli_command_t ip6_set_ioam_destination_cmd
 (constructor) VLIB_CLI_COMMAND (ip6_set_ioam_destination_cmd) More...
 

Macro Definition Documentation

#define foreach_ip6_add_hop_by_hop_error   _(PROCESSED, "Pkts w/ added ip6 hop-by-hop options")

Definition at line 651 of file ip6_hop_by_hop.c.

#define foreach_ip6_hbyh_input_next
Value:
_(IP6_REWRITE, "ip6-rewrite") \
_(IP6_LOOKUP, "ip6-lookup") \
_(IP6_HBYH, "ip6-hop-by-hop")\
_(IP6_POP_HBYH, "ip6-pop-hop-by-hop")\
_(DROP, "error-drop")
DROP
Definition: error.def:41

Definition at line 40 of file ip6_hop_by_hop.c.

#define foreach_ip6_hop_by_hop_error
Value:
_(PROCESSED, "Pkts with ip6 hop-by-hop options") \
_(PROFILE_MISS, "Pkts with ip6 hop-by-hop options but no profile set") \
_(UNKNOWN_OPTION, "Unknown ip6 hop-by-hop options")

Definition at line 255 of file ip6_hop_by_hop.c.

#define foreach_ip6_pop_hop_by_hop_error
Value:
_(PROCESSED, "Pkts w/ removed ip6 hop-by-hop options") \
_(NO_HOHO, "Pkts w/ no ip6 hop-by-hop options") \
_(SCV_PASSED, "Pkts with SCV in Policy") \
_(SCV_FAILED, "Pkts with SCV out of Policy")

Definition at line 872 of file ip6_hop_by_hop.c.

#define OI_DECAP   100

Definition at line 38 of file ip6_hop_by_hop.c.

Enumeration Type Documentation

Enumerator
IP6_ADD_HOP_BY_HOP_N_ERROR 

Definition at line 654 of file ip6_hop_by_hop.c.

Enumerator
IP6_HBYH_INPUT_N_NEXT 

Definition at line 47 of file ip6_hop_by_hop.c.

Enumerator
IP6_HOP_BY_HOP_N_ERROR 

Definition at line 260 of file ip6_hop_by_hop.c.

Enumerator
IP6_POP_HOP_BY_HOP_N_ERROR 

Definition at line 878 of file ip6_hop_by_hop.c.

Function Documentation

clib_error_t* clear_ioam_rewrite_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)

Definition at line 1277 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

clib_error_t* clear_ioam_rewrite_fn ( void  )

Definition at line 1260 of file ip6_hop_by_hop.c.

+ Here is the caller graph for this function:

static u8 fetch_trace_data_size ( u8  trace_type)
inlinestatic

Definition at line 101 of file ip6_hop_by_hop.c.

+ Here is the caller graph for this function:

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

Definition at line 119 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 161 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 637 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 177 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 859 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ioam_end_of_path_validation ( vlib_main_t vm,
ip6_header_t ip0,
ip6_hop_by_hop_header_t hbh0 
)
inlinestatic

Definition at line 891 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 668 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

static clib_error_t* ip6_hop_by_hop_init ( vlib_main_t vm)
static

Definition at line 1167 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 274 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

int ip6_ioam_set_destination ( ip6_address_t addr,
u32  mask_width,
u32  vrf_id,
int  is_add,
int  is_pop,
int  is_none 
)

Definition at line 1430 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int ip6_ioam_set_rewrite ( u8 **  rwp,
u32  trace_type,
u32  trace_option_elts,
int  has_pow_option,
int  has_ppc_option 
)

Definition at line 1183 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* ip6_ioam_trace_profile_set ( u32  trace_option_elts,
u32  trace_type,
u32  node_id,
u32  app_data,
int  has_pow_option,
u32  trace_tsp,
int  has_ppc_option 
)

Definition at line 1291 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 955 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

static clib_error_t* ip6_set_ioam_destination_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1505 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

static clib_error_t* ip6_set_ioam_rewrite_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1321 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

static clib_error_t* ip6_show_ioam_summary_cmd_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1366 of file ip6_hop_by_hop.c.

+ Here is the call graph for this function:

void vnet_register_ioam_end_of_path_callback ( void cb)

Definition at line 1560 of file ip6_hop_by_hop.c.

Variable Documentation

char* ip6_add_hop_by_hop_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip6_add_hop_by_hop_error

Definition at line 661 of file ip6_hop_by_hop.c.

vlib_node_registration_t ip6_add_hop_by_hop_node
Initial value:
= {
.name = "ip6-add-hop-by-hop",
.vector_size = sizeof (u32),
.n_next_nodes = IP6_HBYH_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u8 * format_ip6_add_hop_by_hop_trace(u8 *s, va_list *args)
static uword ip6_add_hop_by_hop_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * ip6_add_hop_by_hop_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
#define foreach_ip6_hbyh_input_next

(constructor) VLIB_REGISTER_NODE (ip6_add_hop_by_hop_node)

Definition at line 649 of file ip6_hop_by_hop.c.

vlib_cli_command_t ip6_clear_ioam_trace_cmd
Initial value:
= {
.path = "clear ioam rewrite",
.short_help = "clear ioam rewrite",
}
clib_error_t * clear_ioam_rewrite_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip6_clear_ioam_trace_cmd)

Definition at line 1284 of file ip6_hop_by_hop.c.

char* ip6_hop_by_hop_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip6_hop_by_hop_error

Definition at line 267 of file ip6_hop_by_hop.c.

ip6_hop_by_hop_main_t ip6_hop_by_hop_main

Definition at line 36 of file ip6_hop_by_hop.c.

vlib_node_registration_t ip6_hop_by_hop_node
Initial value:
= {
.name = "ip6-hop-by-hop",
.vector_size = sizeof (u32),
.format_trace = format_ip6_hop_by_hop_trace,
.error_strings = ip6_hop_by_hop_error_strings,
.n_next_nodes = IP6_HBYH_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static uword ip6_hop_by_hop_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u8 * format_ip6_hop_by_hop_trace(u8 *s, va_list *args)
static char * ip6_hop_by_hop_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
#define foreach_ip6_hbyh_input_next

(constructor) VLIB_REGISTER_NODE (ip6_hop_by_hop_node)

Definition at line 253 of file ip6_hop_by_hop.c.

char* ip6_pop_hop_by_hop_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip6_pop_hop_by_hop_error

Definition at line 885 of file ip6_hop_by_hop.c.

vlib_node_registration_t ip6_pop_hop_by_hop_node
Initial value:
= {
.name = "ip6-pop-hop-by-hop",
.vector_size = sizeof (u32),
.n_next_nodes = IP6_HBYH_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static uword ip6_pop_hop_by_hop_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static u8 * format_ip6_pop_hop_by_hop_trace(u8 *s, va_list *args)
#define ARRAY_LEN(x)
Definition: clib.h:59
static char * ip6_pop_hop_by_hop_error_strings[]
unsigned int u32
Definition: types.h:88
#define foreach_ip6_hbyh_input_next

(constructor) VLIB_REGISTER_NODE (ip6_pop_hop_by_hop_node)

Definition at line 870 of file ip6_hop_by_hop.c.

vlib_cli_command_t ip6_set_ioam_destination_cmd
Initial value:
= {
.path = "set ioam destination",
.short_help = "set ioam destination <ip6-address>/<width> add | pop | none",
}
static clib_error_t * ip6_set_ioam_destination_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip6_set_ioam_destination_cmd)

Definition at line 1553 of file ip6_hop_by_hop.c.

vlib_cli_command_t ip6_set_ioam_rewrite_cmd
Initial value:
= {
.path = "set ioam rewrite",
.short_help = "set ioam rewrite trace-type <0x1f|0x3|0x9|0x11|0x19> trace-elts <nn> trace-tsp <0|1|2|3> node-id <node id in hex> app-data <app_data in hex> [pow] [ppc <encap|decap>]",
}
static clib_error_t * ip6_set_ioam_rewrite_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip6_set_ioam_rewrite_cmd)

Definition at line 1359 of file ip6_hop_by_hop.c.

vlib_cli_command_t ip6_show_ioam_run_cmd
Initial value:
= {
.path = "show ioam summary",
.short_help = "Summary of IOAM configuration",
}
static clib_error_t * ip6_show_ioam_summary_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip6_show_ioam_run_cmd)

Definition at line 1424 of file ip6_hop_by_hop.c.

char* ppc_state[] = {"None", "Encap", "Decap"}

Definition at line 34 of file ip6_hop_by_hop.c.

f64 trace_tsp_mul[4] = {1, 1e3, 1e6, 1e9}
static

Definition at line 32 of file ip6_hop_by_hop.c.