|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
69 return (
label << 1 | eos);
259 for (ii = 0; ii <
ARRAY_LEN(special_labels); ii++)
263 prefix.fp_label = special_labels[ii];
370 s =
format(s,
"%=30s %=6ld %=12ld\n",
"MPLS", n_tables,
mem);
384 vec_add1(lfeis, lfei);
452 s =
format (s,
"%v, fib_index:%d locks:[",
456 if (0 != fib_table->
ft_locks[source])
479 .path =
"show mpls fib",
480 .short_help =
"show mpls fib [summary] [table <n>]",
index_t dpoi_index
the index of objects of that type
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
void mpls_fib_table_entry_remove(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
dpo_type_t dpoi_type
the type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
int fib_entry_cmp_for_sort(void *i1, void *i2)
#define FIB_ENTRY_FORMAT_DETAIL
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P with alignment A.
static u32 mpls_fib_entry_mk_key(mpls_label_t label, mpls_eos_bit_t eos)
uword * fib_index_by_table_id
A hash table to lookup the mpls_fib by table ID.
#define MPLS_IETF_ROUTER_ALERT_LABEL
index_t load_balance_create(u32 n_buckets, dpo_proto_t lb_proto, flow_hash_config_t fhc)
#define FIB_NODE_INDEX_INVALID
#define pool_put(P, E)
Free an object E in pool P.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
u32 mpls_fib_index_from_table_id(u32 table_id)
@ FIB_ENTRY_FLAG_EXCLUSIVE
#define hash_create(elts, value_bytes)
#define MPLS_FLOW_HASH_DEFAULT
There are no options for controlling the MPLS flow hash, but since it mostly entails using IP data to...
#define hash_set(h, key, value)
A protocol Independent FIB table.
void mpls_fib_table_destroy(u32 fib_index)
#define pool_foreach(VAR, POOL)
Iterate through pool.
u32 mpls_fib_table_find_or_create_and_lock(u32 table_id, fib_source_t src)
static clib_error_t * mpls_fib_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define MPLS_IS_REPLICATE
The top bit of the index, which is the result of the MPLS lookup is used to determine if the DPO is a...
fib_node_index_t ft_index
Index into FIB vector.
u32 ft_table_id
Table ID (hash key) for this FIB.
u8 * ft_desc
Table description.
static vlib_cli_command_t mpls_fib_show_command
(constructor) VLIB_CLI_COMMAND (mpls_fib_show_command)
u32 * ft_locks
per-source number of locks on the table
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u8 * format_fib_source(u8 *s, va_list *args)
u32 fib_node_index_t
A typedef of a node index.
#define vec_foreach_index(var, v)
Iterate over vector indices.
#define hash_foreach(key_var, value_var, h, body)
sll srl srl sll sra u16x4 i
index_t mf_lbs[MPLS_FIB_DB_SIZE]
The load-balance indices keyed by 21 bit label+eos bit.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define VLIB_CLI_COMMAND(x,...)
u8 * format_mpls_fib_table_memory(u8 *s, va_list *args)
static u32 mpls_fib_create_with_table_id(u32 table_id, fib_source_t src)
#define CLIB_CACHE_LINE_BYTES
#define MPLS_IETF_IPV6_EXPLICIT_NULL_LABEL
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
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.
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_table_entry_insert(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos, fib_node_index_t lfei)
void load_balance_set_bucket(index_t lbi, u32 bucket, const dpo_id_t *next)
@ DPO_LOAD_BALANCE
load-balancing over a choice of [un]equal cost paths
void mpls_fib_forwarding_table_reset(mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
#define vec_free(V)
Free vector's memory (no header).
@ LOOKUP_TABLE_FROM_INPUT_INTERFACE
static mpls_fib_t * mpls_fib_get(fib_node_index_t index)
u32 ft_flow_hash_config
flow hash configuration
description fragment has unexpected format
fib_node_index_t mpls_fib_table_lookup(const mpls_fib_t *mf, mpls_label_t label, mpls_eos_bit_t eos)
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
static void mpls_fib_table_show_one(const mpls_fib_t *mpls_fib, mpls_label_t label, vlib_main_t *vm)
const dpo_id_t * punt_dpo_get(dpo_proto_t proto)
#define vec_foreach(var, vec)
Vector iterator.
struct mpls_fib_t_ mpls_fib_t
static uword pool_elts(void *v)
Number of active elements in a pool.
@ FIB_SOURCE_SPECIAL
Special sources.
#define hash_unset(h, key)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define FOR_EACH_MPLS_EOS_BIT(_eos)
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
#define MPLS_IETF_IPV4_EXPLICIT_NULL_LABEL
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.
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 mpls_label_t
A label value only, i.e.
struct fib_table_t_ * fibs
A pool of all the MPLS FIBs.
static void mpls_fib_table_show_all(const mpls_fib_t *mpls_fib, vlib_main_t *vm)
fib_protocol_t ft_proto
Which protocol this table serves.
static index_t mpls_fib_drop_dpo_index
An MPLS_FIB table;.
enum mpls_eos_bit_t_ mpls_eos_bit_t
#define MPLS_LABEL_INVALID
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
uword * mf_entries
A hash table of entries.
u32 * ft_src_route_counts
Per-source route counters.
void lookup_dpo_add_or_lock_w_fib_index(fib_node_index_t fib_index, dpo_proto_t proto, lookup_cast_t cast, lookup_input_t input, lookup_table_t table_config, dpo_id_t *dpo)
struct mpls_fib_t_ * mpls_fibs
A pool of all the MPLS FIBs.
Aggregate type for a prefix.
u32 mpls_fib_table_create_and_lock(fib_source_t src)
u8 * format_fib_entry(u8 *s, va_list *args)