FD.io VPP  v21.10.1-2-g0a485f517
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)
 
void mpls_label_dpo_create (fib_mpls_label_t *label_stack, mpls_eos_bit_t eos, dpo_proto_t payload_proto, mpls_label_dpo_flags_t flags, const dpo_id_t *parent, dpo_id_t *dpo)
 Create an MPLS label object. More...
 
u8format_mpls_label_dpo_flags (u8 *s, va_list *args)
 Format the flags variable. 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)
 
static mpls_unicast_header_tmpls_label_paint_w_ttl (vlib_buffer_t *b0, mpls_label_dpo_t *mld0, u8 ttl0)
 Paint on an MPLS label and fixup the TTL. More...
 
static mpls_unicast_header_tmpls_label_paint_w_ttl_exp (vlib_buffer_t *b0, mpls_label_dpo_t *mld0, u8 ttl0, u8 exp0)
 Paint on an MPLS label and fixup the TTL and EXP bits. More...
 
static mpls_unicast_header_tmpls_label_paint_w_ttl_mpls_exp (vlib_buffer_t *b0, mpls_label_dpo_t *mld0, u8 ttl0, u8 exp0)
 Paint on an MPLS label and fixup the TTL and EXP bits When the EXP bits are already bit shift to the correct place in in the 2nd byte (i.e. More...
 
static uword mpls_label_imposition_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, const dpo_proto_t dproto, const mpls_label_dpo_flags_t flags)
 
static u8format_mpls_label_imposition_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() mpls_mpls_label_imposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_mpls_label_imposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_imposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ethernet_mpls_label_imposition_pipe_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() mpls_mpls_label_imposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_mpls_label_imposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_imposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ethernet_mpls_label_imposition_uniform_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static void mpls_label_dpo_mem_show (void)
 
static void mpls_label_interpose (const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
 Interpose a label DPO. More...
 
static u16 mpls_label_dpo_get_mtu (const dpo_id_t *dpo)
 
void mpls_label_dpo_module_init (void)
 
dpo_type_t mpls_label_dpo_get_type (mpls_label_dpo_flags_t flags)
 

Variables

mpls_label_dpo_tmpls_label_dpo_pool
 
const char * mpls_label_dpo_attr_names [] = MPLS_LABEL_DPO_ATTR_NAMES
 Strings for the flags. More...
 
static dpo_type_t mpls_label_dpo_types [1<< MPLS_LABEL_DPO_ATTR_MAX]
 registered DPO types for each of the label sub-types. More...
 
vlib_node_registration_t mpls_mpls_label_imposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (mpls_mpls_label_imposition_pipe_node) More...
 
vlib_node_registration_t ip4_mpls_label_imposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_node) More...
 
vlib_node_registration_t ip6_mpls_label_imposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_node) More...
 
vlib_node_registration_t ethernet_mpls_label_imposition_pipe_node
 (constructor) VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_pipe_node) More...
 
vlib_node_registration_t mpls_mpls_label_imposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (mpls_mpls_label_imposition_uniform_node) More...
 
vlib_node_registration_t ip4_mpls_label_imposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_node) More...
 
vlib_node_registration_t ip6_mpls_label_imposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_node) More...
 
vlib_node_registration_t ethernet_mpls_label_imposition_uniform_node
 (constructor) VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_uniform_node) More...
 
vlib_node_registration_t ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node) More...
 
vlib_node_registration_t ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node) More...
 
vlib_node_registration_t ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node
 (constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node) More...
 
vlib_node_registration_t ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node
 (constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node) More...
 
const static dpo_vft_t mld_vft
 
const static char *const mpls_label_imp_pipe_ip4_nodes []
 
const static char *const mpls_label_imp_pipe_ip6_nodes []
 
const static char *const mpls_label_imp_pipe_mpls_nodes []
 
const static char *const mpls_label_imp_pipe_ethernet_nodes []
 
const static char *const *const mpls_label_imp_pipe_nodes [DPO_PROTO_NUM]
 
const static char *const mpls_label_imp_uniform_ip4_nodes []
 
const static char *const mpls_label_imp_uniform_ip6_nodes []
 
