|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
24 .arc_name =
"ip6-punt",
30 .arc_name =
"ip6-drop",
37 #ifndef CLIB_MARCH_VARIANT
51 .name =
"ip6-punt-policer-handoff",
52 .vector_size =
sizeof (
u32),
65 #define _(sym,string) string,
75 vnet_feat_arc_ip6_punt.feature_arc_index,
83 .name =
"ip6-punt-policer",
84 .vector_size =
sizeof (
u32),
98 .arc_name =
"ip6-punt",
99 .node_name =
"ip6-punt-policer",
111 vnet_feat_arc_ip6_drop.feature_arc_index);
123 vnet_feat_arc_ip6_drop.feature_arc_index);
134 vnet_feat_arc_ip6_punt.feature_arc_index);
141 .vector_size =
sizeof (
u32),
151 .name =
"ip6-not-enabled",
152 .vector_size =
sizeof (
u32),
163 .vector_size =
sizeof (
u32),
172 .arc_name =
"ip6-punt",
173 .node_name =
"error-punt",
178 .arc_name =
"ip6-drop",
179 .node_name =
"error-drop",
184 #ifndef CLIB_MARCH_VARIANT
212 if (
unformat (line_input,
"%d", &policer_index))
214 else if (
unformat (line_input,
"del"))
216 else if (
unformat (line_input,
"add"))
225 if (is_add && ~0 == policer_index)
249 .path =
"ip6 punt policer",
251 .short_help =
"ip6 punt policer [add|del] <index>",
256 #define foreach_ip6_punt_redirect_error \
257 _(DROP, "ip6 punt redirect drop")
261 #define _(sym,str) IP6_PUNT_REDIRECT_ERROR_##sym,
268 #define _(sym,string) string,
278 vnet_feat_arc_ip6_punt.feature_arc_index,
284 .name =
"ip6-punt-redirect",
285 .vector_size =
sizeof (
u32),
300 .arc_name =
"ip6-punt",
301 .node_name =
"ip6-punt-redirect",
306 #ifndef CLIB_MARCH_VARIANT
356 u32 rx_sw_if_index = ~0;
370 else if (
unformat (line_input,
"add"))
372 else if (
unformat (line_input,
"rx all"))
374 else if (
unformat (line_input,
"rx %U",
377 else if (
unformat (line_input,
"via %U",
387 if (~0 == rx_sw_if_index)
416 .path =
"ip6 punt redirect",
418 .short_help =
"ip6 punt redirect [add|del] rx [<interface>|all] via [<nh>] <tx_interface>",
422 #ifndef CLIB_MARCH_VARIANT
444 .path =
"show ip6 punt redirect",
446 .short_help =
"show ip6 punt redirect",
static vlib_cli_command_t show_ip6_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (show_ip6_punt_redirect_command)
static clib_error_t * ip6_punt_redirect_show_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
void ip6_punt_policer_add_del(u8 is_add, u32 policer_index)
vlib_node_registration_t ip6_punt_redirect_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_redirect_node)
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
static char * ip6_punt_policer_error_strings[]
VNET_FEATURE_INIT(ip6_punt_policer_node, static)
@ IP_PUNT_REDIRECT_NEXT_TX
@ IP_PUNT_POLICER_NEXT_DROP
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
@ VLIB_NODE_TYPE_INTERNAL
#define clib_error_return(e, args...)
vlib_node_registration_t ip6_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node)
void ip6_punt_redirect_add_paths(u32 rx_sw_if_index, fib_route_path_t *rpaths)
#define foreach_ip_punt_policer_error
static char * ip6_punt_policer_handoff_error_strings[]
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.
ip6_punt_redirect_error_t
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)
IP4 punt policer configuration we police the punt rate to prevent overloading the host.
static vlib_cli_command_t ip6_punt_redirect_command
(constructor) VLIB_CLI_COMMAND (ip6_punt_redirect_command)
void ip6_punt_redirect_add(u32 rx_sw_if_index, u32 tx_sw_if_index, ip46_address_t *nh)
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.
vlib_node_registration_t ip6_not_enabled_node
(constructor) VLIB_REGISTER_NODE (ip6_not_enabled_node)
#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).
ip_punt_policer_t ip6_punt_policer_cfg
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)
@ IP6_PUNT_REDIRECT_N_ERROR
vl_api_interface_index_t tx_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.
#define VLIB_CLI_COMMAND(x,...)
@ IP_PUNT_POLICER_NEXT_HANDOFF
struct _vlib_node_registration vlib_node_registration_t
static clib_error_t * ip6_punt_police_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static char * ip6_punt_redirect_error_strings[]
#define vec_free(V)
Free vector's memory (no header).
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
vlib_main_t vlib_node_runtime_t * node
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
void ip6_punt_redirect_del(u32 rx_sw_if_index)
unformat_function_t unformat_vnet_sw_interface
vlib_node_registration_t ip6_drop_node
(constructor) VLIB_REGISTER_NODE (ip6_drop_node)
static vlib_cli_command_t ip6_punt_policer_command
(constructor) VLIB_CLI_COMMAND (ip6_punt_policer_command)
A representation of a path as described by a route producer.
#define foreach_ip6_punt_redirect_error
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
vlib_node_registration_t ip6_punt_policer_handoff_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_handoff_node)
#define VNET_FEATURES(...)
@ IP_PUNT_REDIRECT_N_NEXT
VNET_FEATURE_ARC_INIT(ip6_punt)
@ IP_PUNT_REDIRECT_NEXT_DROP
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
static clib_error_t * ip6_punt_redirect_cmd(vlib_main_t *vm, unformat_input_t *main_input, vlib_cli_command_t *cmd)
vlib_node_registration_t ip6_punt_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_node)
static uword ip_drop_or_punt(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 arc_index)
void ip6_forward_next_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t which_adj_index)
u8 * format_ip6_forward_next_trace(u8 *s, va_list *args)
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,...)