|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
108 #define IP4_LOOKUP_NEXT_NODES { \
109 [IP_LOOKUP_NEXT_DROP] = "ip4-drop", \
110 [IP_LOOKUP_NEXT_PUNT] = "ip4-punt", \
111 [IP_LOOKUP_NEXT_LOCAL] = "ip4-local", \
112 [IP_LOOKUP_NEXT_ARP] = "ip4-arp", \
113 [IP_LOOKUP_NEXT_GLEAN] = "ip4-glean", \
114 [IP_LOOKUP_NEXT_REWRITE] = "ip4-rewrite", \
115 [IP_LOOKUP_NEXT_MCAST] = "ip4-rewrite-mcast", \
116 [IP_LOOKUP_NEXT_BCAST] = "ip4-rewrite-bcast", \
117 [IP_LOOKUP_NEXT_MIDCHAIN] = "ip4-midchain", \
118 [IP_LOOKUP_NEXT_MCAST_MIDCHAIN] = "ip4-mcast-midchain", \
119 [IP_LOOKUP_NEXT_ICMP_ERROR] = "ip4-icmp-error", \
122 #define IP6_LOOKUP_NEXT_NODES { \
123 [IP_LOOKUP_NEXT_DROP] = "ip6-drop", \
124 [IP_LOOKUP_NEXT_PUNT] = "ip6-punt", \
125 [IP_LOOKUP_NEXT_LOCAL] = "ip6-local", \
126 [IP_LOOKUP_NEXT_ARP] = "ip6-discover-neighbor", \
127 [IP_LOOKUP_NEXT_GLEAN] = "ip6-glean", \
128 [IP_LOOKUP_NEXT_REWRITE] = "ip6-rewrite", \
129 [IP_LOOKUP_NEXT_BCAST] = "ip6-rewrite-bcast", \
130 [IP_LOOKUP_NEXT_MCAST] = "ip6-rewrite-mcast", \
131 [IP_LOOKUP_NEXT_MIDCHAIN] = "ip6-midchain", \
132 [IP_LOOKUP_NEXT_MCAST_MIDCHAIN] = "ip6-mcast-midchain", \
133 [IP_LOOKUP_NEXT_ICMP_ERROR] = "ip6-icmp-error", \
134 [IP6_LOOKUP_NEXT_HOP_BY_HOP] = "ip6-hop-by-hop", \
135 [IP6_LOOKUP_NEXT_ADD_HOP_BY_HOP] = "ip6-add-hop-by-hop", \
136 [IP6_LOOKUP_NEXT_POP_HOP_BY_HOP] = "ip6-pop-hop-by-hop", \
196 #define ADJ_ATTR_NAMES { \
197 [ADJ_ATTR_SYNC_WALK_ACTIVE] = "walk-active", \
198 [ADJ_ATTR_MIDCHAIN_NO_COUNT] = "midchain-no-count", \
199 [ADJ_ATTR_MIDCHAIN_IP_STACK] = "midchain-ip-stack", \
200 [ADJ_ATTR_MIDCHAIN_LOOPED] = "midchain-looped", \
201 [ADJ_ATTR_MIDCHAIN_FIXUP_IP4O4_HDR] = "midchain-ip4o4-hdr-fixup", \
202 [ADJ_ATTR_MIDCHAIN_FIXUP_FLOW_HASH] = "midchain-flow-hash", \
205 #define FOR_EACH_ADJ_ATTR(_attr) \
206 for (_attr = ADJ_ATTR_SYNC_WALK_ACTIVE; \
207 _attr <= ADJ_ATTR_MIDCHAIN_FIXUP_FLOW_HASH; \
295 u8 __ia_midchain_pad[4];
365 "IP adjacency cacheline 0 is not offset");
368 "IP adjacency cacheline 1 is more than one cacheline size offset");
369 #if defined __x86_64__
372 "IP adjacency cacheline 3 is more than one cacheline size offset");
378 "IP adjacency nbr and midchain offsets don't match");
@ ADJ_FLAG_MIDCHAIN_NO_COUNT
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
static int adj_are_counters_enabled(void)
Get the global configuration option for enabling per-adj counters.
adj_flags_t ia_flags
Flags on the adjacency 1-bytes.
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
adj_midchain_fixup_t fixup_func
A function to perform the post-rewrite fixup.
@ IP_LOOKUP_NEXT_ARP
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
void adj_child_remove(adj_index_t adj_index, u32 sibling_index)
Remove a child dependent.
@ ADJ_FLAG_MIDCHAIN_FIXUP_IP4O4_HDR
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
const void * fixup_data
Fixup data passed back to the client in the fixup function.
@ IP6_LOOKUP_NEXT_POP_HOP_BY_HOP
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.
@ ADJ_ATTR_MIDCHAIN_LOOPED
If the midchain were to stack on its FIB entry a loop would form.
@ IP_LOOKUP_NEXT_GLEAN
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
@ ADJ_ATTR_MIDCHAIN_FIXUP_IP4O4_HDR
the fixup function is standard IP4o4 header
@ ADJ_ATTR_MIDCHAIN_FIXUP_FLOW_HASH
the fixup function performs the flow hash this means the flow hash is performed on the inner header,...
dpo_id_t next_dpo
The next DPO to use.
@ IP_LOOKUP_NEXT_LOCAL
This packet is for one of our own IP addresses.
@ ADJ_ATTR_SYNC_WALK_ACTIVE
Currently a sync walk is active.
@ ADJ_FLAG_MIDCHAIN_LOOPED
@ 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.
@ IP6_LOOKUP_NEXT_HOP_BY_HOP
const ip46_address_t ADJ_BCAST_ADDR
The special broadcast address (to construct a broadcast adjacency.
vnet_link_t ia_link
link/ether-type 1 bytes
int adj_is_up(adj_index_t ai)
Return true if the adjacency is 'UP', i.e.
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
int adj_recursive_loop_detect(adj_index_t ai, fib_node_index_t **entry_indicies)
descend the FIB graph looking for loops
static int adj_is_valid(adj_index_t adj_index)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
enum adj_flags_t_ adj_flags_t
Flags on an IP adjacency.
@ IP_LOOKUP_NEXT_MCAST_MIDCHAIN
Multicast Midchain Adjacency.
#define STRUCT_OFFSET_OF(t, f)
struct ip_adjacency_t_ ip_adjacency_t
IP unicast adjacency.
int adj_per_adj_counters
Global Config for enabling per-adjacency counters This is configurable because it comes with a non-ne...
u32 adj_child_add(adj_index_t adj_index, fib_node_type_t type, fib_node_index_t child_index)
Add a child dependent to an adjacency.
void adj_walk(u32 sw_if_index, adj_walk_cb_t cb, void *ctx)
Walk the Adjacencies on a given interface.
@ IP_LOOKUP_NEXT_DROP
Adjacency to drop this packet.
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
u8 * format_adj_flags(u8 *s, va_list *args)
Format adjacency flags.
ip_adjacency_t * adj_pool
The global adjacency pool.
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
@ ADJ_FLAG_SYNC_WALK_ACTIVE
struct adj_delegate_t_ * ia_delegates
A sorted vector of delegates.
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.
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
@ ADJ_FLAG_MIDCHAIN_FIXUP_FLOW_HASH
STATIC_ASSERT_SIZEOF(ip_adjacency_t, 4 *64)
@ IP_LOOKUP_NEXT_PUNT
Adjacency to punt this packet.
@ ADJ_ATTR_MIDCHAIN_NO_COUNT
Packets TX through the midchain do not increment the interface counters.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
VNET_DECLARE_REWRITE
Rewrite in second and third cache lines.
@ IP_LOOKUP_NEXT_BCAST
Broadcast Adjacency.
enum adj_attr_t_ adj_attr_t
Flags on an IP adjacency.
#define CLIB_CACHE_LINE_BYTES
@ IP_LOOKUP_NEXT_ICMP_ERROR
This packets needs to go to ICMP error.
struct ip_adjacency_t_::@144::@147 glean
IP_LOOKUP_NEXT_GLEAN.
ip_lookup_next_t
An adjacency is a representation of an attached L3 peer.
union ip_adjacency_t_::@144 sub_type
A collection of combined counters.
adj_flags_t_
Flags on an IP adjacency.
u32 ia_node_index
The VLIB node in which this adj is used to forward packets.
u32 ia_cfg_index
feature [arc] config index
fib_node_t ia_node
Linkage into the FIB node graph.
adj_attr_t_
Flags on an IP adjacency.
An node in the FIB graph.
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.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
STATIC_ASSERT((STRUCT_OFFSET_OF(ip_adjacency_t, cacheline0)==0), "IP adjacency cacheline 0 is not offset")
@ IP_LOOKUP_NEXT_MCAST
Multicast Adjacency.
struct ip_adjacency_t_::@144::@145 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
ip46_address_t next_hop
The recursive next-hop.
@ IP6_LOOKUP_NEXT_ADD_HOP_BY_HOP
vl_api_interface_index_t sw_if_index
fib_node_index_t fei
the FIB entry this midchain resolves through.
@ 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.
@ ADJ_ATTR_MIDCHAIN_IP_STACK
When stacking midchains on a fib-entry extract the choice from the load-balance returned based on an ...
Aggregate type for a prefix.
vl_api_fib_path_type_t type
const u8 * adj_get_rewrite(adj_index_t ai)
Return the link type of the adjacency.
VLIB buffer representation.
u32 adj_get_sw_if_index(adj_index_t ai)
Return the sw interface index of the adjacency.
struct ip_adjacency_t_::@144::@146 midchain
IP_LOOKUP_NEXT_MIDCHAIN.