|
FD.io VPP
v21.06-3-gbb25fbf28
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
361 ip46_address_t
nh = { 0 };
363 u32 rx_sw_if_index = ~0;
378 else if (
unformat (line_input,
"add"))
380 else if (
unformat (line_input,
"rx all"))
382 else if (
unformat (line_input,
"rx %U",
385 else if (
unformat (line_input,
"via %U %U",
389 else if (
unformat (line_input,
"via %U",
399 if (~0 == rx_sw_if_index)
427 .path =
"ip punt redirect",
429 .short_help =
"ip punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
451 .path =
"show ip punt redirect",
453 .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)
@ 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...)
#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)
dpo_proto_t frp_proto
The protocol of the address below.
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.
void ip_punt_redirect_add(fib_protocol_t fproto, u32 rx_sw_if_index, fib_forward_chain_type_t ct, fib_route_path_t *rpaths)
Add a punt redirect entry.
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
#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)
vl_api_interface_index_t tx_sw_if_index
void ip4_punt_redirect_del(u32 rx_sw_if_index)
void ip4_punt_redirect_add_paths(u32 rx_sw_if_index, fib_route_path_t *rpaths)
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,...)
void ip4_punt_redirect_add(u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
@ 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
vl_api_fib_path_type_t type
u8 * format_ip_punt_policer_trace(u8 *s, va_list *args)
#define VLIB_REGISTER_NODE(x,...)