|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
24 .arc_name =
"ip4-punt",
30 .arc_name =
"ip4-drop",
37 #ifndef CLIB_MARCH_VARIANT
64 .name =
"ip4-punt-policer-handoff",
65 .vector_size =
sizeof (
u32),
78 #define _(sym,string) string,
88 vnet_feat_arc_ip4_punt.feature_arc_index,
94 .name =
"ip4-punt-policer",
95 .vector_size =
sizeof (
u32),
108 .arc_name =
"ip4-punt",
109 .node_name =
"ip4-punt-policer",
115 #define foreach_ip4_punt_redirect_error \
116 _(DROP, "ip4 punt redirect drop")
120 #define _(sym,str) IP4_PUNT_REDIRECT_ERROR_##sym,
127 #define _(sym,string) string,
137 vnet_feat_arc_ip4_punt.feature_arc_index,
143 .name =
"ip4-punt-redirect",
144 .vector_size =
sizeof (
u32),
159 .arc_name =
"ip4-punt",
160 .node_name =
"ip4-punt-redirect",
172 vnet_feat_arc_ip4_drop.feature_arc_index);
184 vnet_feat_arc_ip4_drop.feature_arc_index);
194 vnet_feat_arc_ip4_punt.feature_arc_index);
201 .vector_size =
sizeof (
u32),
211 .name =
"ip4-not-enabled",
212 .vector_size =
sizeof (
u32),
214 .sibling_of =
"ip4-drop",
221 .vector_size =
sizeof (
u32),
230 .arc_name =
"ip4-punt",
231 .node_name =
"error-punt",
236 .arc_name =
"ip4-drop",
237 .node_name =
"error-drop",
242 #ifndef CLIB_MARCH_VARIANT
270 if (
unformat (line_input,
"%d", &policer_index))
272 else if (
unformat (line_input,
"del"))
274 else if (
unformat (line_input,
"add"))
283 if (is_add && ~0 == policer_index)
307 .path =
"ip punt policer",
309 .short_help =
"ip punt policer [add|del] <index>",
313 #ifndef CLIB_MARCH_VARIANT
344 u32 rx_sw_if_index = ~0;
358 else if (
unformat (line_input,
"add"))
360 else if (
unformat (line_input,
"rx all"))
362 else if (
unformat (line_input,
"rx %U",
375 if (~0 == rx_sw_if_index)
405 .path =
"ip punt redirect",
407 .short_help =
"ip punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
429 .path =
"show ip punt redirect",
431 .short_help =
"show ip punt redirect",
static char * ip4_punt_policer_error_strings[]
static vlib_cli_command_t ip4_punt_policer_command
(constructor) VLIB_CLI_COMMAND (ip4_punt_policer_command)
static vlib_cli_command_t ip4_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (ip4_punt_redirect_command)
vlib_node_registration_t ip4_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node)
void ip4_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
void ip4_punt_redirect_add_paths(u32 rx_sw_if_index, const fib_route_path_t *rpaths)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
@ IP_PUNT_REDIRECT_NEXT_TX
@ IP_PUNT_POLICER_NEXT_DROP
@ VLIB_NODE_TYPE_INTERNAL
static vlib_cli_command_t show_ip4_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (show_ip4_punt_redirect_command)
#define clib_error_return(e, args...)
void ip_punt_redirect_add(fib_protocol_t fproto, u32 rx_sw_if_index, fib_forward_chain_type_t ct, const fib_route_path_t *rpaths)
Add a punt redirect entry.
#define foreach_ip_punt_policer_error
VNET_FEATURE_ARC_INIT(ip4_punt)
#define foreach_ip4_punt_redirect_error
void ip_punt_redirect_del(fib_protocol_t fproto, u32 rx_sw_if_index)
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)
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
IP4 punt policer configuration we police the punt rate to prevent overloading the host.
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define VLIB_NODE_FN(node)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
vlib_node_registration_t ip4_punt_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_node)
u8 * format_policer_handoff_trace(u8 *s, va_list *args)
vnet_main_t * vnet_get_main(void)
#define VLIB_NODE_FLAG_TRACE
static uword ip_punt_redirect(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, fib_protocol_t fproto)
static clib_error_t * ip4_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
void ip4_punt_policer_add_del(u8 is_add, u32 policer_index)
static clib_error_t * ip4_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
void ip4_punt_redirect_del(u32 rx_sw_if_index)
static uword ip_punt_policer(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index, u32 policer_index)
IP punt policing node function.
vlib_node_registration_t ip4_not_enabled_node
(constructor) VLIB_REGISTER_NODE (ip4_not_enabled_node)
#define VLIB_CLI_COMMAND(x,...)
static char * ip4_punt_redirect_error_strings[]
@ IP_PUNT_POLICER_NEXT_HANDOFF
vlib_node_registration_t ip4_punt_policer_handoff_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_handoff_node)
struct _vlib_node_registration vlib_node_registration_t
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
@ IP4_PUNT_REDIRECT_N_ERROR
#define vec_free(V)
Free vector's memory (no header).
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
vlib_node_registration_t ip4_punt_redirect_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_redirect_node)
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
unformat_function_t unformat_vnet_sw_interface
ip4_punt_redirect_error_t
description fragment has unexpected format
static uword ip4_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
ip_punt_policer_t ip4_punt_policer_cfg
A representation of a path as described by a route producer.
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
@ IP_PUNT_REDIRECT_NEXT_ARP
#define VNET_FEATURES(...)
@ IP_PUNT_REDIRECT_N_NEXT
VNET_FEATURE_INIT(ip4_punt_policer_node)
@ IP_PUNT_REDIRECT_NEXT_DROP
static char * ip4_punt_policer_handoff_error_strings[]
vlib_node_registration_t ip4_drop_node
(constructor) VLIB_REGISTER_NODE (ip4_drop_node)
static uword ip_drop_or_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index)
static clib_error_t * ip4_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
vlib_main_t vlib_node_runtime_t * node
uword unformat_fib_route_path(unformat_input_t *input, va_list *args)
Unformat a fib_route_path_t from CLI input.
vl_api_fib_path_type_t type
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
#define VLIB_REGISTER_NODE(x,...)