FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ip6_punt_drop.c File Reference
+ Include dependency graph for ip6_punt_drop.c:

Go to the source code of this file.

Macros

#define foreach_ip6_punt_redirect_error   _(DROP, "ip6 punt redirect drop")
 

Enumerations

enum  ip6_punt_redirect_error_t { IP6_PUNT_REDIRECT_N_ERROR }
 

Functions

 VNET_FEATURE_ARC_INIT (ip6_punt)
 
 VNET_FEATURE_ARC_INIT (ip6_drop)
 
VLIB_NODE_FN() ip6_punt_policer_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip6_punt_policer_node, static)
 
VLIB_NODE_FN() ip6_drop_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_not_enabled_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_punt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip6_punt_end_of_arc, static)
 
 VNET_FEATURE_INIT (ip6_drop_end_of_arc, static)
 
void ip6_punt_policer_add_del (u8 is_add, u32 policer_index)
 
static clib_error_tip6_punt_police_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
VLIB_NODE_FN() ip6_punt_redirect_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip6_punt_redirect_node, static)
 
void ip6_punt_redirect_add (u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
 
void ip6_punt_redirect_add_paths (u32 rx_sw_if_index, fib_route_path_t *rpaths)
 
void ip6_punt_redirect_del (u32 rx_sw_if_index)
 
static clib_error_tip6_punt_redirect_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
static clib_error_tip6_punt_redirect_show_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 

Variables

ip_punt_policer_t ip6_punt_policer_cfg
 
static char * ip6_punt_policer_handoff_error_strings [] = { "congestion drop" }
 
vlib_main_tvm
 
vlib_main_t vlib_node_runtime_tnode
 
vlib_main_t vlib_node_runtime_t vlib_frame_tframe
 
vlib_node_registration_t ip6_punt_policer_handoff_node
 (constructor) VLIB_REGISTER_NODE (ip6_punt_policer_handoff_node) More...
 
static char * ip6_punt_policer_error_strings []
 
vlib_node_registration_t ip6_punt_policer_node
 (constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node) More...
 
vlib_node_registration_t ip6_drop_node
 (constructor) VLIB_REGISTER_NODE (ip6_drop_node) More...
 
vlib_node_registration_t ip6_not_enabled_node
 (constructor) VLIB_REGISTER_NODE (ip6_not_enabled_node) More...
 
vlib_node_registration_t ip6_punt_node
 (constructor) VLIB_REGISTER_NODE (ip6_punt_node) More...
 
static vlib_cli_command_t ip6_punt_policer_command
 (constructor) VLIB_CLI_COMMAND (ip6_punt_policer_command) More...
 
static char * ip6_punt_redirect_error_strings []
 
vlib_node_registration_t ip6_punt_redirect_node
 (constructor) VLIB_REGISTER_NODE (ip6_punt_redirect_node) More...
 
static vlib_cli_command_t ip6_punt_redirect_command
 (constructor) VLIB_CLI_COMMAND (ip6_punt_redirect_command) More...
 
static vlib_cli_command_t show_ip6_punt_redirect_command
 (constructor) VLIB_CLI_COMMAND (show_ip6_punt_redirect_command) More...
 

Macro Definition Documentation

◆ foreach_ip6_punt_redirect_error

#define foreach_ip6_punt_redirect_error   _(DROP, "ip6 punt redirect drop")

Definition at line 256 of file ip6_punt_drop.c.

Enumeration Type Documentation

◆ ip6_punt_redirect_error_t

Enumerator
IP6_PUNT_REDIRECT_N_ERROR 

Definition at line 259 of file ip6_punt_drop.c.

Function Documentation

◆ ip6_drop_node()

VLIB_NODE_FN() ip6_drop_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 104 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_not_enabled_node()

VLIB_NODE_FN() ip6_not_enabled_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 115 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_node()

VLIB_NODE_FN() ip6_punt_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 127 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_police_cmd()

static clib_error_t* ip6_punt_police_cmd ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)
static

Definition at line 196 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_policer_add_del()

void ip6_punt_policer_add_del ( u8  is_add,
u32  policer_index 
)

Definition at line 186 of file ip6_punt_drop.c.

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

◆ ip6_punt_policer_node()

VLIB_NODE_FN() ip6_punt_policer_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 70 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_redirect_add()

void ip6_punt_redirect_add ( u32  rx_sw_if_index,
u32  tx_sw_if_index,
ip46_address_t *  nh 
)

Definition at line 309 of file ip6_punt_drop.c.

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

