FD.io VPP  v18.01.2-1-g9b554f3
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_MAX_N_LABELS   12
 Maximum number of labels in one DPO. More...
 

Typedefs

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

Functions

 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...
 
index_t mpls_label_dpo_create (mpls_label_t *label_stack, mpls_eos_bit_t eos, u8 ttl, u8 exp, dpo_proto_t payload_proto, const 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)
 

Variables

mpls_label_dpo_tmpls_label_dpo_pool
 

Macro Definition Documentation

#define MPLS_LABEL_DPO_MAX_N_LABELS   12

Maximum number of labels in one DPO.

Definition at line 27 of file mpls_label_dpo.h.

Typedef Documentation

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

Function Documentation

u8* format_mpls_label_dpo ( u8 s,
va_list *  args 
)

Definition at line 112 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

index_t mpls_label_dpo_create ( mpls_label_t label_stack,
mpls_eos_bit_t  eos,
u8  ttl,
u8  exp,
dpo_proto_t  payload_proto,
const 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
ttlThe inner most label's TTL bit
expThe inner most label's EXP bit
payload_protoThe ptocool of the payload packets that will be imposed with this label header.
dpoThe parent of the created MPLS label object

Definition at line 46 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 100 of file mpls_label_dpo.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mpls_label_dpo_module_init ( void  )

Definition at line 712 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.