FD.io VPP  v18.07-rc0-415-g6c78436
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

#define FOR_EACH_MPLS_LABEL_DPO_ATTR (   _item)
Value:
_item++)
Do not decrement the TTL of IP packet during imposition.

Definition at line 49 of file mpls_label_dpo.h.

#define MPLS_LABEL_DPO_ATTR_MAX   (MPLS_LABEL_DPO_ATTR_UNIFORM_MODE+1)

Definition at line 35 of file mpls_label_dpo.h.

#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", \
}
Do not decrement the TTL of IP packet during imposition.

Definition at line 44 of file mpls_label_dpo.h.

#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

Flags present on an MPLS label sourced path-extension.

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

Enumeration Type Documentation

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.

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

u8* format_mpls_label_dpo ( u8 s,
va_list *  args 
)

Definition at line 191 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

u8* format_mpls_label_dpo_flags ( u8 s,
va_list *  args 
)

Format the flags variable.

Definition at line 174 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 57 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 call graph for this function:

+ Here is the caller graph for this function:

dpo_type_t mpls_label_dpo_get_type ( mpls_label_dpo_flags_t  flags)

Definition at line 1358 of file mpls_label_dpo.c.

+ Here is the caller graph for this function:

void mpls_label_dpo_module_init ( void  )

Definition at line 1340 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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_t* mpls_label_dpo_pool

Definition at line 24 of file mpls_label_dpo.c.