X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fvnet%2Fmfib%2Fmfib_entry.h;h=880c1e2933c2eef8472b93aa8d5ce233388beedd;hp=36fc73e1670f625017ca819f12fc668c18bff59e;hb=28c142e3;hpb=a9374df5f351d25e968f5f90a827796203cbafdd diff --git a/src/vnet/mfib/mfib_entry.h b/src/vnet/mfib/mfib_entry.h index 36fc73e1670..880c1e2933c 100644 --- a/src/vnet/mfib/mfib_entry.h +++ b/src/vnet/mfib/mfib_entry.h @@ -42,22 +42,21 @@ typedef struct mfib_entry_t_ { * The index of the FIB table this entry is in */ u32 mfe_fib_index; + /** - * the path-list for which this entry is a child. This is also the path-list - * that is contributing forwarding for this entry. + * A vector of sources contributing forwarding */ - fib_node_index_t mfe_parent; + struct mfib_entry_src_t_ *mfe_srcs; + /** - * index of this entry in the parent's child list. - * This is set when this entry is added as a child, but can also - * be changed by the parent as it manages its list. + * The path-list of which this entry is a child */ - u32 mfe_sibling; + fib_node_index_t mfe_pl; /** - * A vector of sources contributing forwarding + * The sibling index on the path-list */ - struct mfib_entry_src_t_ *mfe_srcs; + u32 mfe_sibling; /** * 2nd cache line has the members used in the data plane @@ -65,7 +64,7 @@ typedef struct mfib_entry_t_ { CLIB_CACHE_LINE_ALIGN_MARK(cacheline1); /** - * The Replicate DPO used for forwarding. + * The DPO used for forwarding; replicate, drop, etc.. */ dpo_id_t mfe_rep; @@ -74,6 +73,11 @@ typedef struct mfib_entry_t_ { */ mfib_entry_flags_t mfe_flags; + /** + * RPF-ID used when the packets ingress not from an interface + */ + fib_rpf_id_t mfe_rpf_id; + /** * A hash table of interfaces */ @@ -90,11 +94,13 @@ extern u8 *format_mfib_entry(u8 * s, va_list * args); extern 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); extern 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); extern void mfib_entry_path_update(fib_node_index_t fib_entry_index, @@ -124,12 +130,21 @@ extern void mfib_entry_unlock(fib_node_index_t fib_entry_index); extern void mfib_entry_get_prefix(fib_node_index_t fib_entry_index, mfib_prefix_t *pfx); extern u32 mfib_entry_get_fib_index(fib_node_index_t fib_entry_index); +extern int mfib_entry_is_sourced(fib_node_index_t fib_entry_index, + mfib_source_t source); +extern u32 mfib_entry_get_stats_index(fib_node_index_t fib_entry_index); + +extern const dpo_id_t*mfib_entry_contribute_ip_forwarding( + fib_node_index_t mfib_entry_index); extern void mfib_entry_contribute_forwarding( fib_node_index_t mfib_entry_index, fib_forward_chain_type_t type, dpo_id_t *dpo); +extern void mfib_entry_encode(fib_node_index_t fib_entry_index, + fib_route_path_encode_t **api_rpaths); + extern void mfib_entry_module_init(void);