FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
gtpu_decap.c File Reference
+ Include dependency graph for gtpu_decap.c:

Go to the source code of this file.

Data Structures

struct  gtpu_rx_trace_t
 

Macros

#define gtpu_error(n, s)   s,
 
#define foreach_gtpu_flow_error
 
#define gtpu_error(n, s)   GTPU_FLOW_ERROR_##n,
 
#define gtpu_error(n, s)   s,
 
#define gtpu_local_need_csum_check(_b)
 
#define gtpu_local_csum_is_valid(_b)
 

Enumerations

enum  ip_vxan_bypass_next_t {
  IP_GENEVE_BYPASS_NEXT_DROP, IP_GENEVE_BYPASS_NEXT_GENEVE, IP_GENEVE_BYPASS_N_NEXT, IP_GTPU_BYPASS_NEXT_DROP,
  IP_GTPU_BYPASS_NEXT_GTPU, IP_GTPU_BYPASS_N_NEXT
}
 
enum  gtpu_flow_error_t { GTPU_FLOW_N_ERROR }
 

Functions

static u8format_gtpu_rx_trace (u8 *s, va_list *args)
 
static u32 validate_gtpu_fib (vlib_buffer_t *b, gtpu_tunnel_t *t, u32 is_ip4)
 
static uword gtpu_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, u32 is_ip4)
 
VLIB_NODE_FN() gtpu4_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() gtpu6_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
static uword ip_gtpu_bypass_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u32 is_ip4)
 
VLIB_NODE_FN() ip4_gtpu_bypass_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tip4_gtpu_bypass_init (vlib_main_t *vm)
 
VLIB_NODE_FN() ip6_gtpu_bypass_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tip6_gtpu_bypass_init (vlib_main_t *vm)
 
static_always_inline u8 gtpu_validate_udp_csum (vlib_main_t *vm, vlib_buffer_t *b)
 
static_always_inline u8 gtpu_check_ip (vlib_buffer_t *b, u16 payload_len)
 
static_always_inline u8 gtpu_check_ip_udp_len (vlib_buffer_t *b)
 
static_always_inline u8 gtpu_err_code (u8 ip_err0, u8 udp_err0, u8 csum_err0)
 
static uword gtpu_flow_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() gtpu4_flow_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

vlib_node_registration_t gtpu4_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu4_input_node) More...
 
vlib_node_registration_t gtpu6_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu6_input_node) More...
 
static char * gtpu_error_strings []
 
vlib_node_registration_t ip4_gtpu_bypass_node
 (constructor) VLIB_REGISTER_NODE (ip4_gtpu_bypass_node) More...
 
vlib_node_registration_t ip6_gtpu_bypass_node
 (constructor) VLIB_REGISTER_NODE (ip6_gtpu_bypass_node) More...
 
static char * gtpu_flow_error_strings []
 
vlib_node_registration_t gtpu4_flow_input_node
 (constructor) VLIB_REGISTER_NODE (gtpu4_flow_input_node) More...
 

Macro Definition Documentation

◆ foreach_gtpu_flow_error

#define foreach_gtpu_flow_error
Value:
_(NONE, "no error") \
_(PAYLOAD_ERROR, "Payload type errors") \
_(IP_CHECKSUM_ERROR, "Rx ip checksum errors") \
_(IP_HEADER_ERROR, "Rx ip header errors") \
_(UDP_CHECKSUM_ERROR, "Rx udp checksum errors") \
_(UDP_LENGTH_ERROR, "Rx udp length errors")

Definition at line 1213 of file gtpu_decap.c.

◆ gtpu_error [1/3]

#define gtpu_error (   n,
 
)    s,

Definition at line 1226 of file gtpu_decap.c.

◆ gtpu_error [2/3]

#define gtpu_error (   n,
 
)    GTPU_FLOW_ERROR_##n,

Definition at line 1226 of file gtpu_decap.c.

◆ gtpu_error [3/3]

#define gtpu_error (   n,
 
)    s,

Definition at line 1226 of file gtpu_decap.c.

◆ gtpu_local_csum_is_valid

