45 return (&fib_entry_src_vft[esrc->
fes_src]);
60 fib_entry_src_vft[source] = *vft;
62 if (NULL == fib_entry_src_vft[source].fesv_copy)
74 return (esrc1->
fes_src - esrc2->fes_src);
86 .fes_entry_flags =
flags,
420 if (NULL != path_ext)
483 if (NULL != interposer)
517 .n_recursive_constrained = 0,
519 .preference = 0xffff,
737 (orig_src, fib_entry, esrc));
798 if (cover_src == esrc)
873 if (cover_src == esrc)
938 fib_entry_src_covered_inherit_add_i(covered, src);
987 int houston_we_are_go_for_install;
1002 houston_we_are_go_for_install = vft->
fesv_activate(esrc, fib_entry);
1010 houston_we_are_go_for_install = !0;
1033 if (0 != houston_we_are_go_for_install)
1095 (esrc, fib_entry, source));
1106 int remain_installed;
1127 remain_installed = 1;
1172 if (!remain_installed)
1222 (esrc, fib_entry, flags));
1284 old_path_list_index = esrc->
fes_pl;
1346 ASSERT(NULL != cover_src);
1400 old_path_list = esrc->
fes_pl;
1578 old_path_list = esrc->
fes_pl;
1586 (esrc, fib_entry, pl_flags, rpaths));
1642 (esrc, fib_entry, flags));
1652 old_path_list = esrc->
fes_pl;
1692 old_path_list = esrc->
fes_pl;
1700 (esrc, pl_flags, rpaths));
1862 (esrc, fib_entry, data));
static int fib_entry_src_cmp_for_sort(void *v1, void *v2)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
int fib_path_is_resolved(fib_node_index_t path_index)
fib_protocol_t fp_proto
protocol type
Contribute an object that is to be used to forward BIER packets.
Contribute an object that is to be used to forward IP6 packets.
#define FIB_ENTRY_DBG(_e, _fmt, _args...)
ip46_address_t frp_addr
The next-hop address.
Continue on to the next entry.
void fib_table_fwding_dpo_remove(u32 fib_index, const fib_prefix_t *prefix, const dpo_id_t *dpo)
remove an entry in the FIB's forwarding table
fib_path_ext_type_t fpe_type
The type of path extension.
void fib_entry_unlock(fib_node_index_t fib_entry_index)
A path that resolves via a DVR DPO.
Contribute an object that is to be used to forward IP6 packets.
fib_node_index_t path_index
The index of the FIB path.
static int fib_entry_src_valid_out_label(mpls_label_t label)
void fib_path_contribute_forwarding(fib_node_index_t path_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
struct fib_entry_src_collect_forwarding_ctx_t_ fib_entry_src_collect_forwarding_ctx_t
static int fib_urpf_check_size(index_t ui)
Data-Plane function to check the size of an uRPF list, (i.e.
void fib_path_list_child_remove(fib_node_index_t path_list_index, u32 si)
fib_entry_src_copy_t fesv_copy
fib_protocol_t fib_entry_get_proto(const fib_entry_t *fib_entry)
fib_entry_flag_t fib_entry_get_flags_i(const fib_entry_t *fib_entry)
A representation of a path as described by a route producer.
dpo_id_t path_dpo
ID of the Data-path object.
fib_forward_chain_type_t fct
#define FIB_ENTRY_SRC_VFT_INVOKE_AND_RETURN(esrc, func, args)
fib_entry_t * fib_entry_src_action_path_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *rpaths)
static void fib_entry_src_action_fwd_update(const fib_entry_t *fib_entry, fib_source_t source)
adj_index_t fib_path_list_get_adj(fib_node_index_t path_list_index, fib_forward_chain_type_t type)
Virtual function table each FIB entry source will register.
u32 fib_path_list_get_resolving_interface(fib_node_index_t path_list_index)
static int dpo_id_is_valid(const dpo_id_t *dpoi)
Return true if the DPO object is valid, i.e.
static void fib_entry_src_action_deinit(fib_entry_t *fib_entry, fib_source_t source)
Information related to the source of a FIB entry.
u32 fib_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.
void load_balance_set_urpf(index_t lbi, index_t urpf)
An MPLS extension that maintains the path's outgoing labels,.
int fib_path_is_exclusive(fib_node_index_t path_index)
void fib_entry_src_action_deactivate(fib_entry_t *fib_entry, fib_source_t source)
load_balance_path_t * next_hops
enum fib_entry_delegate_type_t_ fib_entry_delegate_type_t
Delegate types.
u32 mpls_label_t
A label value only, i.e.
dpo_proto_t fib_forw_chain_type_to_dpo_proto(fib_forward_chain_type_t fct)
Convert from a chain type to the DPO proto it will install.
#define MPLS_IETF_IMPLICIT_NULL_LABEL
static fib_table_walk_rc_t fib_entry_src_covered_inherit_add_i(fib_entry_t *fib_entry, const fib_entry_src_t *cover_src)
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
fib_entry_src_flag_t fib_entry_src_action_path_remove(fib_entry_t *fib_entry, fib_source_t source, const fib_route_path_t *rpaths)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
Result from a cover update/change.
void fib_path_list_walk(fib_node_index_t path_list_index, fib_path_list_walk_fn_t func, void *ctx)
Contribute an object that is to be used to forward IP4 packets.
fib_entry_src_contribute_interpose_t fesv_contribute_interpose
static fib_entry_src_t * fib_entry_src_find_or_create(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags)
u32 fe_fib_index
The index of the FIB table this entry is in.
fib_entry_src_t * fe_srcs
Vector of source infos.
static void fib_entry_recursive_loop_detect_i(fib_node_index_t path_list_index)
u32 fib_path_list_child_add(fib_node_index_t path_list_index, fib_node_type_t child_type, fib_node_index_t child_index)
dpo_id_t fd_dpo
Valid for the forwarding chain delegates.
fib_node_index_t fe_parent
the path-list for which this entry is a child.
fib_source_t fib_entry_get_source_i(const fib_entry_t *fib_entry)
void fib_entry_src_mpls_register(void)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
flow_hash_config_t fib_table_get_flow_hash_config(u32 fib_index, fib_protocol_t proto)
Get the flow hash configured used by the table.
#define clib_memcpy(d, s, n)
index_t load_balance_create(u32 n_buckets, dpo_proto_t lb_proto, flow_hash_config_t fhc)
const dpo_id_t * drop_dpo_get(dpo_proto_t proto)
void fib_entry_src_adj_register(void)
dpo_proto_t fp_payload_proto
This protocol determines the payload protocol of packets that will be forwarded by this entry once th...
u32 fe_sibling
index of this entry in the parent's child list.
flow_hash_config_t fib_table_get_default_flow_hash_config(fib_protocol_t proto)
Get the flow hash configured used by the protocol.
fib_entry_flag_t fib_entry_get_flags_for_source(fib_node_index_t entry_index, fib_source_t source)
const int fib_entry_get_dpo_for_source(fib_node_index_t fib_entry_index, fib_source_t source, dpo_id_t *dpo)
u32 fib_entry_get_resolving_interface_for_source(fib_node_index_t entry_index, fib_source_t source)
static fib_entry_src_t * fib_entry_src_find(const fib_entry_t *fib_entry, fib_source_t source)
void fib_entry_src_lisp_register(void)
u32 frp_sw_if_index
The interface.
index_t fib_urpf_list_alloc_and_lock(void)
static fib_entry_src_t * fib_entry_src_action_update_from_cover(fib_entry_t *fib_entry, const fib_entry_src_t *orig_src)
#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...
Aggregate type for a prefix.
fib_node_index_t fib_entry_get_index(const fib_entry_t *fib_entry)
void dpo_mk_interpose(const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
Make an interpose DPO from an original.
static void fib_entry_flags_update(const fib_entry_t *fib_entry, const fib_route_path_t *rpaths, fib_path_list_flags_t *pl_flags, fib_entry_src_t *esrc)
void load_balance_multipath_update(const dpo_id_t *dpo, const load_balance_path_t *raw_nhs, load_balance_flags_t flags)
union fib_entry_src_t_::@137 u
Source specific info.
Contribute an object that is to be used to forward Ethernet packets.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
fib_protocol_t dpo_proto_to_fib(dpo_proto_t dpo_proto)
void fib_entry_src_api_register(void)
u16 fib_path_get_weight(fib_node_index_t path_index)
void fib_urpf_list_append(index_t ui, u32 sw_if_index)
Append another interface to the list.
fib_path_ext_t * fib_path_ext_list_find_by_path_index(const fib_path_ext_list_t *list, fib_node_index_t path_index)
#define FOR_EACH_SRC_ADDED(_entry, _src, _source, action)
A adj-source extension indicating the path's refinement criteria result.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Contribute an object that is to be used to forward end-of-stack MPLS packets.
void fib_entry_src_mk_lb(fib_entry_t *fib_entry, const fib_entry_src_t *esrc, fib_forward_chain_type_t fct, dpo_id_t *dpo_lb)
void fib_path_ext_list_flush(fib_path_ext_list_t *list)
void fib_entry_src_default_route_register(void)
static fib_table_walk_rc_t fib_entry_src_covered_inherit_walk_remove(fib_node_index_t fei, void *ctx)
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
fib_entry_t * fib_entry_src_action_add(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
static int fib_route_attached_cross_table(const fib_entry_t *fib_entry, const fib_route_path_t *rpath)
enum fib_source_t_ fib_source_t
The different sources that can create a route.
An invalid source This is not a real source, so don't use it to source a prefix.
#define FOR_EACH_DELEGATE_CHAIN(_entry, _fdt, _fed, _body)
dpo_type_t dpoi_type
the type
#define FIB_ENTRY_SRC_VFT_INVOKE(esrc, func, args)
void load_balance_set_fib_entry_flags(index_t lbi, fib_entry_flag_t flags)
load-balancing over a choice of [un]equal cost paths
void fib_entry_src_interpose_register(void)
#define MPLS_LABEL_IS_REAL(_lbl)
#define FIB_ENTRY_SRC_VFT_EXISTS(esrc, func)
const fib_entry_src_vft_t * fib_entry_src_get_vft(const fib_entry_src_t *esrc)
Get the VFT for a given source.
#define vec_del1(v, i)
Delete the element at index I.
void fib_table_fwding_dpo_update(u32 fib_index, const fib_prefix_t *prefix, const dpo_id_t *dpo)
Add or update an entry in the FIB's forwarding table.
static void fib_entry_src_get_path_forwarding(fib_node_index_t path_index, fib_entry_src_collect_forwarding_ctx_t *ctx)
void fib_path_list_lock(fib_node_index_t path_list_index)
static fib_entry_src_t * fib_entry_src_find_i(const fib_entry_t *fib_entry, fib_source_t source, u32 *index)
void fib_path_stack_mpls_disp(fib_node_index_t path_index, dpo_proto_t payload_proto, fib_mpls_lsp_mode_t mode, dpo_id_t *dpo)
dpo_id_t dpo
Exclusive DPO.
#define FIB_SOURCE_MAX
The maximum number of sources.
fib_entry_src_flag_t fib_entry_src_action_remove_or_update_inherit(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_flag_t fib_entry_src_action_remove(fib_entry_t *fib_entry, fib_source_t source)
void replicate_multipath_update(const dpo_id_t *dpo, load_balance_path_t *next_hops)
int fib_path_list_is_popular(fib_node_index_t path_list_index)
void fib_entry_src_action_installed(const fib_entry_t *fib_entry, fib_source_t source)
Contribute an object that is to be used to forward NSH packets.
enum fib_table_walk_rc_t_ fib_table_walk_rc_t
return code controlling how a table walk proceeds
#define vec_free(V)
Free vector's memory (no header).
void fib_entry_src_action_activate(fib_entry_t *fib_entry, fib_source_t source)
void fib_urpf_list_bake(index_t ui)
Convert the uRPF list from the itf set obtained during the walk to a unique list. ...
void fib_entry_source_change(fib_entry_t *fib_entry, fib_source_t old_source, fib_source_t new_source)
void fib_entry_src_rr_register(void)
#define MPLS_IETF_IPV4_EXPLICIT_NULL_LABEL
fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags(fib_entry_flag_t eflags)
fib_entry_src_cover_res_t fib_entry_src_action_cover_change(fib_entry_t *fib_entry, fib_entry_src_t *esrc)
u32 fib_path_list_get_n_paths(fib_node_index_t path_list_index)
u32 fib_node_index_t
A typedef of a node index.
u32 adj_index_t
An index for adjacencies.
fib_forward_chain_type_t fib_entry_delegate_type_to_chain_type(fib_entry_delegate_type_t fdt)
void dpo_set(dpo_id_t *dpo, dpo_type_t type, dpo_proto_t proto, index_t index)
Set/create a DPO ID The DPO will be locked.
void fib_path_list_unlock(fib_node_index_t path_list_index)
index_t replicate_create(u32 n_buckets, dpo_proto_t rep_proto)
fib_entry_t * fib_entry_get(fib_node_index_t index)
static fib_table_walk_rc_t fib_entry_src_covered_inherit_walk_add(fib_node_index_t fei, void *ctx)
enum fib_entry_flag_t_ fib_entry_flag_t
void fib_entry_src_interface_register(void)
void fib_entry_lock(fib_node_index_t fib_entry_index)
int fib_path_list_recursive_loop_detect(fib_node_index_t path_list_index, fib_node_index_t **entry_indicies)
static void fib_entry_src_covered_inherit_add(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_flag_t fes_entry_flags
Flags the source contributes to the entry.
int n_recursive_constrained
fib_source_t fes_src
Which source this info block is for.
fib_entry_src_flag_t fes_flags
Flags on the source.
void fib_entry_src_special_register(void)
fib_entry_t * fib_entry_src_action_path_swap(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const fib_route_path_t *rpaths)
int fib_path_is_deag(fib_node_index_t path_index)
void fib_entry_src_module_init(void)
void fib_entry_src_register(fib_source_t source, const fib_entry_src_vft_t *vft)
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_route_path_flags_t frp_flags
flags on the path
fib_entry_t * fib_entry_src_action_update(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
From the control plane API.
enum fib_entry_src_flag_t_ fib_entry_src_flag_t
#define MPLS_LABEL_POP
A value that is explicit about the end of the LSP.
A path that resolves via another table.
u32 flow_hash_config_t
A flow hash configuration is a mask of the flow hash options.
Do no traverse down this sub-tree.
int fib_entry_is_sourced(fib_node_index_t fib_entry_index, fib_source_t source)
dpo_id_t fe_lb
The load-balance used for forwarding.
#define vec_elt(v, i)
Get vector value at index i.
fib_node_index_t fes_pl
The path-list created by the source.
void fib_entry_src_inherit(const fib_entry_t *cover, fib_entry_t *covered)
static dpo_proto_t fib_prefix_get_payload_proto(const fib_prefix_t *pfx)
enum load_balance_flags_t_ load_balance_flags_t
int fib_path_is_recursive_constrained(fib_node_index_t path_index)
static void fib_entry_src_covered_inherit_remove(fib_entry_t *fib_entry, fib_entry_src_t *esrc)
fib_path_ext_adj_flags_t fpe_adj_flags
For an ADJ type extension.
const fib_entry_src_t * esrc
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
static void fib_entry_src_action_init(fib_entry_t *fib_entry, fib_source_t source, fib_entry_flag_t flags)
index_t dpoi_index
the index of objects of that type
#define FIB_NODE_INDEX_INVALID
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u32 path_weight
weight for the path.
u16 fib_path_get_preference(fib_node_index_t path_index)
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
fib_entry_src_activate_t fesv_activate
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
void fib_urpf_list_unlock(index_t ui)
#define MPLS_IETF_IPV6_EXPLICIT_NULL_LABEL
One path from an [EU]CMP set that the client wants to add to a load-balance object.
u8 * fib_entry_src_format(fib_entry_t *fib_entry, fib_source_t source, u8 *s)
void fib_path_list_contribute_forwarding(fib_node_index_t path_list_index, fib_forward_chain_type_t fct, fib_path_list_fwd_flags_t flags, dpo_id_t *dpo)
void fib_entry_set_source_data(fib_node_index_t fib_entry_index, fib_source_t source, const void *data)
index_t fib_path_list_get_urpf(fib_node_index_t path_list_index)
Return the the child the RPF list pre-built for this path list.
fib_forward_chain_type_t fib_entry_chain_type_fixup(const fib_entry_t *entry, fib_forward_chain_type_t fct)
Turn the chain type requested by the client into the one they really wanted.
void fib_entry_src_action_reactivate(fib_entry_t *fib_entry, fib_source_t source)
load_balance_flags_t fib_entry_calc_lb_flags(fib_entry_src_collect_forwarding_ctx_t *ctx)
Determine whether this FIB entry should use a load-balance MAP to support PIC edge fast convergence...
const fib_entry_t * fib_entry
static fib_path_list_walk_rc_t fib_entry_src_collect_forwarding(fib_node_index_t pl_index, fib_node_index_t path_index, void *arg)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
#define vec_foreach(var, vec)
Vector iterator.
A path extension is a per-entry addition to the forwarding information when packets are sent for that...
adj_index_t fib_entry_get_adj_for_source(fib_node_index_t fib_entry_index, fib_source_t source)
u8 fes_ref_count
1 bytes ref count.
fib_path_ext_list_t fes_path_exts
A vector of path extensions.
dpo_proto_t fib_entry_get_dpo_proto(const fib_entry_t *fib_entry)
static int fib_path_is_attached(const fib_route_path_t *rpath)
static void fib_entry_src_copy_default(const fib_entry_src_t *orig_src, const fib_entry_t *fib_entry, fib_entry_src_t *copy_src)
Contribute an object that is to be used to forward non-end-of-stack MPLS packets. ...
const void * fib_entry_get_source_data(fib_node_index_t fib_entry_index, fib_source_t source)
enum fib_path_list_flags_t_ fib_path_list_flags_t
A Delagate is a means to implmenet the Delagation design pattern; the extension of an objects functio...
void fib_table_sub_tree_walk(u32 fib_index, fib_protocol_t proto, const fib_prefix_t *root, fib_table_walk_fn_t fn, void *ctx)
Walk all entries in a sub-tree FIB table.
fib_source_t fib_entry_get_best_source(fib_node_index_t entry_index)
#define ip46_address_is_zero(ip46)
Contribute an object that is to be used to forward IP4 packets.
fib_forward_chain_type_t fib_forw_chain_type_from_dpo_proto(dpo_proto_t proto)
Convert from a payload-protocol to a chain type.
fib_forward_chain_type_t fib_entry_get_default_chain_type(const fib_entry_t *fib_entry)
void fib_entry_src_action_install(fib_entry_t *fib_entry, fib_source_t source)
fib_entry_src_cover_res_t fib_entry_src_action_cover_update(fib_entry_t *fib_entry, fib_entry_src_t *esrc)
const fib_prefix_t fe_prefix
The prefix of the route.
fib_entry_src_flag_t fib_entry_special_remove(fib_node_index_t fib_entry_index, fib_source_t source)
fib_entry_src_reactivate_t fesv_reactivate
void fib_entry_src_action_uninstall(fib_entry_t *fib_entry)
static fib_entry_t * fib_entry_src_action_copy(fib_entry_t *fib_entry, const fib_entry_src_t *orig_src)
fib_node_index_t fib_table_get_less_specific(u32 fib_index, const fib_prefix_t *prefix)
Get the less specific (covering) prefix.
load_balance_path_t * fib_path_ext_stack(fib_path_ext_t *path_ext, fib_forward_chain_type_t child_fct, fib_forward_chain_type_t imp_null_fct, load_balance_path_t *nhs)