FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
ip4_punt_drop.c File Reference
+ Include dependency graph for ip4_punt_drop.c:

Go to the source code of this file.

Macros

#define foreach_ip4_punt_redirect_error   _(DROP, "ip4 punt redirect drop")
 

Enumerations

enum  ip4_punt_redirect_error_t { IP4_PUNT_REDIRECT_N_ERROR }
 

Functions

 VNET_FEATURE_ARC_INIT (ip4_punt)
 
 VNET_FEATURE_ARC_INIT (ip4_drop)
 
u8format_ip_punt_policer_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() ip4_punt_policer_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip4_punt_policer_node)
 
VLIB_NODE_FN() ip4_punt_redirect_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip4_punt_redirect_node, static)
 
VLIB_NODE_FN() ip4_drop_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_not_enabled_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword ip4_punt (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (ip4_punt_end_of_arc, static)
 
 VNET_FEATURE_INIT (ip4_drop_end_of_arc, static)
 
void ip4_punt_policer_add_del (u8 is_add, u32 policer_index)
 
static clib_error_tip4_punt_police_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
void ip4_punt_redirect_add (u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
 
void ip4_punt_redirect_add_paths (u32 rx_sw_if_index, fib_route_path_t *rpaths)
 
void ip4_punt_redirect_del (u32 rx_sw_if_index)
 
static clib_error_tip4_punt_redirect_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 
static clib_error_tip4_punt_redirect_show_cmd (vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
 

Variables

ip_punt_policer_t ip4_punt_policer_cfg
 
static char * ip4_punt_policer_error_strings []
 
vlib_node_registration_t ip4_punt_policer_node
 (constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node) More...
 
static char * ip4_punt_redirect_error_strings []
 
vlib_node_registration_t ip4_punt_redirect_node
 (constructor) VLIB_REGISTER_NODE (ip4_punt_redirect_node) More...
 
vlib_node_registration_t ip4_drop_node
 (constructor) VLIB_REGISTER_NODE (ip4_drop_node) More...
 
vlib_node_registration_t ip4_not_enabled_node
 (constructor) VLIB_REGISTER_NODE (ip4_not_enabled_node) More...
 
vlib_node_registration_t ip4_punt_node
 (constructor) VLIB_REGISTER_NODE (ip4_punt_node) More...
 
static vlib_cli_command_t ip4_punt_policer_command
 (constructor) VLIB_CLI_COMMAND (ip4_punt_policer_command) More...
 
static vlib_cli_command_t ip4_punt_redirect_command
 (constructor) VLIB_CLI_COMMAND (ip4_punt_redirect_command) More...
 
static vlib_cli_command_t show_ip4_punt_redirect_command
 (constructor) VLIB_CLI_COMMAND (show_ip4_punt_redirect_command) More...
 

Macro Definition Documentation

◆ foreach_ip4_punt_redirect_error

#define foreach_ip4_punt_redirect_error   _(DROP, "ip4 punt redirect drop")

Definition at line 91 of file ip4_punt_drop.c.

Enumeration Type Documentation

◆ ip4_punt_redirect_error_t

Enumerator
IP4_PUNT_REDIRECT_N_ERROR 

Definition at line 94 of file ip4_punt_drop.c.

Function Documentation

◆ format_ip_punt_policer_trace()

u8* format_ip_punt_policer_trace ( u8 s,
va_list *  args 
)

Definition at line 39 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_drop_node()

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

Definition at line 141 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_not_enabled_node()

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

Definition at line 152 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt()

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

Definition at line 164 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt_police_cmd()

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

Definition at line 233 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt_policer_add_del()

void ip4_punt_policer_add_del ( u8  is_add,
u32  policer_index 
)

Definition at line 223 of file ip4_punt_drop.c.

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

◆ ip4_punt_policer_node()

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

Definition at line 60 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt_redirect_add()

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

Definition at line 295 of file ip4_punt_drop.c.

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

◆ ip4_punt_redirect_add_paths()

void ip4_punt_redirect_add_paths ( u32  rx_sw_if_index,
fib_route_path_t rpaths 
)

Definition at line 316 of file ip4_punt_drop.c.

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

◆ ip4_punt_redirect_cmd()

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

Definition at line 335 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt_redirect_del()

void ip4_punt_redirect_del ( u32  rx_sw_if_index)

Definition at line 326 of file ip4_punt_drop.c.

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

◆ ip4_punt_redirect_node()

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

Definition at line 108 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ ip4_punt_redirect_show_cmd()

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

Definition at line 413 of file ip4_punt_drop.c.

+ Here is the call graph for this function:

◆ VNET_FEATURE_ARC_INIT() [1/2]

VNET_FEATURE_ARC_INIT ( ip4_punt  )

◆ VNET_FEATURE_ARC_INIT() [2/2]

VNET_FEATURE_ARC_INIT ( ip4_drop  )

◆ VNET_FEATURE_INIT() [1/4]

VNET_FEATURE_INIT ( ip4_punt_policer_node  )

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( ip4_punt_redirect_node  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( ip4_punt_end_of_arc  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( ip4_drop_end_of_arc  ,
static   
)

Variable Documentation

◆ ip4_drop_node

vlib_node_registration_t ip4_drop_node
Initial value:
=
{
.name = "ip4-drop",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1161

(constructor) VLIB_REGISTER_NODE (ip4_drop_node)

Definition at line 174 of file ip4_punt_drop.c.

◆ ip4_not_enabled_node

vlib_node_registration_t ip4_not_enabled_node
Initial value:
=
{
.name = "ip4-not-enabled",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1161

(constructor) VLIB_REGISTER_NODE (ip4_not_enabled_node)

Definition at line 185 of file ip4_punt_drop.c.

◆ ip4_punt_node

vlib_node_registration_t ip4_punt_node
Initial value:
=
{
.function = ip4_punt,
.name = "ip4-punt",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-punt",
},
}
unsigned int u32
Definition: types.h:88
static uword ip4_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1161

(constructor) VLIB_REGISTER_NODE (ip4_punt_node)

Definition at line 196 of file ip4_punt_drop.c.

◆ ip4_punt_policer_cfg

ip_punt_policer_t ip4_punt_policer_cfg
Initial value:
= {
.policer_index = ~0,
}

Definition at line 49 of file ip4_punt_drop.c.

◆ ip4_punt_policer_command

vlib_cli_command_t ip4_punt_policer_command
static
Initial value:
=
{
.path = "ip punt policer",
.function = ip4_punt_police_cmd,
.short_help = "ip punt policer [add|del] <index>",
}
static clib_error_t * ip4_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip4_punt_policer_command)

Definition at line 284 of file ip4_punt_drop.c.

◆ ip4_punt_policer_error_strings

char* ip4_punt_policer_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip_punt_policer_error
Definition: ip_punt_drop.h:44

Definition at line 54 of file ip4_punt_drop.c.

◆ ip4_punt_policer_node

vlib_node_registration_t ip4_punt_policer_node
Initial value:
= {
.name = "ip4-punt-policer",
.vector_size = sizeof (u32),
.n_next_nodes = IP_PUNT_POLICER_N_NEXT,
.next_nodes = {
[IP_PUNT_POLICER_NEXT_DROP] = "ip4-drop",
},
}
unsigned int u32
Definition: types.h:88
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
Definition: ip4_punt_drop.c:39
static char * ip4_punt_policer_error_strings[]
Definition: ip4_punt_drop.c:54
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node)

Definition at line 70 of file ip4_punt_drop.c.

◆ ip4_punt_redirect_command

vlib_cli_command_t ip4_punt_redirect_command
static
Initial value:
=
{
.path = "ip punt redirect",
.function = ip4_punt_redirect_cmd,
.short_help = "ip punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
}
static clib_error_t * ip4_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (ip4_punt_redirect_command)

Definition at line 404 of file ip4_punt_drop.c.

◆ ip4_punt_redirect_error_strings

char* ip4_punt_redirect_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_ip4_punt_redirect_error
Definition: ip4_punt_drop.c:91

Definition at line 102 of file ip4_punt_drop.c.

◆ ip4_punt_redirect_node

vlib_node_registration_t ip4_punt_redirect_node
Initial value:
= {
.name = "ip4-punt-redirect",
.vector_size = sizeof (u32),
.n_next_nodes = IP_PUNT_REDIRECT_N_NEXT,
.next_nodes = {
[IP_PUNT_REDIRECT_NEXT_TX] = "ip4-rewrite",
},
}
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
Definition: ip_punt_drop.c:25
unsigned int u32
Definition: types.h:88
static char * ip4_punt_redirect_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (ip4_punt_redirect_node)

Definition at line 118 of file ip4_punt_drop.c.

◆ show_ip4_punt_redirect_command

vlib_cli_command_t show_ip4_punt_redirect_command
static
Initial value:
=
{
.path = "show ip punt redirect",
.short_help = "show ip punt redirect",
.is_mp_safe = 1,
}
static clib_error_t * ip4_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)

(constructor) VLIB_CLI_COMMAND (show_ip4_punt_redirect_command)

Definition at line 428 of file ip4_punt_drop.c.