FD.io VPP  v21.06-3-gbb25fbf28
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)
 
VLIB_NODE_FN() ip4_mpls_label_disposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_disposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_mpls_label_disposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_disposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static void mpls_disp_dpo_mem_show (void)
 
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...
 
const static dpo_vft_t mdd_vft
 
const static char *const mpls_label_disp_pipe_ip4_nodes []
 
const static char *const mpls_label_disp_pipe_ip6_nodes []
 
const static char *const *const mpls_label_disp_pipe_nodes [DPO_PROTO_NUM]
 
const static char *const mpls_label_disp_uniform_ip4_nodes []
 
const static char *const mpls_label_disp_uniform_ip6_nodes []
 
const static char *const *const mpls_label_disp_uniform_nodes [DPO_PROTO_NUM]
 

Typedef Documentation

◆ mpls_label_disposition_trace_t

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

Function Documentation

◆ format_mpls_disp_dpo()

u8* format_mpls_disp_dpo ( u8 s,
va_list *  args 
)

Definition at line 83 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ format_mpls_label_disposition_trace()

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

Definition at line 410 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_disposition_pipe_node()

VLIB_NODE_FN() ip4_mpls_label_disposition_pipe_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 426 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_disposition_uniform_node()

VLIB_NODE_FN() ip4_mpls_label_disposition_uniform_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 462 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_disposition_pipe_node()

VLIB_NODE_FN() ip6_mpls_label_disposition_pipe_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 444 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_disposition_uniform_node()

VLIB_NODE_FN() ip6_mpls_label_disposition_uniform_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 480 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ mpls_disp_dpo_alloc()

static mpls_disp_dpo_t* mpls_disp_dpo_alloc ( void  )
static

Definition at line 28 of file mpls_disposition.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_disp_dpo_create()

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 47 of file mpls_disposition.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_disp_dpo_get_index()

static index_t mpls_disp_dpo_get_index ( mpls_disp_dpo_t mdd)
static

Definition at line 41 of file mpls_disposition.c.

+ Here is the caller graph for this function:

◆ mpls_disp_dpo_lock()

static void mpls_disp_dpo_lock ( dpo_id_t dpo)
static

Definition at line 107 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ mpls_disp_dpo_mem_show()

static void mpls_disp_dpo_mem_show ( void  )
static

Definition at line 500 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ mpls_disp_dpo_module_init()

void mpls_disp_dpo_module_init ( void  )

Definition at line 549 of file mpls_disposition.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mpls_disp_dpo_unlock()

static void mpls_disp_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 117 of file mpls_disposition.c.

+ Here is the call graph for this function:

◆ mpls_label_disposition_inline()

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 150 of file mpls_disposition.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ip4_mpls_label_disposition_pipe_node

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,
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_pipe_node)

Definition at line 434 of file mpls_disposition.c.

◆ ip4_mpls_label_disposition_uniform_node

vlib_node_registration_t ip4_mpls_label_disposition_uniform_node
Initial value:
= {
.name = "ip4-mpls-label-disposition-uniform",
.vector_size = sizeof(u32),
.sibling_of = "ip4-input",
.n_errors = IP4_N_ERROR,
.error_strings = ip4_error_strings,
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_disposition_uniform_node)

Definition at line 470 of file mpls_disposition.c.

◆ ip6_mpls_label_disposition_pipe_node

vlib_node_registration_t ip6_mpls_label_disposition_pipe_node
Initial value:
= {
.name = "ip6-mpls-label-disposition-pipe",
.vector_size = sizeof(u32),
.sibling_of = "ip6-input",
.n_errors = IP6_N_ERROR,
.error_strings = ip6_error_strings,
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_pipe_node)

Definition at line 452 of file mpls_disposition.c.

◆ ip6_mpls_label_disposition_uniform_node

vlib_node_registration_t ip6_mpls_label_disposition_uniform_node
Initial value:
= {
.name = "ip6-mpls-label-disposition-uniform",
.vector_size = sizeof(u32),
.sibling_of = "ip6-input",
.n_errors = IP6_N_ERROR,
.error_strings = ip6_error_strings,
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_disposition_uniform_node)

Definition at line 488 of file mpls_disposition.c.

◆ mdd_vft

const static 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,
}

Definition at line 508 of file mpls_disposition.c.

◆ mpls_disp_dpo_pool

mpls_disp_dpo_t* mpls_disp_dpo_pool

Definition at line 25 of file mpls_disposition.c.

◆ mpls_label_disp_pipe_ip4_nodes

const static char* const mpls_label_disp_pipe_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-disposition-pipe",
NULL,
}

Definition at line 515 of file mpls_disposition.c.

◆ mpls_label_disp_pipe_ip6_nodes

const static char* const mpls_label_disp_pipe_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-disposition-pipe",
NULL,
}

Definition at line 520 of file mpls_disposition.c.

◆ mpls_label_disp_pipe_nodes

const static char* const * const mpls_label_disp_pipe_nodes[DPO_PROTO_NUM]
static

◆ mpls_label_disp_uniform_ip4_nodes

const static char* const mpls_label_disp_uniform_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-disposition-uniform",
NULL,
}

Definition at line 531 of file mpls_disposition.c.

◆ mpls_label_disp_uniform_ip6_nodes

const static char* const mpls_label_disp_uniform_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-disposition-uniform",
NULL,
}

Definition at line 536 of file mpls_disposition.c.

◆ mpls_label_disp_uniform_nodes

const static char* const * const mpls_label_disp_uniform_nodes[DPO_PROTO_NUM]
static
format_mpls_disp_dpo
u8 * format_mpls_disp_dpo(u8 *s, va_list *args)
Definition: mpls_disposition.c:83
mpls_label_disp_pipe_ip4_nodes
const static char *const mpls_label_disp_pipe_ip4_nodes[]
Definition: mpls_disposition.c:515
ip6_error_strings
char * ip6_error_strings[]
Definition: ip6_input.c:222
IP4_N_ERROR
@ IP4_N_ERROR
Definition: ip4_error.h:97
mpls_disp_dpo_mem_show
static void mpls_disp_dpo_mem_show(void)
Definition: mpls_disposition.c:500
format_mpls_label_disposition_trace
static u8 * format_mpls_label_disposition_trace(u8 *s, va_list *args)
Definition: mpls_disposition.c:410
mpls_label_disp_pipe_ip6_nodes
const static char *const mpls_label_disp_pipe_ip6_nodes[]
Definition: mpls_disposition.c:520
mpls_label_disp_uniform_ip6_nodes
const static char *const mpls_label_disp_uniform_ip6_nodes[]
Definition: mpls_disposition.c:536
mpls_disp_dpo_lock
static void mpls_disp_dpo_lock(dpo_id_t *dpo)
Definition: mpls_disposition.c:107
mpls_disp_dpo_unlock
static void mpls_disp_dpo_unlock(dpo_id_t *dpo)
Definition: mpls_disposition.c:117
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
u32
unsigned int u32
Definition: types.h:88
ip4_error_strings
char * ip4_error_strings[]
Definition: ip4_input.c:377
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
mpls_label_disp_uniform_ip4_nodes
const static char *const mpls_label_disp_uniform_ip4_nodes[]
Definition: mpls_disposition.c:531
IP6_N_ERROR
@ IP6_N_ERROR
Definition: ip6_error.h:95