const static char *const mpls_label_imp_uniform_mpls_nodes []
 
const static char *const mpls_label_imp_uniform_ethernet_nodes []
 
const static char *const *const mpls_label_imp_uniform_nodes [DPO_PROTO_NUM]
 
const static char *const mpls_label_imp_pipe_no_ip_tll_decr_ip4_nodes []
 
const static char *const mpls_label_imp_pipe_no_ip_tll_decr_ip6_nodes []
 
const static char *const *const mpls_label_imp_pipe_no_ip_tll_decr_nodes [DPO_PROTO_NUM]
 
const static char *const mpls_label_imp_uniform_no_ip_tll_decr_ip4_nodes []
 
const static char *const mpls_label_imp_uniform_no_ip_tll_decr_ip6_nodes []
 
const static char *const *const mpls_label_imp_uniform_no_ip_tll_decr_nodes [DPO_PROTO_NUM]
 

Typedef Documentation

◆ mpls_label_imposition_trace_t

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

Function Documentation

◆ ethernet_mpls_label_imposition_pipe_node()

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

Definition at line 992 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ethernet_mpls_label_imposition_uniform_node()

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

Definition at line 1072 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ format_mpls_label_dpo()

u8* format_mpls_label_dpo ( u8 s,
va_list *  args 
)

Definition at line 199 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ format_mpls_label_dpo_flags()

u8* format_mpls_label_dpo_flags ( u8 s,
va_list *  args 
)

Format the flags variable.

Definition at line 182 of file mpls_label_dpo.c.

+ Here is the caller graph for this function:

◆ format_mpls_label_imposition_trace()

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

Definition at line 914 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node()

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

Definition at line 1093 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_imposition_pipe_node()

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

Definition at line 952 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node()

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

Definition at line 1133 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip4_mpls_label_imposition_uniform_node()

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

Definition at line 1032 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node()

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

Definition at line 1113 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_imposition_pipe_node()

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

Definition at line 972 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node()

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

Definition at line 1154 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ ip6_mpls_label_imposition_uniform_node()

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

Definition at line 1052 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_dpo_alloc()

static mpls_label_dpo_t* mpls_label_dpo_alloc ( void  )
static

Definition at line 41 of file mpls_label_dpo.c.

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

◆ mpls_label_dpo_create()

void mpls_label_dpo_create ( fib_mpls_label_t label_stack,
mpls_eos_bit_t  eos,
dpo_proto_t  payload_proto,
mpls_label_dpo_flags_t  flags,
const dpo_id_t paremt,
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
payload_protoThe ptocool of the payload packets that will be imposed with this label header.
parentThe parent of the created MPLS label object
dpoThe MPLS label DPO created

Definition at line 65 of file mpls_label_dpo.c.

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

◆ mpls_label_dpo_get_index()

static index_t mpls_label_dpo_get_index ( mpls_label_dpo_t mld)
static

Definition at line 59 of file mpls_label_dpo.c.

+ Here is the caller graph for this function:

◆ mpls_label_dpo_get_mtu()

static u16 mpls_label_dpo_get_mtu ( const dpo_id_t dpo)
static

Definition at line 1219 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_dpo_get_type()

dpo_type_t mpls_label_dpo_get_type ( mpls_label_dpo_flags_t  flags)

Definition at line 1350 of file mpls_label_dpo.c.

◆ mpls_label_dpo_lock()

static void mpls_label_dpo_lock ( dpo_id_t dpo)
static

Definition at line 234 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_dpo_mem_show()

static void mpls_label_dpo_mem_show ( void  )
static

Definition at line 1178 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_dpo_module_init()

void mpls_label_dpo_module_init ( void  )

Definition at line 1332 of file mpls_label_dpo.c.

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

◆ mpls_label_dpo_unlock()

static void mpls_label_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 244 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_imposition_inline()

static uword mpls_label_imposition_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
const dpo_proto_t  dproto,
const mpls_label_dpo_flags_t  flags 
)
inlinestatic

Definition at line 365 of file mpls_label_dpo.c.

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

◆ mpls_label_interpose()

static void mpls_label_interpose ( const dpo_id_t original,
const dpo_id_t parent,
dpo_id_t clone 
)
static

