FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
decap.c File Reference

L2 LISP-GPE decap code. More...

+ Include dependency graph for decap.c:

Go to the source code of this file.

Data Structures

struct  lisp_gpe_rx_trace_t
 

Macros

#define lisp_gpe_error(n, s)   s,
 

Functions

static u8format_lisp_gpe_rx_trace (u8 *s, va_list *args)
 
static u32 next_protocol_to_next_index (lisp_gpe_header_t *lgh, u8 *next_header)
 
static tunnel_lookup_tnext_index_to_iface (lisp_gpe_main_t *lgm, u32 next_index)
 
static_always_inline void incr_decap_stats (vnet_main_t *vnm, u32 thread_index, u32 length, u32 sw_if_index, u32 *last_sw_if_index, u32 *n_packets, u32 *n_bytes)
 
static uword lisp_gpe_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u8 is_v4)
 LISP-GPE decap dispatcher. More...
 
static uword lisp_gpe_ip4_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword lisp_gpe_ip6_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static void gpe_add_arc_from_input_to_nsh ()
 Adds arc from lisp-gpe-input to nsh-input if nsh-input is available. More...
 
clib_error_tgpe_decap_init (vlib_main_t *vm)
 GPE decap init function. More...
 
static uword lisp_gpe_nsh_placeholder_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static clib_error_tlisp_add_placeholder_nsh_node_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static u32 next_proto_to_next_index [LISP_GPE_NEXT_PROTOS]
 
static char * lisp_gpe_ip4_input_error_strings []
 
vlib_node_registration_t lisp_gpe_ip4_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node) More...
 
vlib_node_registration_t lisp_gpe_ip6_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node) More...
 
static char * lisp_gpe_nsh_placeholder_error_strings []
 
vlib_node_registration_t lisp_gpe_nsh_placeholder_input_node
 (constructor) VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node) More...
 
static vlib_cli_command_t lisp_add_placeholder_nsh_node_command
 (constructor) VLIB_CLI_COMMAND (lisp_add_placeholder_nsh_node_command) More...
 

Detailed Description

L2 LISP-GPE decap code.

Definition in file decap.c.

Macro Definition Documentation

◆ lisp_gpe_error

#define lisp_gpe_error (   n,
 
)    s,

Function Documentation

◆ format_lisp_gpe_rx_trace()

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

Definition at line 32 of file decap.c.

+ Here is the call graph for this function:

◆ gpe_add_arc_from_input_to_nsh()

static void gpe_add_arc_from_input_to_nsh ( )
static

Adds arc from lisp-gpe-input to nsh-input if nsh-input is available.

Definition at line 507 of file decap.c.

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

◆ gpe_decap_init()

clib_error_t* gpe_decap_init ( vlib_main_t vm)

GPE decap init function.

Definition at line 536 of file decap.c.

+ Here is the call graph for this function:

◆ incr_decap_stats()

static_always_inline void incr_decap_stats ( vnet_main_t vnm,
u32  thread_index,
u32  length,
u32  sw_if_index,
u32 last_sw_if_index,
u32 n_packets,
u32 n_bytes 
)

Definition at line 105 of file decap.c.

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

◆ lisp_add_placeholder_nsh_node_command_fn()

static clib_error_t* lisp_add_placeholder_nsh_node_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 577 of file decap.c.

+ Here is the call graph for this function:

◆ lisp_gpe_input_inline()

static uword lisp_gpe_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u8  is_v4 
)
static

LISP-GPE decap dispatcher.

Node Identifier:
lisp_gpe_input_inline

LISP-GPE decap dispatcher.

Decaps IP-UDP-LISP-GPE header and based on the next protocol and in the GPE header and the vni decides the next node to forward the packet to.

Parameters
[in]vmvlib_main_t corresponding to current thread.
[in]nodevlib_node_runtime_t data for this node.
[in]framevlib_frame_t whose contents should be dispatched.
Returns
number of vectors in frame.

Definition at line 149 of file decap.c.

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

◆ lisp_gpe_ip4_input()

static uword lisp_gpe_ip4_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 440 of file decap.c.

+ Here is the call graph for this function:

◆ lisp_gpe_ip6_input()

static uword lisp_gpe_ip6_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 447 of file decap.c.

+ Here is the call graph for this function:

◆ lisp_gpe_nsh_placeholder_input()

static uword lisp_gpe_nsh_placeholder_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 548 of file decap.c.

+ Here is the call graph for this function:

