FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
mpls_lookup.c File Reference
+ Include dependency graph for mpls_lookup.c:

Go to the source code of this file.

Data Structures

struct  mpls_lookup_trace_t
 
struct  mpls_load_balance_trace_t
 

Macros

#define mpls_error(n, s)   s,
 

Functions

static u8format_mpls_lookup_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() mpls_lookup_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static u8format_mpls_load_balance_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() mpls_load_balance_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tmpls_lookup_init (vlib_main_t *vm)
 

Variables

u32 mpls_lookup_to_replicate_edge
 The arc/edge from the MPLS lookup node to the MPLS replicate node. More...
 
static char * mpls_error_strings []
 
vlib_node_registration_t mpls_lookup_node
 (constructor) VLIB_REGISTER_NODE (mpls_lookup_node) More...
 
vlib_node_registration_t mpls_load_balance_node
 (constructor) VLIB_REGISTER_NODE (mpls_load_balance_node) More...
 

Macro Definition Documentation

◆ mpls_error

#define mpls_error (   n,
 
)    s,

Function Documentation

◆ format_mpls_load_balance_trace()

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

Definition at line 485 of file mpls_lookup.c.

+ Here is the call graph for this function:

◆ format_mpls_lookup_trace()

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

Definition at line 41 of file mpls_lookup.c.

+ Here is the call graph for this function:

◆ mpls_load_balance_node()

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

Definition at line 496 of file mpls_lookup.c.

+ Here is the call graph for this function:

◆ mpls_lookup_init()

static clib_error_t* mpls_lookup_init ( vlib_main_t vm)
static

Definition at line 698 of file mpls_lookup.c.

+ Here is the call graph for this function:

◆ mpls_lookup_node()

VLIB_NODE_FN() mpls_lookup_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 57 of file mpls_lookup.c.

+ Here is the call graph for this function:

Variable Documentation

◆ mpls_error_strings

char* mpls_error_strings[]
static
Initial value:
= {
#define mpls_error(n,s)
mpls_error (NONE, "no error")
mpls_error (UNKNOWN_PROTOCOL, "unknown protocol")
mpls_error (UNSUPPORTED_VERSION, "unsupported version")
mpls_error (PKTS_DECAP, "MPLS input packets decapsulated")
mpls_error (PKTS_ENCAP, "MPLS output packets encapsulated")
mpls_error (PKTS_NEED_FRAG, "MPLS output packets needs fragmentation")
mpls_error (NO_LABEL, "MPLS no label for fib/dst")
mpls_error (TTL_EXPIRED, "MPLS ttl expired")
mpls_error (S_NOT_SET, "MPLS s-bit not set")
mpls_error (BAD_LABEL, "invalid FIB id in label")
mpls_error (NOT_IP4, "non-ip4 packets dropped")
mpls_error (DISALLOWED_FIB, "disallowed FIB id")
mpls_error (NOT_ENABLED, "MPLS not enabled")
mpls_error (DROP, "MPLS DROP DPO")
mpls_error (PUNT, "MPLS PUNT DPO")
}
option version
Definition: sample.api:19
for(i=1;i<=collision_buckets;i++)
vl_api_ip_proto_t protocol
Definition: lb_types.api:71
u32 label
Definition: fib_types.api:25
vl_api_address_t dst
Definition: gre.api:61
u8 ttl
Definition: fib_types.api:26
#define mpls_error(n, s)
DROP
Definition: error.def:41
u32 ip4
Definition: one.api:440

Definition at line 458 of file mpls_lookup.c.

◆ mpls_load_balance_node

vlib_node_registration_t mpls_load_balance_node
Initial value:
= {
.name = "mpls-load-balance",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes =
{
[MPLS_LOOKUP_NEXT_DROP] = "mpls-drop",
},
}
unsigned int u32
Definition: types.h:88
static u8 * format_mpls_load_balance_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:485

(constructor) VLIB_REGISTER_NODE (mpls_load_balance_node)

Definition at line 683 of file mpls_lookup.c.

◆ mpls_lookup_node

vlib_node_registration_t mpls_lookup_node
Initial value:
= {
.name = "mpls-lookup",
.vector_size = sizeof (u32),
.n_errors = MPLS_N_ERROR,
.error_strings = mpls_error_strings,
.sibling_of = "mpls-load-balance",
.format_buffer = format_mpls_header,
.format_trace = format_mpls_lookup_trace,
.unformat_buffer = unformat_mpls_header,
}
format_function_t format_mpls_header
Definition: mpls.h:72
unsigned int u32
Definition: types.h:88
unformat_function_t unformat_mpls_header
Definition: mpls.h:84
static char * mpls_error_strings[]
Definition: mpls_lookup.c:458
static u8 * format_mpls_lookup_trace(u8 *s, va_list *args)
Definition: mpls_lookup.c:41

(constructor) VLIB_REGISTER_NODE (mpls_lookup_node)

Definition at line 464 of file mpls_lookup.c.

◆ mpls_lookup_to_replicate_edge

u32 mpls_lookup_to_replicate_edge

The arc/edge from the MPLS lookup node to the MPLS replicate node.

Definition at line 29 of file mpls_lookup.c.