FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
mpls_label_dpo.h File Reference
+ Include dependency graph for mpls_label_dpo.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mpls_label_dpo_t
 A representation of an MPLS label for imposition in the data-path. More...
 

Macros

#define MPLS_LABEL_DPO_ATTR_MAX   (MPLS_LABEL_DPO_ATTR_UNIFORM_MODE+1)
 
#define MPLS_LABEL_DPO_ATTR_NAMES
 
#define FOR_EACH_MPLS_LABEL_DPO_ATTR(_item)
 
#define MPLS_LABEL_DPO_MAX_N_LABELS   12
 Maximum number of labels in one DPO. More...
 

Typedefs

typedef enum mpls_label_dpo_attr_t_ mpls_label_dpo_attr_t
 Flags present on an MPLS label sourced path-extension. More...
 
typedef enum mpls_label_dpo_flags_t_ mpls_label_dpo_flags_t
 
typedef struct mpls_label_dpo_t mpls_label_dpo_t
 A representation of an MPLS label for imposition in the data-path. More...
 

Enumerations

enum  mpls_label_dpo_attr_t_ { MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR, MPLS_LABEL_DPO_ATTR_UNIFORM_MODE }
 Flags present on an MPLS label sourced path-extension. More...
 
enum  mpls_label_dpo_flags_t_ { MPLS_LABEL_DPO_FLAG_NONE = 0, MPLS_LABEL_DPO_FLAG_NO_IP_TTL_DECR = (1 << MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR), MPLS_LABEL_DPO_FLAG_UNIFORM_MODE = (1 << MPLS_LABEL_DPO_ATTR_UNIFORM_MODE) }
 

Functions

u8format_mpls_label_dpo_flags (u8 *s, va_list *args)
 Format the flags variable. More...
 
 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. More...
 
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. More...
 
u8format_mpls_label_dpo (u8 *s, va_list *args)
 
static mpls_label_dpo_tmpls_label_dpo_get (index_t index)
 
void mpls_label_dpo_module_init (void)
 
dpo_type_t mpls_label_dpo_get_type (mpls_label_dpo_flags_t flags)
 

Variables

mpls_label_dpo_tmpls_label_dpo_pool
 

Macro Definition Documentation

◆ FOR_EACH_MPLS_LABEL_DPO_ATTR

#define FOR_EACH_MPLS_LABEL_DPO_ATTR (   _item)
Value:

Definition at line 49 of file mpls_label_dpo.h.

◆ MPLS_LABEL_DPO_ATTR_MAX

#define MPLS_LABEL_DPO_ATTR_MAX   (MPLS_LABEL_DPO_ATTR_UNIFORM_MODE+1)

Definition at line 35 of file mpls_label_dpo.h.

◆ MPLS_LABEL_DPO_ATTR_NAMES

#define MPLS_LABEL_DPO_ATTR_NAMES
Value:
{ \
[MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR] = "no-ip-tll-decr", \
[MPLS_LABEL_DPO_ATTR_UNIFORM_MODE] = "uniform-mode", \
}

Definition at line 44 of file mpls_label_dpo.h.

◆ MPLS_LABEL_DPO_MAX_N_LABELS

#define MPLS_LABEL_DPO_MAX_N_LABELS   12

Maximum number of labels in one DPO.

Definition at line 62 of file mpls_label_dpo.h.

Typedef Documentation

◆ mpls_label_dpo_attr_t

Flags present on an MPLS label sourced path-extension.

◆ mpls_label_dpo_flags_t

◆ mpls_label_dpo_t

A representation of an MPLS label for imposition in the data-path.

Enumeration Type Documentation

◆ mpls_label_dpo_attr_t_

Flags present on an MPLS label sourced path-extension.

Enumerator
MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR 

Do not decrement the TTL of IP packet during imposition.

MPLS_LABEL_DPO_ATTR_UNIFORM_MODE 

Definition at line 26 of file mpls_label_dpo.h.

◆ mpls_label_dpo_flags_t_

Enumerator
MPLS_LABEL_DPO_FLAG_NONE 
MPLS_LABEL_DPO_FLAG_NO_IP_TTL_DECR 
MPLS_LABEL_DPO_FLAG_UNIFORM_MODE 

Definition at line 37 of file mpls_label_dpo.h.

Function Documentation

◆ format_mpls_label_dpo()

u8* format_mpls_label_dpo ( u8 s,
va_list *  args 
)

Definition at line 199 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ format_mpls_label_dpo_flags()

u8* format_mpls_label_dpo_flags ( u8 s,
va_list *  args 
)

Format the flags variable.

Definition at line 182 of file mpls_label_dpo.c.

+ Here is the caller graph for this function:

◆ mpls_label_dpo_create()

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.

Parameters
label_stackThe stack if labels to impose, outer most label first
eosThe inner most label's EOS bit
payload_protoThe ptocool of the payload packets that will be imposed with this label header.
parentThe parent of the created MPLS label object
dpoThe MPLS label DPO created

Definition at line 65 of file mpls_label_dpo.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_label_dpo_get()

static mpls_label_dpo_t* mpls_label_dpo_get ( index_t  index)
inlinestatic

Definition at line 146 of file mpls_label_dpo.h.

+ Here is the caller graph for this function:

◆ mpls_label_dpo_get_type()

dpo_type_t mpls_label_dpo_get_type ( mpls_label_dpo_flags_t  flags)

Definition at line 1350 of file mpls_label_dpo.c.

◆ mpls_label_dpo_module_init()

void mpls_label_dpo_module_init ( void  )

Definition at line 1332 of file mpls_label_dpo.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ STATIC_ASSERT()

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.

Should this get any bigger then we will need to reconsider how many labels can be pushed in one object.

Variable Documentation

◆ mpls_label_dpo_pool

mpls_label_dpo_t* mpls_label_dpo_pool

Definition at line 27 of file mpls_label_dpo.c.

MPLS_LABEL_DPO_ATTR_UNIFORM_MODE
@ MPLS_LABEL_DPO_ATTR_UNIFORM_MODE
Definition: mpls_label_dpo.h:32
MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR
@ MPLS_LABEL_DPO_ATTR_NO_IP_TTL_DECR
Do not decrement the TTL of IP packet during imposition.
Definition: mpls_label_dpo.h:31