|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
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:");
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)
enum fib_path_ext_mpls_attr_t_ fib_path_ext_mpls_attr_t
Flags present on an MPLS label sourced path-extension.
int dpo_is_drop(const dpo_id_t *dpo)
The Drop DPO will drop all packets, no questions asked.
fib_path_ext_mpls_flags_t fpe_mpls_flags
For an MPLS type extension.
int fib_route_path_cmp(const fib_route_path_t *rpath1, const fib_route_path_t *rpath2)
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
u8 * format_fib_path_ext_list(u8 *s, va_list *args)
#define vec_insert_elts(V, E, N, M)
Insert N vector elements starting at element M, insert given elements (no header, unspecified alignme...
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)
u8 * format_fib_mpls_label(u8 *s, va_list *ap)
Format an MPLS label.
@ FIB_FORW_CHAIN_TYPE_MPLS_EOS
Contribute an object that is to be used to forward end-of-stack MPLS packets.
#define FOR_EACH_PATH_EXT_MPLS_ATTR(_item)
#define FIB_NODE_INDEX_INVALID
enum fib_path_list_walk_rc_t_ fib_path_list_walk_rc_t
return code to control pat-hlist walk
enum fib_path_ext_adj_attr_t_ fib_path_ext_adj_attr_t
Flags present on an ADJ sourced path-extension.
#define MPLS_IETF_IMPLICIT_NULL_LABEL
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)
@ FIB_FORW_CHAIN_TYPE_ETHERNET
Contribute an object that is to be used to forward Ethernet packets.
#define vec_delete(V, N, M)
Delete N elements starting at element M.
void fib_path_ext_resolve(fib_path_ext_t *path_ext, fib_node_index_t path_list_index)
int fib_path_ext_cmp(fib_path_ext_t *path_ext, const fib_route_path_t *rpath)
vl_api_gbp_next_hop_t nhs[8]
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)
void fib_path_ext_list_flush(fib_path_ext_list_t *list)
enum fib_path_ext_type_t_ fib_path_ext_type_t
A description of the type of path extension.
const char * fib_path_ext_adj_flags_names[]
int load_balance_is_drop(const dpo_id_t *dpo)
struct fib_path_ext_t_ * fpel_exts
fib_mpls_label_t * frp_label_stack
The outgoing MPLS label Stack.
fib_node_index_t fpe_path_index
The index of the path.
enum fib_path_ext_mpls_flags_t_ fib_path_ext_mpls_flags_t
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP4
Contribute an object that is to be used to forward IP4 packets.
@ MPLS_LABEL_DPO_FLAG_NONE
#define MPLS_LABEL_POP
A value that is explicit about the end of the LSP.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
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)
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
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.
A list of path-extensions.
u32 fib_node_index_t
A typedef of a node index.
void fib_path_contribute_forwarding(fib_node_index_t path_index, fib_forward_chain_type_t fct, 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)
#define FIB_PATH_EXT_MPLS_ATTR_NAMES
enum mpls_label_dpo_flags_t_ mpls_label_dpo_flags_t
@ FIB_PATH_LIST_WALK_STOP
int fib_path_ext_list_length(const fib_path_ext_list_t *list)
@ FIB_PATH_LIST_WALK_CONTINUE
void fib_path_ext_list_resolve(fib_path_ext_list_t *list, fib_node_index_t path_list_index)
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.
#define vec_free(V)
Free vector's memory (no header).
@ FIB_PATH_EXT_MPLS
An MPLS extension that maintains the path's outgoing labels,.
void dpo_copy(dpo_id_t *dst, const dpo_id_t *src)
atomic copy a data-plane object.
@ FIB_PATH_EXT_MPLS_FLAG_NO_IP_TTL_DECR
@ FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS
Contribute an object that is to be used to forward non-end-of-stack MPLS packets.
fib_path_ext_type_t fpe_type
The type of path extension.
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...
@ MPLS_LABEL_DPO_FLAG_NO_IP_TTL_DECR
description fragment has unexpected format
void fib_path_list_walk(fib_node_index_t path_list_index, fib_path_list_walk_fn_t func, void *ctx)
fib_route_path_t fpe_path
A description of the path that is being extended.
#define FIB_PATH_EXT_ADJ_ATTR_NAMES
A representation of a path as described by a route producer.
mpls_label_dpo_flags_t fib_path_ext_mpls_flags_to_mpls_label(fib_path_ext_mpls_flags_t fpe_flags)
#define vec_foreach(var, vec)
Vector iterator.
int fib_path_is_resolved(fib_node_index_t path_index)
const char * fib_path_ext_mpls_flags_names[]
u8 * format_fib_path_ext(u8 *s, va_list *args)
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)
fib_path_ext_adj_flags_t fpe_adj_flags
For an ADJ type extension.
A path extension is a per-entry addition to the forwarding information when packets are sent for that...
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)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
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)
int fib_path_cmp_w_route_path(fib_node_index_t path_index, const fib_route_path_t *rpath)
@ FIB_FORW_CHAIN_TYPE_UNICAST_IP6
Contribute an object that is to be used to forward IP6 packets.
u16 fib_path_get_weight(fib_node_index_t path_index)
enum mpls_eos_bit_t_ mpls_eos_bit_t
@ FIB_PATH_EXT_ADJ
A adj-source extension indicating the path's refinement criteria result.
@ FIB_PATH_EXT_ADJ_FLAG_NONE
One path from an [EU]CMP set that the client wants to add to a load-balance object.
#define FOR_EACH_PATH_EXT_ADJ_ATTR(_item)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.