|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __MFIB_TABLE_H__
17 #define __MFIB_TABLE_H__
28 #define MFIB_TABLE_N_LOCKS (MFIB_N_SOURCES+1)
29 #define MFIB_TABLE_TOTAL_LOCKS MFIB_N_SOURCES
49 #define MFIB_TABLE_ATTRIBUTE_MAX (MFIB_TABLE_ATTRIBUTE_LAST+1)
51 #define MFIB_TABLE_ATTRIBUTES { \
52 [MFIB_TABLE_ATTRIBUTE_RESYNC] = "resync", \
55 #define FOR_EACH_MFIB_TABLE_ATTRIBUTE(_item) \
56 for (_item = MFIB_TABLE_ATTRIBUTE_FIRST; \
57 _item < MFIB_TABLE_ATTRIBUTE_MAX; \
void mfib_table_flush(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Flush all entries from a table for the source.
u32 mft_locks[MFIB_TABLE_N_LOCKS]
number of locks on the table
u8 * format_mfib_table_flags(u8 *s, va_list *args)
fib_node_index_t mfib_table_entry_path_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath)
Add n paths to an entry (aka route) in the FIB.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
Required for pool_get_aligned.
u32 mfib_table_get_num_entries(u32 fib_index, fib_protocol_t proto)
Return the number of entries in the FIB added by a given source.
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
struct mfib_table_t_ mfib_table_t
A protocol Independent IP multicast FIB table.
u32 mft_total_route_counts
Total route counters.
Aggregate type for a prefix.
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
enum mfib_table_attribute_t_ mfib_table_attribute_t
Flags for the source data.
u8 * format_mfib_table_memory(u8 *s, va_list *args)
format (display) the memory usage for mfibs
enum mfib_entry_flags_t_ mfib_entry_flags_t
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, mfib_source_t source)
Get the index of the FIB for a Table-ID.
A protocol Independent IP multicast FIB table.
void mfib_table_sweep(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Signal that the table has converged, i.e.
void mfib_table_entry_delete_index(fib_node_index_t entry_index, mfib_source_t source)
Delete a FIB entry.
enum mfib_table_flags_t_ mfib_table_flags_t
enum mfib_source_t_ mfib_source_t
Possible [control plane] sources of MFIB entries.
fib_node_index_t mfib_table_entry_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, fib_rpf_id_t rpf_id, mfib_entry_flags_t flags)
Add a new (with no replication) or lock an existing entry.
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
fib_node_index_t mft_index
Index into FIB vector.
fib_node_index_t mfib_table_lookup_exact_match(u32 fib_index, const mfib_prefix_t *prefix)
Perfom an exact match in the non-forwarding table.
void mfib_table_entry_delete(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source)
Delete a FIB entry.
@ MFIB_TABLE_ATTRIBUTE_LAST
Marker.
fib_node_index_t mfib_table_lookup(u32 fib_index, const mfib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
void mfib_table_entry_paths_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *paths)
walk_rc_t(* mfib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u32 mfib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
u32 mfib_table_get_n_routes(fib_node_index_t index, fib_protocol_t proto)
To assit UT.
u32 fib_node_index_t
A typedef of a node index.
fib_node_index_t mfib_table_entry_special_add(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, mfib_entry_flags_t flags, index_t rep_dpo)
Add a 'special' entry to the mFIB that links to the DPO passed A special entry is an entry that the F...
fib_node_index_t mfib_table_entry_paths_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath)
u8 * mft_desc
Table description.
u8 * format_mfib_table_name(u8 *s, va_list *ap)
Format the description/name of the table.
void mfib_table_walk(u32 fib_index, fib_protocol_t proto, mfib_table_walk_fn_t fn, void *ctx)
Walk all entries in a FIB table N.B: This is NOT safe to deletes.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
fib_node_index_t mfib_table_get_less_specific(u32 fib_index, const mfib_prefix_t *prefix)
Get the less specific (covering) prefix.
u32 mft_epoch
resync epoch
mfib_table_attribute_t_
Flags for the source data.
fib_protocol_t mft_proto
Which protocol this table serves.
u32 mfib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, u32 table_id, mfib_source_t source, const u8 *name)
Get the index of the FIB for a Table-ID.
u32 mft_table_id
Table ID (hash key) for this FIB.
#define MFIB_TABLE_N_LOCKS
Keep a lock per-source and a total.
A representation of a path as described by a route producer.
u32 mfib_table_get_index_for_sw_if_index(fib_protocol_t proto, u32 sw_if_index)
Get the index of the FIB bound to the interface.
@ MFIB_TABLE_ATTRIBUTE_FIRST
Marker.
void mfib_table_entry_path_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *paths)
Remove n paths to an entry (aka route) in the FIB.
@ MFIB_TABLE_ATTRIBUTE_RESYNC
the table is currently resync-ing
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void mfib_table_mark(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Resync all entries from a table for the source this is the mark part of the mark and sweep algorithm.
vl_api_interface_index_t sw_if_index
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
mfib_table_flags_t mft_flags
table falgs
enum walk_rc_t_ walk_rc_t
Walk return code.
vl_api_wireguard_peer_flags_t flags