|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
65 if (
vec_len (rxs) <= rx_sw_if_index)
68 return rxs[rx_sw_if_index];
79 if (~0 == rx_sw_if_index)
110 if (~0 == rx_sw_if_index)
115 if ((
vec_len (rxs) <= rx_sw_if_index) ||
146 s =
format (s,
" rx %U via:\n",
162 u32 ii, rx_sw_if_index;
174 rx_sw_if_index = (ii == 0 ? ~0 : ii);
175 cb (rx_sw_if_index, rx,
ctx);
183 return (&(ipr->
node));
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
static void ip_punt_redirect_stack(ip_punt_redirect_rx_t *ipr)
vlib_node_registration_t ip4_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip4_punt_policer_node)
static clib_error_t * ip_punt_drop_init(vlib_main_t *vm)
static fib_node_back_walk_rc_t ip_punt_redirect_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
vlib_main_t vlib_node_runtime_t * node
A FIB graph nodes virtual function table.
vlib_node_registration_t ip6_punt_policer_node
(constructor) VLIB_REGISTER_NODE (ip6_punt_policer_node)
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vnet_sw_interface_t * vnet_get_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
void ip_punt_redirect_del(fib_protocol_t fproto, u32 rx_sw_if_index)
index_t * redirect_by_rx_sw_if_index[FIB_PROTOCOL_IP_MAX]
per-RX interface configuration.
u32 vlib_frame_queue_main_init(u32 node_index, u32 frame_queue_nelts)
ip_punt_redirect_cfg_t ip_punt_redirect_cfg
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.
#define STRUCT_OFFSET_OF(t, f)
fib_node_t node
Node linkage into the FIB graph.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
ip_punt_policer_t ip6_punt_policer_cfg
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
static void ip_punt_redirect_last_lock_gone(fib_node_t *node)
vnet_main_t * vnet_get_main(void)
u8 * format_fib_path_list(u8 *s, va_list *args)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
walk_rc_t(* ip_punt_redirect_walk_cb_t)(u32 rx_sw_if_index, const ip_punt_redirect_rx_t *redirect, void *arg)
u32 fib_node_index_t
A typedef of a node index.
static ip_punt_redirect_rx_t * ip_punt_redirect_get_from_node(fib_node_t *node)
#define vec_foreach_index(var, v)
Iterate over vector indices.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void dpo_stack_from_node(u32 child_node_index, dpo_id_t *dpo, const dpo_id_t *parent)
Stack one DPO object on another, and thus establish a child parent relationship.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
IP4 punt redirect per-rx interface configuration redirect punted traffic to another location.
u32 fib_path_list_child_add(fib_node_index_t path_list_index, fib_node_type_t child_type, fib_node_index_t child_index)
void fib_path_list_contribute_forwarding(fib_node_index_t path_list_index, fib_forward_chain_type_t fct, fib_path_list_fwd_flags_t flags, dpo_id_t *dpo)
void fib_node_register_type(fib_node_type_t type, const fib_node_vft_t *vft)
fib_node_register_type
static fib_node_t * ip_punt_redirect_get_node(fib_node_index_t index)
@ FIB_NODE_BACK_WALK_CONTINUE
void ip_punt_redirect_walk(fib_protocol_t fproto, ip_punt_redirect_walk_cb_t cb, void *ctx)
fib_forward_chain_type_t payload_type
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
index_t ip_punt_redirect_find(fib_protocol_t fproto, u32 rx_sw_if_index)
dpo_id_t dpo
redirect forwarding
u8 * format_ip_punt_redirect(u8 *s, va_list *args)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
u8 * format_ip_punt_redirect_trace(u8 *s, va_list *args)
description fragment has unexpected format
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
@ FIB_NODE_TYPE_IP_PUNT_REDIRECT
#define VLIB_INIT_FUNCTION(x)
ip_punt_policer_t ip4_punt_policer_cfg
A representation of a path as described by a route producer.
static_always_inline ip_punt_redirect_rx_t * ip_punt_redirect_get(index_t rrxi)
void fib_path_list_child_remove(fib_node_index_t path_list_index, u32 si)
An node in the FIB graph.
void fib_node_init(fib_node_t *node, fib_node_type_t type)
static vlib_main_t * vlib_get_main(void)
static const fib_node_vft_t ip_punt_redirect_vft
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ FIB_PATH_LIST_FLAG_NO_URPF
Context passed between object during a back walk.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
IP punt redirect configuration.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
fib_node_index_t fib_path_list_create(fib_path_list_flags_t flags, const fib_route_path_t *rpaths)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
ip_punt_redirect_rx_t * pool
@ FIB_PATH_LIST_FWD_FLAG_COLLAPSE
format_function_t format_vnet_sw_interface_name