|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef __MPLS_FIB_TABLE_H__
19 #define __MPLS_FIB_TABLE_H__
28 #define MPLS_FIB_DEFAULT_TABLE_ID 0
33 #define MPLS_FIB_KEY_SIZE 21
34 #define MPLS_FIB_DB_SIZE (1 << (MPLS_FIB_KEY_SIZE-1))
40 #define MPLS_FLOW_HASH_DEFAULT IP_FLOW_HASH_DEFAULT
void mpls_fib_forwarding_table_reset(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
static u32 vnet_mpls_uc_get_s(mpls_label_t label_exp_s_ttl)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
void mpls_fib_forwarding_table_update(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, const dpo_id_t *dpo)
static u32 vnet_mpls_uc_get_label(mpls_label_t label_exp_s_ttl)
fib_node_index_t mpls_fib_table_lookup(const mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
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)
u8 * format_mpls_fib_table_memory(u8 *s, va_list *args)
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
Required for pool_get_aligned.
static u32 mpls_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void mpls_fib_table_entry_insert(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t fei)
u32 mpls_fib_index_from_table_id(u32 table_id)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u32 fib_node_index_t
A typedef of a node index.
index_t mf_lbs[MPLS_FIB_DB_SIZE]
The load-balance indices keyed by 21 bit label+eos bit.
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.
u32 mpls_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
static mpls_fib_t * mpls_fib_get(fib_node_index_t index)
u8 * format_mpls_fib_table_name(u8 *s, va_list *args)
u32 mpls_fib_table_create_and_lock(fib_source_t src)
struct mpls_fib_t_ mpls_fib_t
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.
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...
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
enum fib_source_t_ fib_source_t
The different sources that can create a route.
u32 * fib_index_by_sw_if_index
u32 mpls_label_t
A label value only, i.e.
void mpls_fib_table_entry_remove(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
enum mpls_eos_bit_t_ mpls_eos_bit_t
uword * mf_entries
A hash table of entries.
vl_api_interface_index_t sw_if_index
void mpls_fib_table_destroy(u32 fib_index)
struct mpls_fib_t_ * mpls_fibs
A pool of all the MPLS FIBs.