FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
mpls_disposition.c File Reference
+ Include dependency graph for mpls_disposition.c:

Go to the source code of this file.

Data Structures

struct  mpls_label_disposition_trace_t_
 A struct to hold tracing information for the MPLS label disposition node. More...
 

Typedefs

typedef struct mpls_label_disposition_trace_t_ mpls_label_disposition_trace_t
 A struct to hold tracing information for the MPLS label disposition node. More...
 

Functions

static mpls_disp_dpo_tmpls_disp_dpo_alloc (void)
 
static index_t mpls_disp_dpo_get_index (mpls_disp_dpo_t *mdd)
 
void mpls_disp_dpo_create (dpo_proto_t payload_proto, fib_rpf_id_t rpf_id, fib_mpls_lsp_mode_t mode, const dpo_id_t *parent, dpo_id_t *dpo)
 Create an MPLS label object. More...
 
u8format_mpls_disp_dpo (u8 *s, va_list *args)
 
static void mpls_disp_dpo_lock (dpo_id_t *dpo)
 
static void mpls_disp_dpo_unlock (dpo_id_t *dpo)
 
static uword mpls_label_disposition_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 payload_is_ip4, u8 payload_is_ip6, fib_mpls_lsp_mode_t mode)
 
static u8format_mpls_label_disposition_trace (u8 *s, va_list *args)
 
static uword ip4_mpls_label_disposition_pipe (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_disposition_pipe_node, ip4_mpls_label_disposition_pipe)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_disposition_pipe_node, ip6_mpls_label_disposition_pipe)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip4_mpls_label_disposition_uniform_node, ip4_mpls_label_disposition_uniform)
 
 VLIB_NODE_FUNCTION_MULTIARCH (ip6_mpls_label_disposition_uniform_node, ip6_mpls_label_disposition_uniform)
 
void mpls_disp_dpo_module_init (void)
 

Variables

mpls_disp_dpo_tmpls_disp_dpo_pool
 
vlib_node_registration_t ip4_mpls_label_disposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_pipe_node) More...
 
vlib_node_registration_t ip6_mpls_label_disposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_pipe_node) More...
 
vlib_node_registration_t ip4_mpls_label_disposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_uniform_node) More...
 
vlib_node_registration_t ip6_mpls_label_disposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_uniform_node) More...
 
static const dpo_vft_t mdd_vft
 
static const char *const mpls_label_disp_pipe_ip4_nodes []
 
static const char *const mpls_label_disp_pipe_ip6_nodes []
 
static const char *const *const mpls_label_disp_pipe_nodes [DPO_PROTO_NUM]
 
static const char *const mpls_label_disp_uniform_ip4_nodes []
 
static const char *const mpls_label_disp_uniform_ip6_nodes []
 
static const char *const *const mpls_label_disp_uniform_nodes [DPO_PROTO_NUM]
 

Typedef Documentation

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

Function Documentation

u8* format_mpls_disp_dpo ( u8 s,
va_list *  args 
)

Definition at line 82 of file mpls_disposition.c.

+ Here is the call graph for this function:

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

Definition at line 396 of file mpls_disposition.c.

+ Here is the call graph for this function:

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

Definition at line 409 of file mpls_disposition.c.

+ Here is the call graph for this function:

static mpls_disp_dpo_t* mpls_disp_dpo_alloc ( void  )
static

Definition at line 27 of file mpls_disposition.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mpls_disp_dpo_create ( dpo_proto_t  payload_proto,
fib_rpf_id_t  rpf_id,
fib_mpls_lsp_mode_t  mode,
const dpo_id_t parent,
dpo_id_t dpo 
)

Create an MPLS label object.

Parameters
payload_protoThe ptocool of the payload packets that will be imposed with this label header.
rpf_idThe RPF ID the packet will aquire - only for mcast
modeThe LSP mode; pipe or uniform
dpoThe parent of the created MPLS label object

Definition at line 46 of file mpls_disposition.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static index_t mpls_disp_dpo_get_index ( mpls_disp_dpo_t mdd)
static

Definition at line 40 of file mpls_disposition.c.

+ Here is the caller graph for this function:

static void mpls_disp_dpo_lock ( dpo_id_t dpo)
static

Definition at line 102 of file mpls_disposition.c.

+ Here is the call graph for this function:

void mpls_disp_dpo_module_init ( void  )

Definition at line 546 of file mpls_disposition.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mpls_disp_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 112 of file mpls_disposition.c.

+ Here is the call graph for this function:

static uword mpls_label_disposition_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  payload_is_ip4,
u8  payload_is_ip6,
fib_mpls_lsp_mode_t  mode 
)
inlinestatic

Definition at line 142 of file mpls_disposition.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_mpls_label_disposition_pipe_node  ,
ip4_mpls_label_disposition_pipe   
)

