16 #ifndef __MFIB_ENTRY_H__ 17 #define __MFIB_ENTRY_H__ 100 #define MFIB_ENTRY_DBG(_e, _fmt, _args...) \ 102 vlib_log_debug(mfib_entry_logger, \ 103 "e:[%d:%U]: " _fmt, \ 104 mfib_entry_get_index(_e), \ 105 format_mfib_prefix, \ 110 #define MFIB_ENTRY_FORMAT_BRIEF (0x0) 111 #define MFIB_ENTRY_FORMAT_DETAIL (0x1) 112 #define MFIB_ENTRY_FORMAT_DETAIL2 (0x2) 205 return (mfe - mfib_entry_pool);
void mfib_entry_path_update(fib_node_index_t fib_entry_index, mfib_source_t source, const fib_route_path_t *rpath)
enum mfib_entry_flags_t_ mfib_entry_flags_t
A representation of a path as described by a route producer.
enum mfib_entry_fwd_flags_t_ mfib_entry_fwd_flags_t
Flags to control what is present in the replicate DPO returned when the entry contributes forwarding...
void mfib_entry_unlock(fib_node_index_t fib_entry_index)
struct mfib_entry_src_t_ * mfe_srcs
A vector of sources contributing forwarding.
u32 mfe_sibling
The sibling index on the path-list.
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_is_sourced(fib_node_index_t fib_entry_index, mfib_source_t source)
static fib_node_index_t mfib_entry_get_index(const mfib_entry_t *mfe)
struct mfib_entry_t_ mfib_entry_t
An entry in a FIB table.
void mfib_entry_module_init(void)
fib_route_path_t * mfib_entry_encode(fib_node_index_t fib_entry_index)
void mfib_entry_lock(fib_node_index_t fib_entry_index)
u32 mfib_entry_get_fib_index(fib_node_index_t fib_entry_index)
enum mfib_source_t_ mfib_source_t
Possible [control plane] sources of MFIB entries.
vl_api_interface_index_t sw_if_index
The source of an MFIB entry.
void mfib_entry_child_remove(fib_node_index_t mfib_entry_index, u32 sibling_index)
mfib_prefix_t mfe_prefix
The prefix of the route.
vlib_log_class_t mfib_entry_logger
Debug macro.
vl_api_fib_path_type_t type
u32 mfib_entry_get_stats_index(fib_node_index_t fib_entry_index)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
dpo_id_t mfe_rep
The DPO used for forwarding; replicate, drop, etc.
static mfib_itf_t * mfib_itf_get(index_t mi)
Get the MFIB interface representation.
fib_node_t mfe_node
Base class.
const dpo_id_t * mfib_entry_contribute_ip_forwarding(fib_node_index_t mfib_entry_index)
An node in the FIB graph.
u32 mfe_fib_index
The index of the FIB table this entry is in.
static mfib_entry_t * mfib_entry_get(fib_node_index_t index)
Do not reutrn any local replications in the set.
static mfib_itf_t * mfib_entry_itf_find(mfib_itf_t *itfs, u32 sw_if_index)
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
mfib_itf_t * mfe_itfs
A hash table of interfaces.
u32 fib_node_index_t
A typedef of a node index.
mfib_entry_flags_t mfe_flags
Route flags.
u8 * format_mfib_entry(u8 *s, va_list *args)
Aggregate type for a prefix.
int mfib_entry_path_remove(fib_node_index_t fib_entry_index, mfib_source_t source, const fib_route_path_t *rpath)
u32 fib_rpf_id_t
An RPF-ID is numerical value that is used RPF validate.
fib_node_index_t mfe_pl
The path-list of which this entry is a child.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
mfib_entry_t * mfib_entry_pool
An interface associated with a particular MFIB entry.
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_rpf_id_t mfe_rpf_id
RPF-ID used when the packets ingress not from an interface.
void mfib_entry_cover_changed(fib_node_index_t fib_entry_index)
int mfib_entry_update(fib_node_index_t fib_entry_index, mfib_source_t source, mfib_entry_flags_t entry_flags, fib_rpf_id_t rpf_id, index_t rep_dpo)
static mfib_itf_t * mfib_entry_get_itf(const mfib_entry_t *mfe, u32 sw_if_index)
void mfib_entry_cover_updated(fib_node_index_t fib_entry_index)
int mfib_entry_special_add(fib_node_index_t fib_entry_index, mfib_source_t source, mfib_entry_flags_t entry_flags, fib_rpf_id_t rpf_id, index_t rep_dpo)
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
mfib_entry_fwd_flags_t_
Flags to control what is present in the replicate DPO returned when the entry contributes forwarding...
int mfib_entry_cmp_for_sort(void *i1, void *i2)
u32 mfib_entry_child_add(fib_node_index_t mfib_entry_index, fib_node_type_t type, fib_node_index_t child_index)
mfib_entry_delegate_t * fe_delegates
A vector of delegates.
int mfib_entry_delete(fib_node_index_t mfib_entry_index, mfib_source_t source)
mfib_entry_delete
const mfib_prefix_t * mfib_entry_get_prefix(fib_node_index_t fib_entry_index)
int mfib_entry_is_host(fib_node_index_t fib_entry_index)
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)
void mfib_entry_contribute_forwarding(fib_node_index_t mfib_entry_index, fib_forward_chain_type_t type, mfib_entry_fwd_flags_t flags, dpo_id_t *dpo)