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.");
Do not decrement the TTL of IP packet during imposition.
void mpls_label_dpo_module_init(void)
mpls_label_dpo_t * mpls_label_dpo_pool
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.
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.
enum dpo_type_t_ dpo_type_t
Common types of data-path objects New types can be dynamically added using dpo_register_new_type() ...
#define MPLS_LABEL_DPO_MAX_N_LABELS
Maximum number of labels in one DPO.
mpls_label_dpo_attr_t_
Flags present on an MPLS label sourced path-extension.
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
enum mpls_label_dpo_flags_t_ mpls_label_dpo_flags_t
dpo_proto_t mld_payload_proto
The protocol of the payload/packets that are being encapped.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u8 * format_mpls_label_dpo(u8 *s, va_list *args)
Configuration for each label value in the output-stack.
dpo_type_t mpls_label_dpo_get_type(mpls_label_dpo_flags_t flags)
u16 mld_n_hdr_bytes
Cached amount of header bytes to paint.
static mpls_label_dpo_t * mpls_label_dpo_get(index_t index)
struct mpls_label_dpo_t mpls_label_dpo_t
A representation of an MPLS label for imposition in the data-path.
u8 mld_n_labels
Size of the label stack.
dpo_id_t mld_dpo
Next DPO in the graph.
mpls_unicast_header_t mld_hdr[MPLS_LABEL_DPO_MAX_N_LABELS]
The MPLS label header to impose.
mpls_label_dpo_flags_t mld_flags
Flags.
u16 mld_locks
Number of locks/users of the label.
#define CLIB_CACHE_LINE_BYTES
enum mpls_label_dpo_attr_t_ mpls_label_dpo_attr_t
Flags present on an MPLS label sourced path-extension.
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.
A representation of an MPLS label for imposition in the data-path.
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
required for pool_get_aligned.
enum mpls_eos_bit_t_ mpls_eos_bit_t