31 #define IP6_FIB_DEFAULT_HASH_NUM_BUCKETS (64 * 1024) 32 #define IP6_FIB_DEFAULT_HASH_MEMORY_SIZE (32<<20) 53 #define IP6_FIB_NUM_TABLES (IP6_FIB_TABLE_NON_FWDING+1) 75 const ip6_address_t *
addr,
78 const ip6_address_t *
addr,
82 const ip6_address_t *
addr,
86 const ip6_address_t *
addr,
92 const ip6_address_t *
addr,
97 const ip6_address_t *
addr,
103 const ip6_address_t *
dst);
116 const ip6_address_t *
dst)
127 kv.
key[0] = dst->as_u64[0];
128 kv.
key[1] = dst->as_u64[1];
129 fib = ((
u64)((fib_index))<<32);
131 for (i = 0; i <
len; i++)
136 ASSERT(dst_address_length >= 0 && dst_address_length <= 128);
138 kv.
key[0] &= mask->as_u64[0];
139 kv.
key[1] &= mask->as_u64[1];
140 kv.
key[2] = fib | dst_address_length;
142 rv = clib_bihash_search_inline_2_24_8(&table->
ip6_hash, &kv, &value);
enum ip6_fib_table_instance_type_t_ ip6_fib_table_instance_type_t
Enumeration of the FIB table instance types.
enum fib_source_t_ fib_source_t
The different sources that can create a route.
The table that stores ALL routes learned by the DP.
static u32 ip6_fib_table_fwding_lookup(u32 fib_index, const ip6_address_t *dst)
vl_api_wireguard_peer_flags_t flags
static ip6_fib_t * ip6_fib_get(fib_node_index_t index)
int dpo_is_adj(const dpo_id_t *dpo)
Return TRUE is the DPO is any type of adjacency.
u32 ip6_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
Get or create an IPv6 fib.
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
enum fib_table_flags_t_ fib_table_flags_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u32 ip6_fib_table_fwding_lookup_with_if_index(ip6_main_t *im, u32 sw_if_index, const ip6_address_t *dst)
void ip6_fib_table_fwding_dpo_update(u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
u8 * prefix_lengths_in_search_order
clib_bihash_24_8_t ip6_hash
void ip6_fib_table_sub_tree_walk(u32 fib_index, const fib_prefix_t *root, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a sub-tree of the FIB table N.B: This is NOT safe to deletes. ...
Aggregate type for a prefix.
static u32 ip6_src_lookup_for_packet(ip6_main_t *im, vlib_buffer_t *b, ip6_header_t *i)
return the DPO that the LB stacks on.
A representation of a single IP6 table.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
void ip6_fib_table_entry_insert(u32 fib_index, const ip6_address_t *addr, u32 len, fib_node_index_t fib_entry_index)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
fib_node_index_t ip6_fib_table_lookup_exact_match(u32 fib_index, const ip6_address_t *addr, u32 len)
void ip6_fib_table_destroy(u32 fib_index)
static const dpo_id_t * load_balance_get_bucket_i(const load_balance_t *lb, u32 bucket)
static u32 ip6_fib_index_from_table_id(u32 table_id)
uword * fib_index_by_table_id
u32 ip6_fib_table_create_and_lock(fib_source_t src, fib_table_flags_t flags, u8 *desc)
ip6_address_t fib_masks[129]
ip6_fib_table_instance_type_t_
Enumeration of the FIB table instance types.
This table stores the routes that are used to forward traffic.
sll srl srl sll sra u16x4 i
u32 fib_node_index_t
A typedef of a node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
fib_table_walk_rc_t(* fib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
void ip6_fib_table_walk(u32 fib_index, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
void ip6_fib_table_entry_remove(u32 fib_index, const ip6_address_t *addr, u32 len)
#define IP6_FIB_NUM_TABLES
static load_balance_t * load_balance_get(index_t lbi)
i32 dst_address_length_refcounts[129]
u32 ip6_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
index_t dpoi_index
the index of objects of that type
struct ip6_fib_table_instance_t_ ip6_fib_table_instance_t
A representation of a single IP6 table.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
VLIB buffer representation.
uword * non_empty_dst_address_length_bitmap
fib_node_index_t ip6_fib_table_lookup(u32 fib_index, const ip6_address_t *addr, u32 len)
void ip6_fib_table_fwding_dpo_remove(u32 fib_index, const ip6_address_t *addr, u32 len, const dpo_id_t *dpo)
u8 * format_ip6_fib_table_memory(u8 *s, va_list *args)
struct fib_table_t_ * fibs
vl_api_interface_index_t sw_if_index