◆ ip6_punt_redirect_add_paths()

void ip6_punt_redirect_add_paths ( u32  rx_sw_if_index,
fib_route_path_t rpaths 
)

Definition at line 329 of file ip6_punt_drop.c.

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

◆ ip6_punt_redirect_cmd()

static clib_error_t* ip6_punt_redirect_cmd ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)
static

Definition at line 348 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_redirect_del()

void ip6_punt_redirect_del ( u32  rx_sw_if_index)

Definition at line 339 of file ip6_punt_drop.c.

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

◆ ip6_punt_redirect_node()

VLIB_NODE_FN() ip6_punt_redirect_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 273 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ ip6_punt_redirect_show_cmd()

static clib_error_t* ip6_punt_redirect_show_cmd ( vlib_main_t vm,
unformat_input_t main_input,
vlib_cli_command_t cmd 
)
static

Definition at line 427 of file ip6_punt_drop.c.

+ Here is the call graph for this function:

◆ VNET_FEATURE_ARC_INIT() [1/2]

VNET_FEATURE_ARC_INIT ( ip6_drop  )

◆ VNET_FEATURE_ARC_INIT() [2/2]

VNET_FEATURE_ARC_INIT ( ip6_punt  )

◆ VNET_FEATURE_INIT() [1/4]