Definition at line 427 of file mpls_disposition.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip6_mpls_label_disposition_pipe_node  ,
ip6_mpls_label_disposition_pipe   
)

Definition at line 449 of file mpls_disposition.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip4_mpls_label_disposition_uniform_node  ,
ip4_mpls_label_disposition_uniform   
)

Definition at line 471 of file mpls_disposition.c.

+ Here is the call graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( ip6_mpls_label_disposition_uniform_node  ,
ip6_mpls_label_disposition_uniform   
)

Definition at line 493 of file mpls_disposition.c.

+ Here is the call graph for this function:

Variable Documentation

vlib_node_registration_t ip4_mpls_label_disposition_pipe_node
Initial value:
= {
.name = "ip4-mpls-label-disposition-pipe",
.vector_size = sizeof(u32),
.sibling_of = "ip4-input",
.n_errors = IP4_N_ERROR,
.error_strings = ip4_error_strings,
}
static uword ip4_mpls_label_disposition_pipe(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
char * ip4_error_strings[]
Definition: ip4_input.c:309
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_label_disposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_pipe_node)

Definition at line 417 of file mpls_disposition.c.

vlib_node_registration_t ip4_mpls_label_disposition_uniform_node
Initial value:
= {
.function = ip4_mpls_label_disposition_uniform,
.name = "ip4-mpls-label-disposition-uniform",
.vector_size = sizeof(u32),
.sibling_of = "ip4-input",
.n_errors = IP4_N_ERROR,
.error_strings = ip4_error_strings,
}
char * ip4_error_strings[]
Definition: ip4_input.c:309
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_label_disposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_uniform_node)

Definition at line 461 of file mpls_disposition.c.

vlib_node_registration_t ip6_mpls_label_disposition_pipe_node
Initial value:
= {
.function = ip6_mpls_label_disposition_pipe,
.name = "ip6-mpls-label-disposition-pipe",
.vector_size = sizeof(u32),
.sibling_of = "ip6-input",
.n_errors = IP6_N_ERROR,
.error_strings = ip6_error_strings,
}
unsigned int u32
Definition: types.h:88
char * ip6_error_strings[]
Definition: ip6_input.c:221
static u8 * format_mpls_label_disposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_pipe_node)

Definition at line 439 of file mpls_disposition.c.

vlib_node_registration_t ip6_mpls_label_disposition_uniform_node
Initial value:
= {
.function = ip6_mpls_label_disposition_uniform,
.name = "ip6-mpls-label-disposition-uniform",
.vector_size = sizeof(u32),
.sibling_of = "ip6-input",
.n_errors = IP6_N_ERROR,
.error_strings = ip6_error_strings,
}
unsigned int u32
Definition: types.h:88
char * ip6_error_strings[]
Definition: ip6_input.c:221
static u8 * format_mpls_label_disposition_trace(u8 *s, va_list *args)

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_uniform_node)

Definition at line 483 of file mpls_disposition.c.

const dpo_vft_t mdd_vft
static
Initial value:
= {
.dv_lock = mpls_disp_dpo_lock,
.dv_unlock = mpls_disp_dpo_unlock,
.dv_format = format_mpls_disp_dpo,
.dv_mem_show = mpls_disp_dpo_mem_show,
}
static void mpls_disp_dpo_lock(dpo_id_t *dpo)
static void mpls_disp_dpo_unlock(dpo_id_t *dpo)
u8 * format_mpls_disp_dpo(u8 *s, va_list *args)

Definition at line 505 of file mpls_disposition.c.

mpls_disp_dpo_t* mpls_disp_dpo_pool

Definition at line 24 of file mpls_disposition.c.

const char* const mpls_label_disp_pipe_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-disposition-pipe",
}
#define NULL
Definition: clib.h:57

Definition at line 512 of file mpls_disposition.c.

const char* const mpls_label_disp_pipe_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-disposition-pipe",
}
#define NULL
Definition: clib.h:57

Definition at line 517 of file mpls_disposition.c.

const char* const* const mpls_label_disp_pipe_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const mpls_label_disp_pipe_ip6_nodes[]
static const char *const mpls_label_disp_pipe_ip4_nodes[]

Definition at line 522 of file mpls_disposition.c.

const char* const mpls_label_disp_uniform_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-disposition-uniform",
}
#define NULL
Definition: clib.h:57

Definition at line 528 of file mpls_disposition.c.

const char* const mpls_label_disp_uniform_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-disposition-uniform",
}
#define NULL
Definition: clib.h:57

Definition at line 533 of file mpls_disposition.c.

const char* const* const mpls_label_disp_uniform_nodes[DPO_PROTO_NUM]
static
Initial value:
=
{
}
static const char *const mpls_label_disp_uniform_ip4_nodes[]
static const char *const mpls_label_disp_uniform_ip6_nodes[]

Definition at line 538 of file mpls_disposition.c.