|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __MPLS_LABEL_DPO_H__
17 #define __MPLS_LABEL_DPO_H__
35 #define MPLS_LABEL_DPO_ATTR_MAX (MPLS_LABEL_DPO_ATTR_UNIFORM_MODE+1)
44 #define MPLS_LABEL_DPO_ATTR_NAMES { \
45 [MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR] = "no-ip-tll-decr", \
46 [MPLS_LABEL_DPO_ATTR_UNIFORM_MODE] = "uniform-mode", \
49 #define FOR_EACH_MPLS_LABEL_DPO_ATTR(_item) \
50 for (_item = MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR; \
51 _item <= MPLS_LABEL_DPO_ATTR_UNIFORM_MODE; \
62 #define MPLS_LABEL_DPO_MAX_N_LABELS 12
118 "MPLS label DPO is larger than one cache line.");
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 *paremt, dpo_id_t *dpo)
Create an MPLS label object.
mpls_unicast_header_t mld_hdr[MPLS_LABEL_DPO_MAX_N_LABELS]
The MPLS label header to impose.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 mld_n_labels
Size of the label stack.
vl_api_fib_mpls_label_t label_stack[16]
mpls_label_dpo_t * mpls_label_dpo_pool
@ MPLS_LABEL_DPO_FLAG_NONE
enum mpls_label_dpo_attr_t_ mpls_label_dpo_attr_t
Flags present on an MPLS label sourced path-extension.
u16 mld_n_hdr_bytes
Cached amount of header bytes to paint.
void mpls_label_dpo_module_init(void)
struct mpls_label_dpo_t mpls_label_dpo_t
A representation of an MPLS label for imposition in the data-path.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
u8 * format_mpls_label_dpo_flags(u8 *s, va_list *args)
Format the flags variable.
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type()
enum mpls_label_dpo_flags_t_ mpls_label_dpo_flags_t
#define CLIB_CACHE_LINE_BYTES
@ MPLS_LABEL_DPO_ATTR_UNIFORM_MODE
mpls_label_dpo_flags_t mld_flags
Flags.
mpls_label_dpo_attr_t_
Flags present on an MPLS label sourced path-extension.
@ MPLS_LABEL_DPO_FLAG_NO_IP_TTL_DECR
static mpls_label_dpo_t * mpls_label_dpo_get(index_t index)
@ MPLS_LABEL_DPO_FLAG_UNIFORM_MODE
u8 * format_mpls_label_dpo(u8 *s, va_list *args)
dpo_proto_t mld_payload_proto
The protocol of the payload/packets that are being encapped.
Configuration for each label value in the output-stack.
A representation of an MPLS label for imposition in the data-path.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define MPLS_LABEL_DPO_MAX_N_LABELS
Maximum number of labels in one DPO.
u16 mld_locks
Number of locks/users of the label.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
required for pool_get_aligned.
enum mpls_eos_bit_t_ mpls_eos_bit_t
dpo_type_t mpls_label_dpo_get_type(mpls_label_dpo_flags_t flags)
STATIC_ASSERT((sizeof(mpls_label_dpo_t)<=CLIB_CACHE_LINE_BYTES), "MPLS label DPO is larger than one cache line.")
Assert that the MPLS label object is less than a cache line in size.
dpo_id_t mld_dpo
Next DPO in the graph.
@ MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR
Do not decrement the TTL of IP packet during imposition.
vl_api_wireguard_peer_flags_t flags