#define gtpu_local_csum_is_valid (   _b)
Value:
((_b->flags & VNET_BUFFER_F_L4_CHECKSUM_CORRECT \
|| _b->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM) != 0)

Definition at line 1247 of file gtpu_decap.c.

◆ gtpu_local_need_csum_check

#define gtpu_local_need_csum_check (   _b)
Value:
(!(_b->flags & VNET_BUFFER_F_L4_CHECKSUM_COMPUTED \
|| _b->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))

Definition at line 1243 of file gtpu_decap.c.

Enumeration Type Documentation

◆ gtpu_flow_error_t

Enumerator
GTPU_FLOW_N_ERROR 

Definition at line 1221 of file gtpu_decap.c.

◆ ip_vxan_bypass_next_t

Enumerator
IP_GENEVE_BYPASS_NEXT_DROP 
IP_GENEVE_BYPASS_NEXT_GENEVE 
IP_GENEVE_BYPASS_N_NEXT 
IP_GTPU_BYPASS_NEXT_DROP 
IP_GTPU_BYPASS_NEXT_GTPU 
IP_GTPU_BYPASS_N_NEXT 

Definition at line 788 of file gtpu_decap.c.

Function Documentation

◆ format_gtpu_rx_trace()

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

Definition at line 32 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ gtpu4_flow_input_node()

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

Definition at line 1713 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ gtpu4_input_node()

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

Definition at line 727 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ gtpu6_input_node()

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

Definition at line 734 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ gtpu_check_ip()

static_always_inline u8 gtpu_check_ip ( vlib_buffer_t b,
u16  payload_len 
)

Definition at line 1269 of file gtpu_decap.c.

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

◆ gtpu_check_ip_udp_len()

static_always_inline u8 gtpu_check_ip_udp_len ( vlib_buffer_t b)

Definition at line 1279 of file gtpu_decap.c.

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

◆ gtpu_err_code()

static_always_inline u8 gtpu_err_code ( u8  ip_err0,
u8  udp_err0,
u8  csum_err0 
)

Definition at line 1290 of file gtpu_decap.c.

+ Here is the caller graph for this function:

◆ gtpu_flow_input()

static uword gtpu_flow_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
inlinestatic

Definition at line 1304 of file gtpu_decap.c.

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

◆ gtpu_input()

static uword gtpu_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
u32  is_ip4 
)
inlinestatic

Definition at line 58 of file gtpu_decap.c.

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

◆ gtpu_validate_udp_csum()

static_always_inline u8 gtpu_validate_udp_csum ( vlib_main_t vm,
vlib_buffer_t b 
)

Definition at line 1252 of file gtpu_decap.c.

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

◆ ip4_gtpu_bypass_init()

clib_error_t* ip4_gtpu_bypass_init ( vlib_main_t vm)

Definition at line 1179 of file gtpu_decap.c.

◆ ip4_gtpu_bypass_node()

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

Definition at line 1156 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ ip6_gtpu_bypass_init()

clib_error_t* ip6_gtpu_bypass_init ( vlib_main_t vm)

Definition at line 1208 of file gtpu_decap.c.

◆ ip6_gtpu_bypass_node()

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

Definition at line 1185 of file gtpu_decap.c.

+ Here is the call graph for this function:

◆ ip_gtpu_bypass_inline()

static uword ip_gtpu_bypass_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u32  is_ip4 
)
inlinestatic

Definition at line 795 of file gtpu_decap.c.

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

◆ validate_gtpu_fib()

static u32 validate_gtpu_fib ( vlib_buffer_t b,
gtpu_tunnel_t t,
u32  is_ip4 
)
inlinestatic

Definition at line 52 of file gtpu_decap.c.

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

Variable Documentation

◆ gtpu4_flow_input_node

