FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
mpls_label_dpo.c File Reference
+ Include dependency graph for mpls_label_dpo.c:

Go to the source code of this file.

Data Structures

struct  mpls_label_imposition_trace_t_
 A struct to hold tracing information for the MPLS label imposition node. More...
 

Typedefs

typedef struct mpls_label_imposition_trace_t_ mpls_label_imposition_trace_t
 A struct to hold tracing information for the MPLS label imposition node. More...
 

Functions

static mpls_label_dpo_tmpls_label_dpo_alloc (void)
 
static index_t mpls_label_dpo_get_index (mpls_label_dpo_t *mld)
 
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 void mpls_label_dpo_lock (dpo_id_t *dpo)
 
static void mpls_label_dpo_unlock (dpo_id_t *dpo)
 
static mpls_unicast_header_tmpls_label_paint (vlib_buffer_t *b0, mpls_label_dpo_t *mld0, u8 ttl0)
 
static uword mpls_label_imposition_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 payload_is_ip4, u8 payload_is_ip6)
 
static u8format_mpls_label_imposition_trace (u8 *s, va_list *args)
 
static uword mpls_label_imposition (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (mpls_label_imposition_node, mpls_label_imposition)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_imposition_node, ip4_mpls_label_imposition)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_imposition_node, ip6_mpls_label_imposition)
 
void mpls_label_dpo_module_init (void)
 

Variables

mpls_label_dpo_tmpls_label_dpo_pool
 
vlib_node_registration_t mpls_label_imposition_node
 (constructor) VLIB_REGISTER_NODE (mpls_label_imposition_node) More...
 
vlib_node_registration_t ip4_mpls_label_imposition_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_node) More...
 
vlib_node_registration_t ip6_mpls_label_imposition_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_node) More...
 
static const dpo_vft_t mld_vft
 
static const char *const mpls_label_imp_ip4_nodes []
 
static const char *const mpls_label_imp_ip6_nodes []
 
static const char *const mpls_label_imp_mpls_nodes []
 
static const char *const *const mpls_label_imp_nodes [DPO_PROTO_NUM]
 

Typedef Documentation

A struct to hold tracing information for the MPLS label imposition node.

Function Documentation

u8* format_mpls_label_dpo ( u8 s,
va_list *  args 
)

Definition at line 100 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

static u8* format_mpls_label_imposition_trace ( u8 s,
va_list *  args 
)
static

Definition at line 531 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

static mpls_label_dpo_t* mpls_label_dpo_alloc ( void  )
static

Definition at line 26 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller 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 45 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static index_t mpls_label_dpo_get_index ( mpls_label_dpo_t mld)
static

Definition at line 39 of file mpls_label_dpo.c.

+ Here is the caller graph for this function:

static void mpls_label_dpo_lock ( dpo_id_t dpo)
static

Definition at line 126 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

void mpls_label_dpo_module_init ( void  )

Definition at line 655 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mpls_label_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 136 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

static uword mpls_label_imposition ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 550 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

static uword mpls_label_imposition_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  payload_is_ip4,
u8  payload_is_ip6 
)
inlinestatic

Definition at line 191 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static mpls_unicast_header_t* mpls_label_paint ( vlib_buffer_t b0,
mpls_label_dpo_t mld0,
u8  ttl0 
)
inlinestatic

Definition at line 164 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( mpls_label_imposition_node  ,
mpls_label_imposition   
)

Definition at line 568 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_mpls_label_imposition_node  ,
ip4_mpls_label_imposition   
)

Definition at line 590 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip6_mpls_label_imposition_node  ,
ip6_mpls_label_imposition   
)

Definition at line 612 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_node_registration_t ip4_mpls_label_imposition_node
Initial value:
= {
.function = ip4_mpls_label_imposition,
.name = "ip4-mpls-label-imposition",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
}
}
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_label_imposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_node)

Definition at line 579 of file mpls_label_dpo.c.

vlib_node_registration_t ip6_mpls_label_imposition_node
Initial value:
= {
.function = ip6_mpls_label_imposition,
.name = "ip6-mpls-label-imposition",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
}
}
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_label_imposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_node)

Definition at line 601 of file mpls_label_dpo.c.

const dpo_vft_t mld_vft
static
Initial value:
= {
.dv_lock = mpls_label_dpo_lock,
.dv_unlock = mpls_label_dpo_unlock,
.dv_format = format_mpls_label_dpo,
.dv_mem_show = mpls_label_dpo_mem_show,
}
u8 * format_mpls_label_dpo(u8 *s, va_list *args)
static void mpls_label_dpo_lock(dpo_id_t *dpo)
static void mpls_label_dpo_unlock(dpo_id_t *dpo)

Definition at line 624 of file mpls_label_dpo.c.

mpls_label_dpo_t* mpls_label_dpo_pool

Definition at line 23 of file mpls_label_dpo.c.

const char* const mpls_label_imp_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-imposition",
}
#define NULL
Definition: clib.h:55

Definition at line 631 of file mpls_label_dpo.c.

const char* const mpls_label_imp_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-imposition",
}
#define NULL
Definition: clib.h:55

Definition at line 636 of file mpls_label_dpo.c.

const char* const mpls_label_imp_mpls_nodes[]
static
Initial value:
=
{
"mpls-label-imposition",
}
#define NULL
Definition: clib.h:55

Definition at line 641 of file mpls_label_dpo.c.

const char* const* const mpls_label_imp_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const mpls_label_imp_ip6_nodes[]
static const char *const mpls_label_imp_mpls_nodes[]
static const char *const mpls_label_imp_ip4_nodes[]

Definition at line 646 of file mpls_label_dpo.c.

vlib_node_registration_t mpls_label_imposition_node
Initial value:
= {
.function = mpls_label_imposition,
.name = "mpls-label-imposition",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
}
}
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_label_imposition_trace(u8 *s, va_list *args)
static uword mpls_label_imposition(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (mpls_label_imposition_node)

Definition at line 557 of file mpls_label_dpo.c.