|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
76 &adj->rewrite_header);
123 adj->rewrite_header.sw_if_index),
128 adj->rewrite_header.dst_mcast_offset =
offset;
141 const void *fixup_data,
173 adj->rewrite_header.sw_if_index),
176 adj->rewrite_header.dst_mcast_offset =
offset;
338 return format(s,
"<invalid adjacency>");
342 s =
format(s,
"%U-mcast: ",
345 s =
format(s,
"[features] ");
348 &adj->rewrite_header, sizeof (adj->rewrite_data), 0);
360 s =
format(s,
"%U-mcast-midchain: ",
364 &adj->rewrite_header,
365 sizeof (adj->rewrite_data), 0);
366 s =
format (s,
"\n%Ustacked-on:\n%U%U",
435 "ip4-mcast-midchain",
440 "ip6-mcast-midchain",
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
#define FIB_PROTOCOL_MAX
Definition outside of enum so it does not need to be included in non-defaulted switch statements.
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
index_t dpoi_index
the index of objects of that type
void adj_delegate_adj_created(ip_adjacency_t *adj)
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_UP
const static dpo_vft_t adj_mcast_midchain_dpo_vft
void adj_mcast_walk(u32 sw_if_index, fib_protocol_t proto, adj_walk_cb_t cb, void *ctx)
Walk the multicast Adjacencies on a given interface.
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
void(* adj_midchain_fixup_t)(vlib_main_t *vm, const struct ip_adjacency_t_ *adj, vlib_buffer_t *b0, const void *data)
A function type for post-rewrite fixups on midchain adjacency.
static clib_error_t * adj_mcast_interface_delete(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
VNET_HW_INTERFACE_LINK_UP_DOWN_FUNCTION(adj_mcast_hw_interface_state_change)
adj_index_t adj_mcast_add_or_lock(fib_protocol_t proto, vnet_link_t link_type, u32 sw_if_index)
Mcast Adjacency.
const static char *const adj_mcast_midchain_ip6_nodes[]
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
void vnet_update_adjacency_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index, u32 ai)
@ VNET_REWRITE_HAS_FEATURES
This adjacency/interface has output features configured.
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
u16 adj_dpo_get_mtu(const dpo_id_t *dpo)
@ VNET_HW_INTERFACE_FLAG_LINK_UP
static clib_error_t * adj_mcast_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, u32 flags)
u32 adj_mcast_db_size(void)
Return the size of the adj DB.
void adj_mcast_midchain_update_rewrite(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *fixup_data, adj_flags_t flags, u8 *rewrite, u8 offset, u32 mask)
adj_mcast_midchain_update_rewrite
vnet_link_t ia_link
link/ether-type 1 bytes
void adj_nbr_update_rewrite_internal(ip_adjacency_t *adj, ip_lookup_next_t adj_next_index, u32 complete_next_index, u32 next_index, u8 *rewrite)
adj_nbr_update_rewrite_internal
vlib_node_registration_t ip4_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip4_rewrite_mcast_node)
VNET_SW_INTERFACE_ADMIN_UP_DOWN_FUNCTION(adj_mcast_interface_state_change)
static adj_index_t * adj_mcasts[FIB_PROTOCOL_MAX]
static void adj_dpo_unlock(dpo_id_t *dpo)
void adj_mcast_update_rewrite(adj_index_t adj_index, u8 *rewrite, u8 offset)
adj_mcast_update_rewrite
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(adj_mcast_interface_delete)
fib_node_bw_reason_flag_t fnbw_reason
The reason/trigger for the backwalk.
static int adj_is_valid(adj_index_t adj_index)
enum adj_flags_t_ adj_flags_t
Flags on an IP adjacency.
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
static clib_error_t * adj_mcast_hw_interface_state_change(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
Registered callback for HW interface state changes.
static walk_rc_t adj_mcast_hw_sw_interface_state_change(vnet_main_t *vnm, u32 sw_if_index, void *arg)
Invoked on each SW interface of a HW interface when the HW interface state changes.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u8 * format_adj_mcast(u8 *s, va_list *ap)
Format/display a mcast adjacency.
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
static adj_index_t adj_get_index(const ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
vnet_main_t * vnet_get_main(void)
format_function_t format_vnet_rewrite
struct clib_bihash_value offset
template key/value backing page structure
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
vlib_node_registration_t ip6_rewrite_mcast_node
(constructor) VLIB_REGISTER_NODE (ip6_rewrite_mcast_node)
const static char *const adj_mcast_midchain_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a mcast object.
u8 * format_adj_mcast_midchain(u8 *s, va_list *ap)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
dpo_lock_fn_t dv_lock
A reference counting lock function.
static void adj_dpo_lock(dpo_id_t *dpo)
@ DPO_ADJACENCY_MCAST_MIDCHAIN
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DOWN
const static char *const adj_mcast_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a mcast object.
void fib_walk_sync(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_back_walk_ctx_t *ctx)
Back walk all the children of a FIB node.
static u32 adj_get_mcast_node(fib_protocol_t proto)
void vnet_rewrite_init(vnet_main_t *vnm, u32 sw_if_index, vnet_link_t linkt, u32 this_node, u32 next_node, vnet_rewrite_header_t *rw)
u32 vnet_tx_node_index_for_sw_interface(vnet_main_t *vnm, u32 sw_if_index)
union ip_adjacency_t_::@144 sub_type
u8 * format_fib_protocol(u8 *s, va_list *ap)
template key/value backing page structure
void adj_mcast_remove(fib_protocol_t proto, u32 sw_if_index)
const static char *const adj_mcast_ip6_nodes[]
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,...
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
@ FIB_NODE_BW_REASON_FLAG_INTERFACE_DELETE
void adj_mcast_module_init(void)
Module initialisation.
u32 adj_index_t
An index for adjacencies.
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
A virtual function table regisitered for a DPO type.
void adj_midchain_setup(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *data, adj_flags_t flags)
adj_midchain_setup
const static char *const *const adj_mcast_midchain_nodes[DPO_PROTO_NUM]
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
Context passed between object during a back walk.
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
const static dpo_vft_t adj_mcast_dpo_vft
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void vnet_hw_interface_walk_sw(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_sw_interface_walk_t fn, void *ctx)
Walk the SW interfaces on a HW interface - this is the super interface and any sub-interfaces.
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
vl_api_interface_index_t sw_if_index
const static char *const *const adj_mcast_nodes[DPO_PROTO_NUM]
enum walk_rc_t_ walk_rc_t
Walk return code.
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
void dpo_register(dpo_type_t type, const dpo_vft_t *vft, const char *const *const *nodes)
For a given DPO type Register:
struct ip_adjacency_t_::@144::@146 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
vl_api_wireguard_peer_flags_t flags