|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
185 if (mfib_entry_cover_index != mfib_entry_index)
288 return (mfib_entry_index);
320 return (mfib_entry_index);
339 return (mfib_entry_index);
459 return (mfib_entry_index);
551 return ((NULL != mfib_table ? mfib_table->
mft_table_id : ~0));
668 .mftf_entries = NULL,
669 .mftf_source = source,
703 .mftf_source = source,
736 .mftf_source = source,
859 if (1 << attr &
flags) {
@ MFIB_ENTRY_FLAG_EXCLUSIVE
u32 mft_locks[MFIB_TABLE_N_LOCKS]
number of locks on the table
static clib_error_t * mfib_module_init(vlib_main_t *vm)
u8 * format_ip4_mfib_table_memory(u8 *s, va_list *args)
format (display) the memory usage for IP4 mfibs
int mfib_entry_is_host(fib_node_index_t mfib_entry_index)
void ip6_mfib_table_destroy(ip6_mfib_t *mfib)
void mfib_entry_mark(fib_node_index_t fib_entry_index, mfib_source_t source)
static ip6_mfib_t * ip6_mfib_get(u32 index)
Get the FIB at the given index.
int mfib_entry_is_marked(fib_node_index_t mfib_entry_index, mfib_source_t source)
static walk_rc_t mfib_table_flush_cb(fib_node_index_t mfib_entry_index, void *arg)
ip4_main_t ip4_main
Global ip4 main structure.
#define FOR_EACH_MFIB_TABLE_ATTRIBUTE(_item)
void ip4_mfib_table_entry_insert(ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len, fib_node_index_t fib_entry_index)
void mfib_entry_src_module_init(void)
vl_api_mfib_entry_flags_t entry_flags
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
fib_node_index_t ip6_mfib_table_lookup(const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp, u32 len)
fib_node_index_t ip4_mfib_table_lookup_exact_match(const ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
u32 mft_total_route_counts
Total route counters.
Aggregate type for a prefix.
static u32 ip4_mfib_index_from_table_id(u32 table_id)
void mfib_entry_path_update(fib_node_index_t mfib_entry_index, mfib_source_t source, const fib_route_path_t *rpaths)
void mfib_entry_unlock(fib_node_index_t mfib_entry_index)
void mfib_table_entry_delete_index(fib_node_index_t mfib_entry_index, mfib_source_t source)
Delete a FIB entry.
u32 mfib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, mfib_source_t src)
Get the index of the FIB for a Table-ID.
enum mfib_table_attribute_t_ mfib_table_attribute_t
Flags for the source data.
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 entry_flags, index_t repi)
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_lookup(u32 fib_index, const mfib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
#define FIB_NODE_INDEX_INVALID
#define vlib_call_init_function(vm, x)
void ip6_mfib_table_entry_insert(ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len, fib_node_index_t mfib_entry_index)
static void vlib_smp_unsafe_warning(void)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
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 *rpaths)
enum mfib_entry_flags_t_ mfib_entry_flags_t
int mfib_entry_path_remove(fib_node_index_t mfib_entry_index, mfib_source_t source, const fib_route_path_t *rpaths)
void mfib_entry_cover_change_notify(fib_node_index_t cover_index, fib_node_index_t covered)
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.
A protocol Independent IP multicast FIB table.
fib_node_index_t * mftf_entries
The list of entries to flush.
static fib_node_index_t mfib_table_lookup_exact_match_i(const mfib_table_t *mfib_table, const mfib_prefix_t *prefix)
static clib_error_t * rn_module_init(vlib_main_t *vm)
void mfib_entry_module_init(void)
fib_node_index_t mfib_table_get_less_specific(u32 fib_index, const mfib_prefix_t *prefix)
Get the less specific (covering) prefix.
void mfib_table_entry_paths_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpaths)
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
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.
enum mfib_table_flags_t_ mfib_table_flags_t
enum mfib_source_t_ mfib_source_t
Possible [control plane] sources of MFIB entries.
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
static void mfib_table_entry_paths_remove_i(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpaths)
static void mfib_table_entry_remove(mfib_table_t *mfib_table, const mfib_prefix_t *prefix, fib_node_index_t mfib_entry_index)
void ip4_mfib_table_destroy(ip4_mfib_t *mfib)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
u8 * format_ip6_mfib_table_memory(u8 *s, va_list *args)
format (display) ipv6 MFIB mempry usage
u32 mfib_entry_get_fib_index(fib_node_index_t mfib_entry_index)
u8 * format_mfib_table_flags(u8 *s, va_list *args)
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...
int mfib_entry_update(fib_node_index_t mfib_entry_index, mfib_source_t source, mfib_entry_flags_t entry_flags, fib_rpf_id_t rpf_id, index_t repi)
static ip4_mfib_t * ip4_mfib_get(u32 index)
Get the FIB at the given index.
u32 fib_node_index_t
A typedef of a node index.
static u32 ip6_mfib_index_from_table_id(u32 table_id)
u8 * mft_desc
Table description.
int mfib_entry_delete(fib_node_index_t mfib_entry_index, mfib_source_t source)
mfib_entry_delete
struct mfib_table_t_ * mfibs
Vector of MFIBs.
void mfib_table_flush(u32 mfib_index, fib_protocol_t proto, mfib_source_t source)
Flush all entries from a table for the source.
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.
u32 ip6_mfib_table_find_or_create_and_lock(u32 table_id, mfib_source_t src)
Get or create an IPv4 fib.
u32 ip4_mfib_table_get_index_for_sw_if_index(u32 sw_if_index)
void mfib_table_sweep(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Signal that the table has converged, i.e.
mfib_table_t * mfib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
const static char * mfib_table_flags_strings[]
static void mfib_table_post_insert_actions(mfib_table_t *mfib_table, const mfib_prefix_t *prefix, fib_node_index_t mfib_entry_index)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u8 * format_mfib_prefix(u8 *s, va_list *args)
mfib_source_t mftf_source
The source we are flushing.
u32 mft_epoch
resync epoch
static void mfib_table_entry_insert(mfib_table_t *mfib_table, const mfib_prefix_t *prefix, fib_node_index_t mfib_entry_index)
void mfib_table_unlock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Take a reference counting lock on the table.
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.
u32 mfib_table_find_or_create_and_lock_w_name(fib_protocol_t proto, u32 table_id, mfib_source_t src, const u8 *name)
Get the index of the FIB for a Table-ID.
int mfib_entry_special_add(fib_node_index_t mfib_entry_index, mfib_source_t source, mfib_entry_flags_t entry_flags, fib_rpf_id_t rpf_id, index_t repi)
#define vec_free(V)
Free vector's memory (no header).
u8 * format_fib_protocol(u8 *s, va_list *ap)
void mfib_signal_module_init(void)
fib_node_index_t mfib_entry_create(u32 fib_index, mfib_source_t source, const mfib_prefix_t *prefix, fib_rpf_id_t rpf_id, mfib_entry_flags_t entry_flags, index_t repi)
fib_protocol_t mft_proto
Which protocol this table serves.
void mfib_entry_lock(fib_node_index_t mfib_entry_index)
u32 mfib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void ip4_mfib_table_entry_remove(ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
description fragment has unexpected format
u32 mfib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static clib_error_t * fib_module_init(vlib_main_t *vm)
u32 mft_table_id
Table ID (hash key) for this FIB.
#define VLIB_INIT_FUNCTION(x)
A representation of a path as described by a route producer.
u32 mfib_table_get_n_routes(fib_node_index_t fib_index, fib_protocol_t proto)
To assit UT.
#define vec_foreach(var, vec)
Vector iterator.
fib_node_index_t ip6_mfib_table_get_less_specific(const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp, u32 len)
fib_node_index_t ip4_mfib_table_lookup(const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
The IPv4 Multicast-FIB.
fib_node_index_t ip6_mfib_table_lookup_exact_match(const ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len)
struct mfib_table_flush_ctx_t_ mfib_table_flush_ctx_t
Table flush context.
static walk_rc_t mfib_table_sweep_cb(fib_node_index_t fib_entry_index, void *arg)
const mfib_prefix_t * mfib_entry_get_prefix(fib_node_index_t mfib_entry_index)
void mfib_table_entry_path_remove(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpath)
Remove n paths to an entry (aka route) in the FIB.
struct mfib_table_t_ * mfibs
Vector of MFIBs.
u32 ip4_mfib_table_find_or_create_and_lock(u32 table_id, mfib_source_t src)
Get or create an IPv4 fib.
static u32 mfib_table_find_or_create_and_lock_i(fib_protocol_t proto, u32 table_id, mfib_source_t src, const u8 *name)
fib_node_index_t ip4_mfib_table_get_less_specific(const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
#define MFIB_TABLE_TOTAL_LOCKS
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
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 entry_flags)
Add a new (with no replication) or lock an existing entry.
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.
void ip4_mfib_table_walk(ip4_mfib_t *mfib, mfib_table_walk_fn_t fn, void *ctx)
Walk the IP4 mfib table.
#define clib_warning(format, args...)
#define MFIB_TABLE_ATTRIBUTES
void ip6_mfib_table_entry_remove(ip6_mfib_t *mfib, const ip6_address_t *grp, const ip6_address_t *src, u32 len)
int mfib_entry_is_sourced(fib_node_index_t mfib_entry_index, mfib_source_t source)
static void mfib_table_entry_delete_i(u32 fib_index, fib_node_index_t mfib_entry_index, const mfib_prefix_t *prefix, mfib_source_t source)
void ip6_mfib_table_walk(ip6_mfib_t *mfib, mfib_table_walk_fn_t fn, void *arg)
Walk the IP6 mfib table.
u8 * format_mfib_table_name(u8 *s, va_list *ap)
Format the description/name of the table.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_interface_index_t sw_if_index
static fib_node_index_t mfib_table_entry_paths_update_i(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, const fib_route_path_t *rpaths)
static fib_node_index_t mfib_table_lookup_i(const mfib_table_t *mfib_table, const mfib_prefix_t *prefix)
mfib_table_flags_t mft_flags
table falgs
static void mfib_table_destroy(mfib_table_t *mfib_table)
enum walk_rc_t_ walk_rc_t
Walk return code.
static fib_node_index_t mfib_table_get_less_specific_i(const mfib_table_t *mfib_table, const mfib_prefix_t *prefix)
u8 * format_mfib_table_memory(u8 *s, va_list *args)
format (display) the memory usage for mfibs
void mfib_table_entry_delete(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source)
Delete a FIB entry.
u32 ip6_mfib_table_get_index_for_sw_if_index(u32 sw_if_index)
static walk_rc_t mfib_table_mark_cb(fib_node_index_t fib_entry_index, void *arg)
vl_api_wireguard_peer_flags_t flags