FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
mpls_fib.h File Reference
+ Include dependency graph for mpls_fib.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mpls_fib_t_
 

Macros

#define MPLS_FIB_DEFAULT_TABLE_ID   0
 
#define MPLS_FIB_KEY_SIZE   21
 Type exposure is to allow the DP fast/inlined access. More...
 
#define MPLS_FIB_DB_SIZE   (1 << (MPLS_FIB_KEY_SIZE-1))
 
#define MPLS_FLOW_HASH_DEFAULT   0
 There are no options for controlling the MPLS flow hash. More...
 

Typedefs

typedef struct mpls_fib_t_ mpls_fib_t
 

Functions

static mpls_fib_tmpls_fib_get (fib_node_index_t index)
 
u32 mpls_fib_table_find_or_create_and_lock (u32 table_id, fib_source_t src)
 
u32 mpls_fib_table_create_and_lock (fib_source_t src)
 
u32 mpls_fib_index_from_table_id (u32 table_id)
 
u8format_mpls_fib_table_name (u8 *s, va_list *args)
 
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)
 
fib_node_index_t mpls_fib_table_lookup (const mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
 
void mpls_fib_table_entry_remove (mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
 
void mpls_fib_table_entry_insert (mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t fei)
 
void mpls_fib_table_destroy (u32 fib_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)
 
void mpls_fib_forwarding_table_reset (mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
 
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. More...
 
u8format_mpls_fib_table_memory (u8 *s, va_list *args)
 
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 packet forwarding. More...
 
static u32 mpls_fib_table_get_index_for_sw_if_index (u32 sw_if_index)
 

Macro Definition Documentation

◆ MPLS_FIB_DB_SIZE

#define MPLS_FIB_DB_SIZE   (1 << (MPLS_FIB_KEY_SIZE-1))

Definition at line 34 of file mpls_fib.h.

◆ MPLS_FIB_DEFAULT_TABLE_ID

#define MPLS_FIB_DEFAULT_TABLE_ID   0

Definition at line 28 of file mpls_fib.h.

◆ MPLS_FIB_KEY_SIZE

#define MPLS_FIB_KEY_SIZE   21

Type exposure is to allow the DP fast/inlined access.

Definition at line 33 of file mpls_fib.h.

◆ MPLS_FLOW_HASH_DEFAULT

#define MPLS_FLOW_HASH_DEFAULT   0

There are no options for controlling the MPLS flow hash.

Definition at line 39 of file mpls_fib.h.

Typedef Documentation

◆ mpls_fib_t

typedef struct mpls_fib_t_ mpls_fib_t

Function Documentation

◆ format_mpls_fib_table_memory()

u8* format_mpls_fib_table_memory ( u8 s,
va_list *  args 
)

Definition at line 363 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_mpls_fib_table_name()

u8* format_mpls_fib_table_name ( u8 s,
va_list *  args 
)
+ Here is the caller graph for this function:

◆ mpls_fib_forwarding_table_reset()

void mpls_fib_forwarding_table_reset ( mpls_fib_t mf,
mpls_label_t  label,
mpls_eos_bit_t  eos 
)

Definition at line 337 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_forwarding_table_update()

void mpls_fib_forwarding_table_update ( mpls_fib_t mf,
mpls_label_t  label,
mpls_eos_bit_t  eos,
const dpo_id_t dpo 
)

Definition at line 315 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_get()

static mpls_fib_t* mpls_fib_get ( fib_node_index_t  index)
inlinestatic

Definition at line 62 of file mpls_fib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_index_from_table_id()

u32 mpls_fib_index_from_table_id ( u32  table_id)

Definition at line 73 of file mpls_fib.c.

+ Here is the caller graph for this function:

◆ mpls_fib_table_create_and_lock()

u32 mpls_fib_table_create_and_lock ( fib_source_t  src)

Definition at line 238 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_destroy()

void mpls_fib_table_destroy ( u32  fib_index)

Definition at line 244 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_entry_add_from_ip_fib_entry()

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 
)
+ Here is the caller graph for this function:

◆ mpls_fib_table_entry_insert()

void mpls_fib_table_entry_insert ( mpls_fib_t mf,
mpls_label_t  label,
mpls_eos_bit_t  eos,
fib_node_index_t  fei 
)

Definition at line 298 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_entry_remove()

void mpls_fib_table_entry_remove ( mpls_fib_t mf,
mpls_label_t  label,
mpls_eos_bit_t  eos 
)

Definition at line 307 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_find_or_create_and_lock()

u32 mpls_fib_table_find_or_create_and_lock ( u32  table_id,
fib_source_t  src 
)

Definition at line 224 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_forwarding_lookup()

static index_t mpls_fib_table_forwarding_lookup ( u32  mpls_fib_index,
const mpls_unicast_header_t hdr 
)
inlinestatic

Lookup a label and EOS bit in the MPLS_FIB table to retrieve the load-balance index to be used for packet forwarding.

Definition at line 121 of file mpls_fib.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_get_index_for_sw_if_index()

static u32 mpls_fib_table_get_index_for_sw_if_index ( u32  sw_if_index)
inlinestatic

Definition at line 137 of file mpls_fib.h.

+ Here is the caller graph for this function:

◆ mpls_fib_table_lookup()

fib_node_index_t mpls_fib_table_lookup ( const mpls_fib_t mf,
mpls_label_t  label,
mpls_eos_bit_t  eos 
)

Definition at line 283 of file mpls_fib.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_fib_table_walk()

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.

If you need to delete walk the whole table and store elements in a vector, then delete the elements

Definition at line 349 of file mpls_fib.c.

+ Here is the caller graph for this function: