FD.io VPP  v18.01.2-1-g9b554f3
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, u8 payload_is_ethernet)
 
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)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ethernet_mpls_label_imposition_node, ethernet_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...
 
vlib_node_registration_t ethernet_mpls_label_imposition_node
 (constructor) VLIB_REGISTER_NODE (ethernet_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 mpls_label_imp_ethernet_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 112 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 559 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 27 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 46 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 40 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 146 of file mpls_label_dpo.c.

+ Here is the call 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 void mpls_label_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 156 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 578 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,
u8  payload_is_ethernet 
)
inlinestatic

Definition at line 211 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 184 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 596 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 618 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 640 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ethernet_mpls_label_imposition_node  ,
ethernet_mpls_label_imposition   
)

Definition at line 662 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_node_registration_t ethernet_mpls_label_imposition_node
Initial value:
= {
.function = ethernet_mpls_label_imposition,
.name = "ethernet-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 (ethernet_mpls_label_imposition_node)

Definition at line 651 of file mpls_label_dpo.c.

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] = "ip4-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 607 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] = "ip6-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 629 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 674 of file mpls_label_dpo.c.

mpls_label_dpo_t* mpls_label_dpo_pool

Definition at line 24 of file mpls_label_dpo.c.

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

Definition at line 696 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 681 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 686 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 691 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_ethernet_nodes[]
static const char *const mpls_label_imp_ip4_nodes[]

Definition at line 702 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] = "mpls-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 585 of file mpls_label_dpo.c.