vlib_node_registration_t gtpu4_flow_input_node
Initial value:
= {
.name = "gtpu4-flow-input",
.vector_size = sizeof (u32),
.format_trace = format_gtpu_rx_trace,
.n_errors = GTPU_FLOW_N_ERROR,
.error_strings = gtpu_flow_error_strings,
.n_next_nodes = GTPU_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:32
unsigned int u32
Definition: types.h:88
static char * gtpu_flow_error_strings[]
Definition: gtpu_decap.c:1232
#define foreach_gtpu_input_next
Definition: gtpu.h:181

(constructor) VLIB_REGISTER_NODE (gtpu4_flow_input_node)

Definition at line 1723 of file gtpu_decap.c.

◆ gtpu4_input_node

vlib_node_registration_t gtpu4_input_node
Initial value:
= {
.name = "gtpu4-input",
.vector_size = sizeof (u32),
.n_errors = GTPU_N_ERROR,
.error_strings = gtpu_error_strings,
.n_next_nodes = GTPU_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gtpu_rx_trace,
}
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:32
unsigned int u32
Definition: types.h:88
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:741
#define foreach_gtpu_input_next
Definition: gtpu.h:181

(constructor) VLIB_REGISTER_NODE (gtpu4_input_node)

Definition at line 748 of file gtpu_decap.c.

◆ gtpu6_input_node

vlib_node_registration_t gtpu6_input_node
Initial value:
= {
.name = "gtpu6-input",
.vector_size = sizeof (u32),
.n_errors = GTPU_N_ERROR,
.error_strings = gtpu_error_strings,
.n_next_nodes = GTPU_INPUT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
.format_trace = format_gtpu_rx_trace,
}
static u8 * format_gtpu_rx_trace(u8 *s, va_list *args)
Definition: gtpu_decap.c:32
unsigned int u32
Definition: types.h:88
static char * gtpu_error_strings[]
Definition: gtpu_decap.c:741
#define foreach_gtpu_input_next
Definition: gtpu.h:181

(constructor) VLIB_REGISTER_NODE (gtpu6_input_node)

Definition at line 768 of file gtpu_decap.c.

◆ gtpu_error_strings

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

Definition at line 741 of file gtpu_decap.c.

◆ gtpu_flow_error_strings

char* gtpu_flow_error_strings[]
static
Initial value:
= {
#define _(n,s)
#define gtpu_error(n,s)
}
#define foreach_gtpu_flow_error
Definition: gtpu_decap.c:1213

Definition at line 1232 of file gtpu_decap.c.

◆ ip4_gtpu_bypass_node

vlib_node_registration_t ip4_gtpu_bypass_node
Initial value:
= {
.name = "ip4-gtpu-bypass",
.vector_size = sizeof (u32),
.n_next_nodes = IP_GTPU_BYPASS_N_NEXT,
.next_nodes = {
[IP_GTPU_BYPASS_NEXT_DROP] = "error-drop",
[IP_GTPU_BYPASS_NEXT_GTPU] = "gtpu4-input",
},
.format_buffer = format_ip4_header,
}
format_function_t format_ip4_header
Definition: format.h:81
unsigned int u32
Definition: types.h:88
u8 * format_ip4_forward_next_trace(u8 *s, va_list *args)
Definition: ip4_forward.c:1229

(constructor) VLIB_REGISTER_NODE (ip4_gtpu_bypass_node)

Definition at line 1163 of file gtpu_decap.c.

◆ ip6_gtpu_bypass_node

vlib_node_registration_t ip6_gtpu_bypass_node
Initial value:
= {
.name = "ip6-gtpu-bypass",
.vector_size = sizeof (u32),
.n_next_nodes = IP_GTPU_BYPASS_N_NEXT,
.next_nodes = {
[IP_GTPU_BYPASS_NEXT_DROP] = "error-drop",
[IP_GTPU_BYPASS_NEXT_GTPU] = "gtpu6-input",
},
.format_buffer = format_ip6_header,
}
unsigned int u32
Definition: types.h:88
format_function_t format_ip6_header
Definition: format.h:95
u8 * format_ip6_forward_next_trace(u8 *s, va_list *args)
Definition: ip6_forward.c:951

(constructor) VLIB_REGISTER_NODE (ip6_gtpu_bypass_node)

Definition at line 1192 of file gtpu_decap.c.