Interpose a label DPO.

used in the FIB unit tests

Definition at line 1190 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_label_paint()

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

Definition at line 283 of file mpls_label_dpo.c.

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

◆ mpls_label_paint_w_ttl()

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

Paint on an MPLS label and fixup the TTL.

Definition at line 310 of file mpls_label_dpo.c.

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

◆ mpls_label_paint_w_ttl_exp()

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

Paint on an MPLS label and fixup the TTL and EXP bits.

Definition at line 328 of file mpls_label_dpo.c.

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

◆ mpls_label_paint_w_ttl_mpls_exp()

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

Paint on an MPLS label and fixup the TTL and EXP bits When the EXP bits are already bit shift to the correct place in in the 2nd byte (i.e.

they were read from another label)

Definition at line 349 of file mpls_label_dpo.c.

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

◆ mpls_mpls_label_imposition_pipe_node()

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

Definition at line 932 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

◆ mpls_mpls_label_imposition_uniform_node()

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

Definition at line 1012 of file mpls_label_dpo.c.

+ Here is the call graph for this function:

Variable Documentation

◆ ethernet_mpls_label_imposition_pipe_node

vlib_node_registration_t ethernet_mpls_label_imposition_pipe_node
Initial value:
= {
.name = "ethernet-mpls-label-imposition-pipe",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_pipe_node)

Definition at line 1001 of file mpls_label_dpo.c.

◆ ethernet_mpls_label_imposition_uniform_node

vlib_node_registration_t ethernet_mpls_label_imposition_uniform_node
Initial value:
= {
.name = "ethernet-mpls-label-imposition-uniform",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ethernet_mpls_label_imposition_uniform_node)

Definition at line 1081 of file mpls_label_dpo.c.

◆ ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node

vlib_node_registration_t ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node
Initial value:
= {
.name = "ip4-mpls-label-imposition-pipe-no-ip-ttl-decr",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_no_ip_ttl_decr_node)

Definition at line 1102 of file mpls_label_dpo.c.

◆ ip4_mpls_label_imposition_pipe_node

vlib_node_registration_t ip4_mpls_label_imposition_pipe_node
Initial value:
= {
.name = "ip4-mpls-label-imposition-pipe",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_pipe_node)

Definition at line 961 of file mpls_label_dpo.c.

◆ ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node

vlib_node_registration_t ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node
Initial value:
= {
.name = "ip4-mpls-label-imposition-uniform-no-ip-ttl-decr",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_no_ip_ttl_decr_node)

Definition at line 1143 of file mpls_label_dpo.c.

◆ ip4_mpls_label_imposition_uniform_node

vlib_node_registration_t ip4_mpls_label_imposition_uniform_node
Initial value:
= {
.name = "ip4-mpls-label-imposition-uniform",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip4-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip4_mpls_label_imposition_uniform_node)

Definition at line 1041 of file mpls_label_dpo.c.

◆ ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node

vlib_node_registration_t ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node
Initial value:
= {
.name = "ip6-mpls-label-imposition-pipe-no-ip-ttl-decr",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_no_ip_ttl_decr_node)

Definition at line 1122 of file mpls_label_dpo.c.

◆ ip6_mpls_label_imposition_pipe_node

vlib_node_registration_t ip6_mpls_label_imposition_pipe_node
Initial value:
= {
.name = "ip6-mpls-label-imposition-pipe",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_pipe_node)

Definition at line 981 of file mpls_label_dpo.c.

◆ ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node

vlib_node_registration_t ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node
Initial value:
= {
.name = "ip6-mpls-label-imposition-uniform-no-ip-ttl-decr",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_no_ip_ttl_decr_node)

Definition at line 1164 of file mpls_label_dpo.c.

◆ ip6_mpls_label_imposition_uniform_node

vlib_node_registration_t ip6_mpls_label_imposition_uniform_node
Initial value:
= {
.name = "ip6-mpls-label-imposition-uniform",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "ip6-drop",
}
}

(constructor) VLIB_REGISTER_NODE (ip6_mpls_label_imposition_uniform_node)

Definition at line 1061 of file mpls_label_dpo.c.