VNET_FEATURE_INIT ( ip6_drop_end_of_arc  ,
static   
)

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( ip6_punt_end_of_arc  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( ip6_punt_policer_node  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( ip6_punt_redirect_node  ,
static   
)

Variable Documentation

◆ frame

◆ ip6_drop_node

vlib_node_registration_t ip6_drop_node
Initial value:
=
{
.name = "ip6-drop",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_drop_node)

Definition at line 138 of file ip6_punt_drop.c.

◆ ip6_not_enabled_node

vlib_node_registration_t ip6_not_enabled_node
Initial value:
=
{
.name = "ip6-not-enabled",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_not_enabled_node)

Definition at line 149 of file ip6_punt_drop.c.

◆ ip6_punt_node

vlib_node_registration_t ip6_punt_node
Initial value:
=
{
.name = "ip6-punt",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-punt",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_punt_node)

Definition at line 160 of file ip6_punt_drop.c.

◆ ip6_punt_policer_cfg

ip_punt_policer_t ip6_punt_policer_cfg

Definition at line 38 of file ip6_punt_drop.c.

◆ ip6_punt_policer_command

vlib_cli_command_t ip6_punt_policer_command
static
Initial value:
=
{
.path = "ip6 punt policer",
.function = ip6_punt_police_cmd,
.short_help = "ip6 punt policer [add|del] <index>",
}

(constructor) VLIB_CLI_COMMAND (ip6_punt_policer_command)

Definition at line 247 of file ip6_punt_drop.c.

◆ ip6_punt_policer_error_strings

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

Definition at line 64 of file ip6_punt_drop.c.

◆ ip6_punt_policer_handoff_error_strings

char* ip6_punt_policer_handoff_error_strings[] = { "congestion drop" }
static

Definition at line 41 of file ip6_punt_drop.c.

◆ ip6_punt_policer_handoff_node

vlib_node_registration_t ip6_punt_policer_handoff_node
Initial value:
= {
.name = "ip6-punt-policer-handoff",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_handoff_node)

Definition at line 50 of file ip6_punt_drop.c.

◆ ip6_punt_policer_node

vlib_node_registration_t ip6_punt_policer_node
Initial value:
= {
.name = "ip6-punt-policer",
.vector_size = sizeof (u32),
.n_next_nodes = IP_PUNT_POLICER_N_NEXT,
.next_nodes = {
[IP_PUNT_POLICER_NEXT_DROP] = "ip6-drop",
[IP_PUNT_POLICER_NEXT_HANDOFF] = "ip6-punt-policer-handoff",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node)

Definition at line 82 of file ip6_punt_drop.c.

◆ ip6_punt_redirect_command

vlib_cli_command_t ip6_punt_redirect_command
static
Initial value:
=
{
.path = "ip6 punt redirect",
.function = ip6_punt_redirect_cmd,
.short_help = "ip6 punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
}

(constructor) VLIB_CLI_COMMAND (ip6_punt_redirect_command)

Definition at line 414 of file ip6_punt_drop.c.

◆ ip6_punt_redirect_error_strings

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

Definition at line 267 of file ip6_punt_drop.c.

◆ ip6_punt_redirect_node

vlib_node_registration_t ip6_punt_redirect_node
Initial value:
= {
.name = "ip6-punt-redirect",
.vector_size = sizeof (u32),
.n_next_nodes = IP_PUNT_REDIRECT_N_NEXT,
.next_nodes = {
[IP_PUNT_REDIRECT_NEXT_TX] = "ip6-rewrite",
[IP_PUNT_REDIRECT_NEXT_ARP] = "ip6-discover-neighbor",
},
}

(constructor) VLIB_REGISTER_NODE (ip6_punt_redirect_node)

Definition at line 283 of file ip6_punt_drop.c.

◆ node

Definition at line 44 of file ip6_punt_drop.c.

◆ show_ip6_punt_redirect_command

vlib_cli_command_t show_ip6_punt_redirect_command
static
Initial value:
=
{
.path = "show ip6 punt redirect",
.short_help = "show ip6 punt redirect",
.is_mp_safe = 1,
}

(constructor) VLIB_CLI_COMMAND (show_ip6_punt_redirect_command)

Definition at line 442 of file ip6_punt_drop.c.

◆ vm

Definition at line 44 of file ip6_punt_drop.c.

ip6_punt_redirect_show_cmd
static clib_error_t * ip6_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip6_punt_drop.c:427
ip6_punt_policer_error_strings
static char * ip6_punt_policer_error_strings[]
Definition: ip6_punt_drop.c:64
IP_PUNT_REDIRECT_NEXT_TX
@ IP_PUNT_REDIRECT_NEXT_TX
Definition: ip_punt_drop.h:253
IP_PUNT_POLICER_NEXT_DROP
@ IP_PUNT_POLICER_NEXT_DROP
Definition: ip_punt_drop.h:35
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: ip6_punt_drop.c:45
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
foreach_ip_punt_policer_error
#define foreach_ip_punt_policer_error
Definition: ip_punt_drop.h:46
ip6_punt_policer_handoff_error_strings
static char * ip6_punt_policer_handoff_error_strings[]
Definition: ip6_punt_drop.c:41
ip_punt_policer_t_::policer_index
u32 policer_index
Definition: ip_punt_drop.h:29
policer_handoff
static_always_inline uword policer_handoff(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 fq_index, u32 policer_index)
Definition: police_inlines.h:118
ip_punt_policer_t_::fq_index
u32 fq_index
Definition: ip_punt_drop.h:30
vm
vlib_main_t * vm
Definition: ip6_punt_drop.c:44
ip6_punt_policer_cfg
ip_punt_policer_t ip6_punt_policer_cfg
Definition: ip6_punt_drop.c:38
IP_PUNT_POLICER_N_NEXT
@ IP_PUNT_POLICER_N_NEXT
Definition: ip_punt_drop.h:37
format_policer_handoff_trace
u8 * format_policer_handoff_trace(u8 *s, va_list *args)
Definition: policer.c:25
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
IP_PUNT_POLICER_NEXT_HANDOFF
@ IP_PUNT_POLICER_NEXT_HANDOFF
Definition: ip_punt_drop.h:36
ip6_punt_police_cmd
static clib_error_t * ip6_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip6_punt_drop.c:196
ip6_punt_redirect_error_strings
static char * ip6_punt_redirect_error_strings[]
Definition: ip6_punt_drop.c:267
node
vlib_main_t vlib_node_runtime_t * node
Definition: ip6_punt_drop.c:44
format_ip_punt_redirect_trace
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
Definition: ip_punt_drop.c:23
u32
unsigned int u32
Definition: types.h:88
foreach_ip6_punt_redirect_error
#define foreach_ip6_punt_redirect_error
Definition: ip6_punt_drop.c:256
IP_PUNT_REDIRECT_NEXT_ARP
@ IP_PUNT_REDIRECT_NEXT_ARP
Definition: ip_punt_drop.h:254
IP_PUNT_REDIRECT_N_NEXT
@ IP_PUNT_REDIRECT_N_NEXT
Definition: ip_punt_drop.h:255
IP_PUNT_REDIRECT_NEXT_DROP
@ IP_PUNT_REDIRECT_NEXT_DROP
Definition: ip_punt_drop.h:252
ip6_punt_redirect_cmd
static clib_error_t * ip6_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
Definition: ip6_punt_drop.c:348
format_ip6_forward_next_trace
u8 * format_ip6_forward_next_trace(u8 *s, va_list *args)
Definition: ip6_forward.c:951
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
format_ip_punt_policer_trace
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
Definition: ip4_punt_drop.c:39