47 s =
format(s,
"mpls-flags:[");
57 s =
format(s,
" labels:[");
72 s =
format(s,
"adj-flags:[");
146 return ((1 ==
vec_len(path_ext->fpe_label_stack)) &&
192 parent_fct = imp_null_fct;
212 parent_fct = child_fct;
224 parent_fct = child_fct;
298 path_ext->fpe_label_stack[0].fml_mode,
316 if ((path_ext->
fpe_type == ext_type) &&
355 if (NULL == path_ext)
397 vec_free(path_ext->fpe_label_stack);
398 *path_ext = new_path_ext;
436 if (NULL != path_ext)
442 vec_free(path_ext->fpe_label_stack);
454 vec_free(path_ext->fpe_label_stack);
470 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.
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)
enum mpls_eos_bit_t_ mpls_eos_bit_t
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.
#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.
description fragment has unexpected format
#define FOR_EACH_PATH_EXT_MPLS_ATTR(_item)
Contribute an object that is to be used to forward Ethernet packets.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
int load_balance_is_drop(const dpo_id_t *dpo)
u16 fib_path_get_weight(fib_node_index_t path_index)
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)
enum mpls_label_dpo_flags_t_ mpls_label_dpo_flags_t
fib_path_ext_mpls_flags_t fpe_mpls_flags
For an MPLS type extension.
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)
void mpls_label_dpo_create(fib_mpls_label_t *label_stack, mpls_eos_bit_t eos, dpo_proto_t payload_proto, mpls_label_dpo_flags_t flags, const dpo_id_t *parent, dpo_id_t *dpo)
Create an MPLS label object.
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
vl_api_gbp_next_hop_t nhs[8]
A list of path-extensions.
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)
mpls_label_dpo_flags_t fib_path_ext_mpls_flags_to_mpls_label(fib_path_ext_mpls_flags_t fpe_flags)
u8 * format_fib_path_ext(u8 *s, va_list *args)
sll srl srl sll sra u16x4 i
#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.
enum fib_path_ext_mpls_attr_t_ fib_path_ext_mpls_attr_t
Flags present on an MPLS label sourced path-extension.
#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)
#define MPLS_LABEL_POP
A value that is explicit about the end of the LSP.
#define FIB_PATH_EXT_MPLS_ATTR_NAMES
enum fib_path_ext_mpls_flags_t_ fib_path_ext_mpls_flags_t
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.
u8 * format_fib_mpls_label(u8 *s, va_list *ap)
Format an MPLS label.
static int fib_path_ext_is_imp_null(fib_path_ext_t *path_ext)
Return true if the label stack is implicit null imp-null and pop equate to the same this as this leve...
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. ...
const char * fib_path_ext_mpls_flags_names[]
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)