◆ mld_vft

const static 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,
.dv_mk_interpose = mpls_label_interpose,
.dv_get_mtu = mpls_label_dpo_get_mtu,
}

Definition at line 1230 of file mpls_label_dpo.c.

◆ mpls_label_dpo_attr_names

const char* mpls_label_dpo_attr_names[] = MPLS_LABEL_DPO_ATTR_NAMES

Strings for the flags.

Definition at line 32 of file mpls_label_dpo.c.

◆ mpls_label_dpo_pool

mpls_label_dpo_t* mpls_label_dpo_pool

Definition at line 27 of file mpls_label_dpo.c.

◆ mpls_label_dpo_types

dpo_type_t mpls_label_dpo_types[1<< MPLS_LABEL_DPO_ATTR_MAX]
static

registered DPO types for each of the label sub-types.

And there's a subtype for each of the flag combinations.

Definition at line 38 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_ethernet_nodes

const static char* const mpls_label_imp_pipe_ethernet_nodes[]
static
Initial value:
=
{
"ethernet-mpls-label-imposition-pipe",
NULL,
}

Definition at line 1254 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_ip4_nodes

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

Definition at line 1239 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_ip6_nodes

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

Definition at line 1244 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_mpls_nodes

const static char* const mpls_label_imp_pipe_mpls_nodes[]
static
Initial value:
=
{
"mpls-label-imposition-pipe",
NULL,
}

Definition at line 1249 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_no_ip_tll_decr_ip4_nodes

const static char* const mpls_label_imp_pipe_no_ip_tll_decr_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-imposition-pipe-no-ip-ttl-decr",
NULL,
}

Definition at line 1297 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_no_ip_tll_decr_ip6_nodes

const static char* const mpls_label_imp_pipe_no_ip_tll_decr_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-imposition-pipe-no-ip-ttl-decr",
NULL,
}

Definition at line 1302 of file mpls_label_dpo.c.

◆ mpls_label_imp_pipe_no_ip_tll_decr_nodes

const static char* const * const mpls_label_imp_pipe_no_ip_tll_decr_nodes[DPO_PROTO_NUM]
static

◆ mpls_label_imp_pipe_nodes

const static char* const * const mpls_label_imp_pipe_nodes[DPO_PROTO_NUM]
static

◆ mpls_label_imp_uniform_ethernet_nodes

const static char* const mpls_label_imp_uniform_ethernet_nodes[]
static
Initial value:
=
{
"ethernet-mpls-label-imposition-uniform",
NULL,
}

Definition at line 1283 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_ip4_nodes

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

Definition at line 1268 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_ip6_nodes

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

Definition at line 1273 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_mpls_nodes

const static char* const mpls_label_imp_uniform_mpls_nodes[]
static
Initial value:
=
{
"mpls-label-imposition-uniform",
NULL,
}

Definition at line 1278 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_no_ip_tll_decr_ip4_nodes

const static char* const mpls_label_imp_uniform_no_ip_tll_decr_ip4_nodes[]
static
Initial value:
=
{
"ip4-mpls-label-imposition-uniform-no-ip-ttl-decr",
NULL,
}

Definition at line 1314 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_no_ip_tll_decr_ip6_nodes

const static char* const mpls_label_imp_uniform_no_ip_tll_decr_ip6_nodes[]
static
Initial value:
=
{
"ip6-mpls-label-imposition-uniform-no-ip-ttl-decr",
NULL,
}

Definition at line 1319 of file mpls_label_dpo.c.

◆ mpls_label_imp_uniform_no_ip_tll_decr_nodes

const static char* const * const mpls_label_imp_uniform_no_ip_tll_decr_nodes[DPO_PROTO_NUM]
static

◆ mpls_label_imp_uniform_nodes

const static char* const * const mpls_label_imp_uniform_nodes[DPO_PROTO_NUM]
static

◆ mpls_mpls_label_imposition_pipe_node

vlib_node_registration_t mpls_mpls_label_imposition_pipe_node
Initial value:
= {
.name = "mpls-label-imposition-pipe",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "mpls-drop",
}
}

