54 s =
format(s,
"adj-flags:");
128 return ((1 ==
vec_len(path_ext->fpe_label_stack)) &&
160 parent_fct = imp_null_fct;
180 parent_fct = child_fct;
192 parent_fct = child_fct;
270 if ((path_ext->
fpe_type == ext_type) &&
306 if (
NULL == path_ext)
348 vec_free(path_ext->fpe_label_stack);
349 *path_ext = new_path_ext;
387 if (
NULL != path_ext)
393 vec_free(path_ext->fpe_label_stack);
405 vec_free(path_ext->fpe_label_stack);
421 s =
format(s,
" Extensions:");
int fib_path_is_resolved(fib_node_index_t path_index)
enum fib_path_ext_type_t_ fib_path_ext_type_t
A description of the type of path extension.
fib_path_ext_type_t fpe_type
The type of path extension.
Contribute an object that is to be used to forward IP6 packets.
sll srl srl sll sra u16x4 i
fib_node_index_t path_index
The index of the FIB path.
void fib_path_contribute_forwarding(fib_node_index_t path_index, fib_forward_chain_type_t fct, dpo_id_t *dpo)
void fib_path_ext_resolve(fib_path_ext_t *path_ext, fib_node_index_t path_list_index)
A representation of a path as described by a route producer.
int fib_path_ext_cmp(fib_path_ext_t *path_ext, const fib_route_path_t *rpath)
dpo_id_t path_dpo
ID of the Data-path object.
int fib_route_path_cmp(const fib_route_path_t *rpath1, const fib_route_path_t *rpath2)
const char * fib_path_ext_adj_flags_names[]
#define FIB_PATH_EXT_ADJ_ATTR_NAMES
An MPLS extension that maintains the path's outgoing labels,.
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
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_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
struct fib_path_ext_t_ * fpel_exts
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.
index_t mpls_label_dpo_create(mpls_label_t *label_stack, mpls_eos_bit_t eos, u8 ttl, u8 exp, dpo_proto_t payload_proto, const dpo_id_t *dpo)
Create an MPLS label object.
mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
int load_balance_is_drop(const dpo_id_t *dpo)
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)
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_path_ext_list_flush(fib_path_ext_list_t *list)
static fib_path_list_walk_rc_t fib_path_ext_match(fib_node_index_t pl_index, fib_node_index_t path_index, void *ctx)
A list of path-extensions.
u8 * format_fib_path_ext(u8 *s, va_list *args)
#define vec_free(V)
Free vector's memory (no header).
void fib_path_ext_list_remove(fib_path_ext_list_t *list, fib_path_ext_type_t ext_type, const fib_route_path_t *rpath)
fib_path_ext_t * fib_path_ext_list_push_back(fib_path_ext_list_t *list, fib_node_index_t path_list_index, fib_path_ext_type_t ext_type, const fib_route_path_t *rpath)
u32 fib_node_index_t
A typedef of a node index.
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.
#define vec_delete(V, N, M)
Delete N elements starting at element M.
static void fib_path_ext_init(fib_path_ext_t *path_ext, fib_node_index_t path_list_index, fib_path_ext_type_t ext_type, const fib_route_path_t *rpath)
#define vec_insert_elts(V, E, N, M)
Insert N vector elements starting at element M, insert given elements (no header, unspecified alignme...
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
int fib_path_ext_list_length(const fib_path_ext_list_t *list)
int fib_path_get_weight(fib_node_index_t path_index)
format_function_t format_mpls_unicast_label
fib_path_ext_adj_flags_t fpe_adj_flags
For an ADJ type extension.
#define FOR_EACH_PATH_EXT_ADJ_ATTR(_item)
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
fib_path_ext_t * fib_path_ext_list_find(const fib_path_ext_list_t *list, fib_path_ext_type_t ext_type, const fib_route_path_t *rpath)
#define FIB_NODE_INDEX_INVALID
void fib_path_ext_list_resolve(fib_path_ext_list_t *list, fib_node_index_t path_list_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u32 path_weight
weight for the path.
fib_node_index_t fpe_path_index
The index of the path.
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
One path from an [EU]CMP set that the client wants to add to a load-balance object.
static int fib_path_ext_is_imp_null(fib_path_ext_t *path_ext)
Return true if the label stack is implicit null.
int dpo_is_drop(const dpo_id_t *dpo)
The Drop DPO will drop all packets, no questions asked.
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...
u8 * format_fib_path_ext_list(u8 *s, va_list *args)
Contribute an object that is to be used to forward non-end-of-stack MPLS packets. ...
enum fib_path_ext_adj_attr_t_ fib_path_ext_adj_attr_t
Flags present on an ADJ sourced path-extension.
int fib_path_cmp_w_route_path(fib_node_index_t path_index, const fib_route_path_t *rpath)
fib_route_path_t fpe_path
A description of the path that is being extended.
fib_path_ext_t * fib_path_ext_list_insert(fib_path_ext_list_t *list, fib_node_index_t path_list_index, fib_path_ext_type_t ext_type, const fib_route_path_t *rpath)
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)
enum mpls_eos_bit_t_ mpls_eos_bit_t