74 BVT(clib_bihash_kv) kv, value;
80 kv.key[0] = dst->
as_u64[0];
81 kv.key[1] = dst->
as_u64[1];
82 fib = ((
u64)((fib_index))<<32);
84 for (i = 0; i < len; i++)
89 ASSERT(dst_address_length >= 0 && dst_address_length <= 128);
91 kv.key[0] &= mask->
as_u64[0];
92 kv.key[1] &= mask->
as_u64[1];
93 kv.key[2] = fib | dst_address_length;
95 rv = BV(clib_bihash_search_inline_2)(&table->ip6_hash, &kv, &value);
sll srl srl sll sra u16x4 i
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.
Definitions for all things IP (v4|v6) unicast and multicast lookup related.
int(* fib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
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)
u32 ip6_fib_table_find_or_create_and_lock(u32 table_id)
Get or create an IPv6 fib.
static u32 ip6_fib_table_fwding_lookup(ip6_main_t *im, u32 fib_index, const ip6_address_t *dst)
u8 * prefix_lengths_in_search_order
u32 ip6_fib_table_create_and_lock(void)
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 represenation 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
ip6_address_t fib_masks[129]
This table stores the routes that are used to forward traffic.
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.
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)
static load_balance_t * load_balance_get(index_t lbi)
ip6_fib_table_instance_t ip6_table[IP6_FIB_NUM_TABLES]
The two FIB tables; fwding and non-fwding.
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
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
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)
struct fib_table_t_ * fibs