(constructor) VLIB_REGISTER_NODE (mpls_mpls_label_imposition_pipe_node)

Definition at line 941 of file mpls_label_dpo.c.

◆ mpls_mpls_label_imposition_uniform_node

vlib_node_registration_t mpls_mpls_label_imposition_uniform_node
Initial value:
= {
.name = "mpls-label-imposition-uniform",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "mpls-drop",
}
}

(constructor) VLIB_REGISTER_NODE (mpls_mpls_label_imposition_uniform_node)

Definition at line 1021 of file mpls_label_dpo.c.

mpls_label_imp_uniform_mpls_nodes
const static char *const mpls_label_imp_uniform_mpls_nodes[]
Definition: mpls_label_dpo.c:1278
mpls_label_imp_uniform_no_ip_tll_decr_ip6_nodes
const static char *const mpls_label_imp_uniform_no_ip_tll_decr_ip6_nodes[]
Definition: mpls_label_dpo.c:1319
mpls_label_imp_pipe_mpls_nodes
const static char *const mpls_label_imp_pipe_mpls_nodes[]
Definition: mpls_label_dpo.c:1249
mpls_label_dpo_unlock
static void mpls_label_dpo_unlock(dpo_id_t *dpo)
Definition: mpls_label_dpo.c:244
mpls_label_imp_pipe_no_ip_tll_decr_ip6_nodes
const static char *const mpls_label_imp_pipe_no_ip_tll_decr_ip6_nodes[]
Definition: mpls_label_dpo.c:1302
mpls_label_imp_pipe_ip4_nodes
const static char *const mpls_label_imp_pipe_ip4_nodes[]
Definition: mpls_label_dpo.c:1239
mpls_label_imp_uniform_no_ip_tll_decr_ip4_nodes
const static char *const mpls_label_imp_uniform_no_ip_tll_decr_ip4_nodes[]
Definition: mpls_label_dpo.c:1314
mpls_label_dpo_get_mtu
static u16 mpls_label_dpo_get_mtu(const dpo_id_t *dpo)
Definition: mpls_label_dpo.c:1219
format_mpls_label_dpo
u8 * format_mpls_label_dpo(u8 *s, va_list *args)
Definition: mpls_label_dpo.c:199
mpls_label_imp_uniform_ip6_nodes
const static char *const mpls_label_imp_uniform_ip6_nodes[]
Definition: mpls_label_dpo.c:1273
mpls_label_imp_uniform_ethernet_nodes
const static char *const mpls_label_imp_uniform_ethernet_nodes[]
Definition: mpls_label_dpo.c:1283
mpls_label_interpose
static void mpls_label_interpose(const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
Interpose a label DPO.
Definition: mpls_label_dpo.c:1190
mpls_label_imp_pipe_ip6_nodes
const static char *const mpls_label_imp_pipe_ip6_nodes[]
Definition: mpls_label_dpo.c:1244
mpls_label_imp_pipe_ethernet_nodes
const static char *const mpls_label_imp_pipe_ethernet_nodes[]
Definition: mpls_label_dpo.c:1254
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
DPO_PROTO_MPLS
@ DPO_PROTO_MPLS
Definition: dpo.h:66
u32
unsigned int u32
Definition: types.h:88
format_mpls_label_imposition_trace
static u8 * format_mpls_label_imposition_trace(u8 *s, va_list *args)
Definition: mpls_label_dpo.c:914
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
mpls_label_dpo_lock
static void mpls_label_dpo_lock(dpo_id_t *dpo)
Definition: mpls_label_dpo.c:234
mpls_label_imp_pipe_no_ip_tll_decr_ip4_nodes
const static char *const mpls_label_imp_pipe_no_ip_tll_decr_ip4_nodes[]
Definition: mpls_label_dpo.c:1297
DPO_PROTO_ETHERNET
@ DPO_PROTO_ETHERNET
Definition: dpo.h:67
mpls_label_dpo_mem_show
static void mpls_label_dpo_mem_show(void)
Definition: mpls_label_dpo.c:1178
mpls_label_imp_uniform_ip4_nodes
const static char *const mpls_label_imp_uniform_ip4_nodes[]
Definition: mpls_label_dpo.c:1268