18 #ifndef __MPLS_FIB_TABLE_H__ 19 #define __MPLS_FIB_TABLE_H__ int(* fib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
u32 * fib_index_by_sw_if_index
u32 mpls_label_t
A label value only, i.e.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
void mpls_fib_forwarding_table_update(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, const dpo_id_t *dpo)
u32 mpls_fib_index_from_table_id(u32 table_id)
void mpls_fib_table_destroy(mpls_fib_t *mf)
fib_node_index_t mpls_fib_table_entry_add_from_ip_fib_entry(u32 table_id, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t fib_entry_index)
static u32 mpls_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
fib_node_index_t mpls_fib_table_lookup(const mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
flow_hash_config_t mpls_fib_table_get_flow_hash_config(u32 fib_index)
struct fib_table_t_ * fibs
A pool of all the MPLS FIBs.
u8 * format_mpls_fib_table_name(u8 *s, va_list *args)
u32 fib_node_index_t
A typedef of a node index.
void mpls_fib_table_entry_insert(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t fei)
static mpls_fib_t * mpls_fib_get(fib_node_index_t index)
void mpls_fib_table_walk(mpls_fib_t *fib, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
void mpls_fib_table_entry_remove(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
u32 mpls_fib_table_create_and_lock(void)
void mpls_fib_forwarding_table_reset(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static u32 vnet_mpls_uc_get_s(mpls_label_t label_exp_s_ttl)
static index_t mpls_fib_table_forwarding_lookup(u32 mpls_fib_index, const mpls_unicast_header_t *hdr)
Lookup a label and EOS bit in the MPLS_FIB table to retrieve the load-balance index to be used for pa...
index_t mf_lbs[MPLS_FIB_DB_SIZE]
The load-balance indeices keyed by 21 bit label+eos bit.
u32 mpls_fib_table_find_or_create_and_lock(u32 table_id)
enum mpls_eos_bit_t_ mpls_eos_bit_t