|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
141 adj->rewrite_header.sw_if_index,
143 (
u8*)
"interface-output")->
index);
189 adj->rewrite_header.sw_if_index,
215 const void *fixup_data,
265 adj->rewrite_header.sw_if_index,
284 adj->rewrite_header.next_index =
291 adj->rewrite_header.sw_if_index,
314 entry_indicies = NULL;
348 entry_indicies = NULL;
477 u32 indent = va_arg(*ap,
u32);
482 s =
format(s,
" [features]");
488 &adj->rewrite_header, sizeof (adj->rewrite_data), indent);
489 s =
format (s,
"\n%Ustacked-on",
@ ADJ_FLAG_MIDCHAIN_NO_COUNT
u32 adj_dpo_get_urpf(const dpo_id_t *dpo)
adj_flags_t ia_flags
Flags on the adjacency 1-bytes.
vlib_node_registration_t ip4_midchain_node
(constructor) VLIB_REGISTER_NODE (ip4_midchain_node)
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
u16 lb_n_buckets
number of buckets in the load-balance.
static ip46_type_t adj_proto_to_46(fib_protocol_t proto)
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
index_t dpoi_index
the index of objects of that type
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
@ IP_LOOKUP_NEXT_ARP
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
u8 * format_vnet_link(u8 *s, va_list *ap)
vlib_node_registration_t adj_midchain_tx_node
(constructor) VLIB_REGISTER_NODE (adj_midchain_tx_node)
ip_lookup_main_t lookup_main
@ ADJ_FLAG_MIDCHAIN_FIXUP_IP4O4_HDR
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
ip4_main_t ip4_main
Global ip4 main structure.
const u8 * adj_get_rewrite(adj_index_t ai)
Return the rewrite string of the adjacency.
const static char *const midchain_ethernet_nodes[]
#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.
flow_hash_config_t lb_hash_config
the hash config to use when selecting a bucket.
@ IP_LOOKUP_NEXT_GLEAN
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
@ VNET_REWRITE_FIXUP_FLOW_HASH
this adj performs the flow hash fixup
#define FIB_NODE_INDEX_INVALID
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
const static char *const midchain_nsh_nodes[]
@ IP_LOOKUP_NEXT_LOCAL
This packet is for one of our own IP addresses.
@ ADJ_FLAG_MIDCHAIN_LOOPED
const static dpo_vft_t adj_midchain_dpo_vft
@ VNET_REWRITE_HAS_FEATURES
This adjacency/interface has output features configured.
@ IP_LOOKUP_NEXT_MIDCHAIN
This packets follow a mid-chain adjacency.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u16 adj_dpo_get_mtu(const dpo_id_t *dpo)
u8 output_feature_arc_index
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
void adj_nbr_midchain_update_next_node(adj_index_t adj_index, u32 next_node)
Update the VLIB node to which packets are sent post processing.
void adj_nbr_midchain_stack_on_fib_entry(adj_index_t ai, fib_node_index_t fei, fib_forward_chain_type_t fct)
[re]stack a midchain.
nsh_main_placeholder_t nsh_main_placeholder
void fib_entry_contribute_forwarding(fib_node_index_t fib_entry_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
dpo_proto_t vnet_link_to_dpo_proto(vnet_link_t linkt)
enum adj_flags_t_ adj_flags_t
Flags on an IP adjacency.
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
@ IP_LOOKUP_NEXT_DROP
Adjacency to drop this packet.
void dpo_stack(dpo_type_t child_type, dpo_proto_t child_proto, dpo_id_t *dpo, const dpo_id_t *parent)
Stack one DPO object on another, and thus establish a child-parent relationship.
static u32 adj_get_midchain_node(vnet_link_t link)
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
static u32 ip6_compute_flow_hash(const ip6_header_t *ip, flow_hash_config_t flow_hash_config)
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
void adj_midchain_module_init(void)
Module initialisation.
dpo_proto_t fib_forw_chain_type_to_dpo_proto(fib_forward_chain_type_t fct)
Convert from a chain type to the DPO proto it will install.
format_function_t format_vnet_rewrite
#define vlib_worker_thread_barrier_sync(X)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static u8 adj_midchain_get_feature_arc_index_for_link_type(const ip_adjacency_t *adj)
u32 fib_node_index_t
A typedef of a node index.
@ IP_LOOKUP_NEXT_REWRITE
This packet is to be rewritten and forwarded to the next processing node.
@ ADJ_FLAG_MIDCHAIN_FIXUP_FLOW_HASH
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
int adj_ndr_midchain_recursive_loop_detect(adj_index_t ai, fib_node_index_t **entry_indicies)
descend the FIB graph looking for loops
vlib_node_registration_t mpls_midchain_node
(constructor) VLIB_REGISTER_NODE (mpls_midchain_node)
@ IP_LOOKUP_NEXT_PUNT
Adjacency to punt this packet.
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.
const static char *const midchain_ip4_nodes[]
The per-protocol VLIB graph nodes that are assigned to a midchain object.
dpo_lock_fn_t dv_lock
A reference counting lock function.
const static char *const midchain_ip6_nodes[]
vlib_node_registration_t adj_l2_midchain_node
(constructor) VLIB_REGISTER_NODE (adj_l2_midchain_node)
@ IP_LOOKUP_NEXT_BCAST
Broadcast Adjacency.
#define CLIB_MEMORY_BARRIER()
void adj_midchain_teardown(ip_adjacency_t *adj)
adj_midchain_setup
u8 * format_dpo_id(u8 *s, va_list *args)
Format a DPO_id_t oject.
vlib_node_registration_t adj_midchain_tx_no_count_node
(constructor) VLIB_REGISTER_NODE (adj_midchain_tx_no_count_node)
@ VNET_REWRITE_FIXUP_IP4_O_4
this adj performs IP4 over IP4 fixup
@ IP_LOOKUP_NEXT_ICMP_ERROR
This packets needs to go to ICMP error.
static u32 adj_nbr_midchain_get_tx_node(ip_adjacency_t *adj)
const static char *const *const midchain_nodes[DPO_PROTO_NUM]
@ DPO_LOAD_BALANCE
load-balancing over a choice of [un]equal cost paths
void adj_nbr_midchain_stack(adj_index_t adj_index, const dpo_id_t *next)
adj_nbr_midchain_stack
int fib_entry_recursive_loop_detect(fib_node_index_t entry_index, fib_node_index_t **entry_indicies)
static void adj_dpo_unlock(dpo_id_t *dpo)
#define vec_free(V)
Free vector's memory (no header).
union ip_adjacency_t_::@144 sub_type
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
void adj_nbr_midchain_update_rewrite(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *fixup_data, adj_flags_t flags, u8 *rewrite)
adj_nbr_midchain_update_rewrite
u32 vnet_feature_modify_end_node(u8 arc_index, u32 sw_if_index, u32 end_node_index)
ethernet_main_t ethernet_main
description fragment has unexpected format
format_function_t format_ip46_address
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
static void adj_dpo_lock(dpo_id_t *dpo)
u8 * format_adj_midchain(u8 *s, va_list *ap)
Format a midchain adjacency.
u32 ia_cfg_index
feature [arc] config index
#define vec_foreach(var, vec)
Vector iterator.
static load_balance_t * load_balance_get(index_t lbi)
ip_lookup_main_t lookup_main
vlib_node_registration_t adj_nsh_midchain_node
(constructor) VLIB_REGISTER_NODE (adj_nsh_midchain_node)
static u32 ip4_compute_flow_hash(const ip4_header_t *ip, flow_hash_config_t flow_hash_config)
void adj_nbr_midchain_unstack(adj_index_t adj_index)
adj_nbr_midchain_unstack
u32 adj_index_t
An index for adjacencies.
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
const static char *const midchain_mpls_nodes[]
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.
static vlib_main_t * vlib_get_main(void)
vlib_node_registration_t ip6_midchain_node
(constructor) VLIB_REGISTER_NODE (ip6_midchain_node)
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
struct ip_adjacency_t_::@144::@145 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
u8 adj_is_midchain(adj_index_t ai)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
u16 lb_n_buckets_minus_1
number of buckets in the load-balance - 1.
void adj_midchain_setup(adj_index_t adj_index, adj_midchain_fixup_t fixup, const void *data, adj_flags_t flags)
adj_midchain_setup
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
void adj_nbr_midchain_reset_next_node(adj_index_t adj_index)
Return the adjacency's next node to its default value.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
@ ADJ_FLAG_MIDCHAIN_IP_STACK
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
u8 output_feature_arc_index
u8 output_feature_arc_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