Go to the source code of this file.
|
static u32 | mpls_fib_entry_mk_key (mpls_label_t label, mpls_eos_bit_t eos) |
|
u32 | mpls_fib_index_from_table_id (u32 table_id) |
|
static u32 | mpls_fib_create_with_table_id (u32 table_id, fib_source_t src) |
|
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) |
|
void | mpls_fib_table_destroy (u32 fib_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_insert (mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t lfei) |
|
void | mpls_fib_table_entry_remove (mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos) |
|
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 *mpls_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...
|
|
static void | mpls_fib_table_show_all (const mpls_fib_t *mpls_fib, vlib_main_t *vm) |
|
static void | mpls_fib_table_show_one (const mpls_fib_t *mpls_fib, mpls_label_t label, vlib_main_t *vm) |
|
static clib_error_t * | mpls_fib_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
|
u32 mpls_fib_index_from_table_id |
( |
u32 |
table_id | ) |
|
void mpls_fib_table_destroy |
( |
u32 |
fib_index | ) |
|
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.
An MPLS_FIB table;.
The entries in the table are programmed wtih one or more MOIs. These MOIs may result in different forwarding actions for end-of-stack (EOS) and non-EOS packets. Whether the two actions are the same more often than they are different, or vice versa, is a function of the deployment in which the router is used and thus not predictable. The desgin choice to make with an MPLS_FIB table is: 1 - 20 bit key: label only. When the EOS and non-EOS actions differ the result is a 'EOS-choice' object. 2 - 21 bit key: label and EOS-bit. The result is then the specific action based on EOS-bit.
20 bit key: Advantages:
- lower memory overhead, since there are few DB entries. Disadvantages:
- slower DP performance in the case the chains differ, as more objects are encounterd in the switch path
21 bit key: Advantages:
- faster DP performance Disadvantages
- increased memory footprint.
Switching between schemes based on observed/measured action similarity is not considered on the grounds of complexity and flip-flopping.
VPP mantra - favour performance over memory. We choose a 21 bit key. All lookups in an MPLS_FIB table must result in a DPO of type load-balance. This is the default result which links to drop
Definition at line 62 of file mpls_fib.c.
Initial value:= {
.path = "show mpls fib",
.short_help = "show mpls fib [summary] [table <n>]",
}
static clib_error_t * mpls_fib_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
(constructor) VLIB_CLI_COMMAND (mpls_fib_show_command)
Definition at line 452 of file mpls_fib.c.