◆ next_index_to_iface()

static tunnel_lookup_t* next_index_to_iface ( lisp_gpe_main_t lgm,
u32  next_index 
)
inlinestatic

Definition at line 91 of file decap.c.

+ Here is the caller graph for this function:

◆ next_protocol_to_next_index()

static u32 next_protocol_to_next_index ( lisp_gpe_header_t lgh,
u8 next_header 
)
inlinestatic

Definition at line 62 of file decap.c.

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

Variable Documentation

◆ lisp_add_placeholder_nsh_node_command

vlib_cli_command_t lisp_add_placeholder_nsh_node_command
static
Initial value:
= {
.path = "test one nsh add-placeholder-decap-node",
}

(constructor) VLIB_CLI_COMMAND (lisp_add_placeholder_nsh_node_command)

Definition at line 590 of file decap.c.

◆ lisp_gpe_ip4_input_error_strings

char* lisp_gpe_ip4_input_error_strings[]
static
Initial value:
= {
#define lisp_gpe_error(n,s)
}

Definition at line 453 of file decap.c.

◆ lisp_gpe_ip4_input_node

vlib_node_registration_t lisp_gpe_ip4_input_node
Initial value:
= {
.function = lisp_gpe_ip4_input,
.name = "lisp-gpe-ip4-input",
.vector_size = sizeof (u32),
.n_next_nodes = LISP_GPE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_lisp_gpe_rx_trace,
}

(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip4_input_node)

Definition at line 460 of file decap.c.

◆ lisp_gpe_ip6_input_node

vlib_node_registration_t lisp_gpe_ip6_input_node
Initial value:
= {
.function = lisp_gpe_ip6_input,
.name = "lisp-gpe-ip6-input",
.vector_size = sizeof (u32),
.n_next_nodes = LISP_GPE_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_lisp_gpe_rx_trace,
}

(constructor) VLIB_REGISTER_NODE (lisp_gpe_ip6_input_node)

Definition at line 482 of file decap.c.

◆ lisp_gpe_nsh_placeholder_error_strings

char* lisp_gpe_nsh_placeholder_error_strings[]
static
Initial value:
= {
"lisp gpe placeholder nsh decap",
}

Definition at line 555 of file decap.c.

◆ lisp_gpe_nsh_placeholder_input_node

vlib_node_registration_t lisp_gpe_nsh_placeholder_input_node
Initial value:
= {
.name = "lisp-gpe-nsh-placeholder-input",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.n_errors = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (lisp_gpe_nsh_placeholder_input_node)

Definition at line 560 of file decap.c.

◆ next_proto_to_next_index

u32 next_proto_to_next_index[LISP_GPE_NEXT_PROTOS]
static
Initial value:
= {
LISP_GPE_INPUT_NEXT_DROP,
LISP_GPE_INPUT_NEXT_IP4_INPUT,
LISP_GPE_INPUT_NEXT_IP6_INPUT,
LISP_GPE_INPUT_NEXT_L2_INPUT,
LISP_GPE_INPUT_NEXT_DROP
}

Definition at line 53 of file decap.c.

format_lisp_gpe_header_with_length
u8 * format_lisp_gpe_header_with_length(u8 *s, va_list *args)
Definition: interface.c:171
lisp_add_placeholder_nsh_node_command_fn
static clib_error_t * lisp_add_placeholder_nsh_node_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: decap.c:577
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
format_lisp_gpe_rx_trace
static u8 * format_lisp_gpe_rx_trace(u8 *s, va_list *args)
Definition: decap.c:32
lisp_gpe_ip6_input
static uword lisp_gpe_ip6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:447
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
lisp_gpe_ip4_input_error_strings
static char * lisp_gpe_ip4_input_error_strings[]
Definition: decap.c:453
lisp_gpe_ip4_input
static uword lisp_gpe_ip4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:440
LISP_GPE_INPUT_N_NEXT
@ LISP_GPE_INPUT_N_NEXT
Definition: lisp_gpe.h:68
lisp_gpe_nsh_placeholder_error_strings
static char * lisp_gpe_nsh_placeholder_error_strings[]
Definition: decap.c:555
lisp_gpe_nsh_placeholder_input
static uword lisp_gpe_nsh_placeholder_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: decap.c:548
u32
unsigned int u32
Definition: types.h:88
foreach_lisp_gpe_ip_input_next
#define foreach_lisp_gpe_ip_input_next
Definition: lisp_gpe.h:56
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123