105 #define IP4_LOOKUP_NEXT_NODES { \ 106 [IP_LOOKUP_NEXT_DROP] = "ip4-drop", \ 107 [IP_LOOKUP_NEXT_PUNT] = "ip4-punt", \ 108 [IP_LOOKUP_NEXT_LOCAL] = "ip4-local", \ 109 [IP_LOOKUP_NEXT_ARP] = "ip4-arp", \ 110 [IP_LOOKUP_NEXT_GLEAN] = "ip4-glean", \ 111 [IP_LOOKUP_NEXT_REWRITE] = "ip4-rewrite", \ 112 [IP_LOOKUP_NEXT_MCAST] = "ip4-rewrite-mcast", \ 113 [IP_LOOKUP_NEXT_MIDCHAIN] = "ip4-midchain", \ 114 [IP_LOOKUP_NEXT_MCAST_MIDCHAIN] = "ip4-mcast-midchain", \ 115 [IP_LOOKUP_NEXT_ICMP_ERROR] = "ip4-icmp-error", \ 118 #define IP6_LOOKUP_NEXT_NODES { \ 119 [IP_LOOKUP_NEXT_DROP] = "ip6-drop", \ 120 [IP_LOOKUP_NEXT_PUNT] = "ip6-punt", \ 121 [IP_LOOKUP_NEXT_LOCAL] = "ip6-local", \ 122 [IP_LOOKUP_NEXT_ARP] = "ip6-discover-neighbor", \ 123 [IP_LOOKUP_NEXT_GLEAN] = "ip6-glean", \ 124 [IP_LOOKUP_NEXT_REWRITE] = "ip6-rewrite", \ 125 [IP_LOOKUP_NEXT_MCAST] = "ip6-rewrite-mcast", \ 126 [IP_LOOKUP_NEXT_MIDCHAIN] = "ip6-midchain", \ 127 [IP_LOOKUP_NEXT_MCAST_MIDCHAIN] = "ip6-mcast-midchain", \ 128 [IP_LOOKUP_NEXT_ICMP_ERROR] = "ip6-icmp-error", \ 129 [IP6_LOOKUP_NEXT_HOP_BY_HOP] = "ip6-hop-by-hop", \ 130 [IP6_LOOKUP_NEXT_ADD_HOP_BY_HOP] = "ip6-add-hop-by-hop", \ 131 [IP6_LOOKUP_NEXT_POP_HOP_BY_HOP] = "ip6-pop-hop-by-hop", \ 276 "IP adjacency cachline 0 is not offset");
279 "IP adjacency cachline 1 is more than one cachline size offset");
376 return (adj_per_adj_counters);
int adj_is_up(adj_index_t ai)
Return true if the adjacency is 'UP', i.e.
adj_flags_t ia_flags
Flags on the adjacency 1-bytes.
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
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.
ip_adjacency_flags_t_
Flags on an IP adjacency.
#define VLIB_BUFFER_PRE_DATA_SIZE
This packet is to be rewritten and forwarded to the next processing node.
#define STRUCT_OFFSET_OF(t, f)
adj_midchain_fixup_t fixup_func
A function to perform the post-rewrite fixup.
struct ip_adjacency_t_::@38::@40 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
ip_lookup_next_t
An adjacency is a representation of an attached L3 peer.
void adj_walk(u32 sw_if_index, adj_walk_cb_t cb, void *ctx)
Walk the Adjacencies on a given interface.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
struct ip_adjacency_t_ ip_adjacency_t
IP unicast adjacency.
vnet_link_t ia_link
link/ether-type 1 bytes
Adjacency to punt this packet.
ip46_address_t receive_addr
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
enum ip_adjacency_flags_t_ adj_flags_t
Flags on an IP adjacency.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
ip46_address_t next_hop
The recursive next-hop.
A Delagate is a means to implement the Delagation design pattern; the extension of an object's functi...
struct ip_adjacency_t_::@38::@41 glean
IP_LOOKUP_NEXT_GLEAN.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
dpo_id_t next_dpo
The next DPO to use.
struct ip_adjacency_t_::@38::@39 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
ip_adjacency_t * adj_pool
The global adjacnecy pool.
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
void adj_lock(adj_index_t adj_index)
Take a reference counting lock on the adjacency.
An node in the FIB graph.
fib_node_t ia_node
Linkage into the FIB node grpah.
const u8 * adj_get_rewrite(adj_index_t ai)
Return the link type of the adjacency.
union ip_adjacency_t_::@38 sub_type
Currently a sync walk is active.
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
Adjacency to drop this packet.
Multicast Midchain Adjacency.
Packets TX through the midchain do not increment the interface counters.
u32 fib_node_index_t
A typedef of a node index.
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
u32 adj_index_t
An index for adjacencies.
void adj_feature_update(u32 sw_if_index, u8 arc_index, u8 is_enable)
Notify the adjacency subsystem that the features settings for an interface have changed.
This packets follow a mid-chain adjacency.
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
This packets needs to go to ICMP error.
This packet is for one of our own IP addresses.
fib_protocol_t ia_nh_proto
The protocol of the neighbor/peer.
#define vnet_declare_rewrite(total_bytes)
void(* adj_midchain_fixup_t)(vlib_main_t *vm, struct ip_adjacency_t_ *adj, vlib_buffer_t *b0)
A function type for post-rewrite fixups on midchain adjacency.
ip_lookup_next_t lookup_next_index
Next hop after ip4-lookup.
void adj_child_remove(adj_index_t adj_index, u32 sibling_index)
Remove a child dependent.
u32 adj_get_sw_if_index(adj_index_t ai)
Return the sw interface index of the adjacency.
A collection of combined counters.
STATIC_ASSERT((STRUCT_OFFSET_OF(ip_adjacency_t, cacheline0)==0),"IP adjacency cachline 0 is not offset")
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
int adj_per_adj_counters
Global Config for enabling per-adjacency counters This is configurable because it comes with a non-ne...
#define CLIB_CACHE_LINE_BYTES
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
static int adj_are_counters_enabled(void)
Get the global configuration option for enabling per-adj counters.
struct adj_delegate_t_ * ia_delegates
more control plane members that do not fit on the first cacheline