FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
udp_input.c File Reference
+ Include dependency graph for udp_input.c:

Go to the source code of this file.

Data Structures

struct  udp_input_trace_t
 

Macros

#define udp_error(n, s)   s,
 
#define foreach_udp_input_next   _ (DROP, "error-drop")
 
#define udp_store_err_counters(vm, is_ip4, cnts)
 
#define udp_inc_err_counter(cnts, err, val)
 

Enumerations

enum  udp_input_next_t { UDP_INPUT_N_NEXT }
 

Functions

static u8format_udp_input_trace (u8 *s, va_list *args)
 
static void udp_input_inc_counter (vlib_main_t *vm, u8 is_ip4, u8 evt, u8 val)
 
static void udp_trace_buffer (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, session_t *s, u16 error0)
 
static udp_connection_tudp_connection_accept (udp_connection_t *listener, session_dgram_hdr_t *hdr, u32 thread_index)
 
static void udp_connection_enqueue (udp_connection_t *uc0, session_t *s0, session_dgram_hdr_t *hdr0, u32 thread_index, vlib_buffer_t *b, u8 queue_event, u32 *error0)
 
static session_tudp_parse_and_lookup_buffer (vlib_buffer_t *b, session_dgram_hdr_t *hdr, u8 is_ip4)
 
static uword udp46_input_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_ip4)
 
static uword udp4_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword udp6_input (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static char * udp_error_strings []
 
vlib_node_registration_t udp4_input_node
 (constructor) VLIB_REGISTER_NODE (udp4_input_node) More...
 
vlib_node_registration_t udp6_input_node
 (constructor) VLIB_REGISTER_NODE (udp6_input_node) More...
 

Macro Definition Documentation

◆ foreach_udp_input_next

#define foreach_udp_input_next   _ (DROP, "error-drop")

Definition at line 55 of file udp_input.c.

◆ udp_error

#define udp_error (   n,
 
)    s,

◆ udp_inc_err_counter

#define udp_inc_err_counter (   cnts,
  err,
  val 
)
Value:
{ \
cnts[err] += val; \
}

Definition at line 83 of file udp_input.c.

◆ udp_store_err_counters

#define udp_store_err_counters (   vm,
  is_ip4,
  cnts 
)
Value:
{ \
int i; \
for (i = 0; i < UDP_N_ERROR; i++) \
if (cnts[i]) \
udp_input_inc_counter(vm, is_ip4, i, cnts[i]); \
}

Definition at line 75 of file udp_input.c.

Enumeration Type Documentation

◆ udp_input_next_t

Enumerator
UDP_INPUT_N_NEXT 

Definition at line 58 of file udp_input.c.

Function Documentation

◆ format_udp_input_trace()

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

Definition at line 44 of file udp_input.c.

◆ udp46_input_inline()

static uword udp46_input_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_ip4 
)
inlinestatic

Definition at line 226 of file udp_input.c.

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

◆ udp4_input()

static uword udp4_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 339 of file udp_input.c.

+ Here is the call graph for this function:

◆ udp6_input()

static uword udp6_input ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 365 of file udp_input.c.

+ Here is the call graph for this function:

◆ udp_connection_accept()

static udp_connection_t* udp_connection_accept ( udp_connection_t listener,
session_dgram_hdr_t hdr,
u32  thread_index 
)
static

Definition at line 104 of file udp_input.c.

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

◆ udp_connection_enqueue()

static void udp_connection_enqueue ( udp_connection_t uc0,
session_t s0,
session_dgram_hdr_t hdr0,
u32  thread_index,
vlib_buffer_t b,
u8  queue_event,
u32 error0 
)
static

Definition at line 131 of file udp_input.c.

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

◆ udp_input_inc_counter()

static void udp_input_inc_counter ( vlib_main_t vm,
u8  is_ip4,
u8  evt,
u8  val 
)
inlinestatic

Definition at line 67 of file udp_input.c.

+ Here is the call graph for this function:

◆ udp_parse_and_lookup_buffer()

static session_t* udp_parse_and_lookup_buffer ( vlib_buffer_t b,
session_dgram_hdr_t hdr,
u8  is_ip4 
)
inlinestatic

Definition at line 172 of file udp_input.c.

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

◆ udp_trace_buffer()

static void udp_trace_buffer ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
session_t s,
u16  error0 
)
static

Definition at line 89 of file udp_input.c.

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

Variable Documentation

◆ udp4_input_node

vlib_node_registration_t udp4_input_node
Initial value:
=
{
.function = udp4_input,
.name = "udp4-input",
.vector_size = sizeof (u32),
.format_trace = format_udp_input_trace,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_INPUT_N_NEXT,
.next_nodes = {
#define _(s, n)
},
}

(constructor) VLIB_REGISTER_NODE (udp4_input_node)

Definition at line 346 of file udp_input.c.

◆ udp6_input_node

vlib_node_registration_t udp6_input_node
Initial value:
=
{
.function = udp6_input,
.name = "udp6-input",
.vector_size = sizeof (u32),
.format_trace = format_udp_input_trace,
.error_strings = udp_error_strings,
.n_next_nodes = UDP_INPUT_N_NEXT,
.next_nodes = {
#define _(s, n)
},
}

(constructor) VLIB_REGISTER_NODE (udp6_input_node)

Definition at line 372 of file udp_input.c.

◆ udp_error_strings

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

Definition at line 29 of file udp_input.c.

udp6_input
static uword udp6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: udp_input.c:365
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
udp_error_strings
static char * udp_error_strings[]
Definition: udp_input.c:29
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
i
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:261
udp4_input
static uword udp4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: udp_input.c:339
UDP_N_ERROR
@ UDP_N_ERROR
Definition: udp.h:33
UDP_INPUT_N_NEXT
@ UDP_INPUT_N_NEXT
Definition: udp_input.c:63
format_udp_input_trace
static u8 * format_udp_input_trace(u8 *s, va_list *args)
Definition: udp_input.c:44
u32
unsigned int u32
Definition: types.h:88
foreach_udp_input_next
#define foreach_udp_input_next
Definition: udp_input.c:55
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123