FD.io VPP  v21.01.1
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]); \
}
vlib_main_t * vm
Definition: in2out_ed.c:1580
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:317

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 224 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 337 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 363 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 170 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)
},
}
static uword udp4_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: udp_input.c:337
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_udp_input_trace(u8 *s, va_list *args)
Definition: udp_input.c:44
static char * udp_error_strings[]
Definition: udp_input.c:29
#define foreach_udp_input_next
Definition: udp_input.c:55

(constructor) VLIB_REGISTER_NODE (udp4_input_node)

Definition at line 344 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)
},
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:67
static u8 * format_udp_input_trace(u8 *s, va_list *args)
Definition: udp_input.c:44
static char * udp_error_strings[]
Definition: udp_input.c:29
#define foreach_udp_input_next
Definition: udp_input.c:55
static uword udp6_input(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: udp_input.c:363

(constructor) VLIB_REGISTER_NODE (udp6_input_node)

Definition at line 370 of file udp_input.c.

◆ udp_error_strings

char* udp_error_strings[]
static
Initial value:
= {
#define udp_error(n,s)
udp_error (NONE, "No error")
udp_error (NO_LISTENER, "No listener for dst port")
udp_error (LENGTH_ERROR, "Packets with length errors")
udp_error (PUNT, "No listener punt")
udp_error (ENQUEUED, "Packets enqueued")
udp_error (FIFO_FULL, "Fifo full")
udp_error (NOT_READY, "Connection not ready")
udp_error (ACCEPT, "Accepted session")
udp_error (CREATE_SESSION, "Failed to create session")
udp_error (MQ_FULL, "Application msg queue full")
}
typedef punt
Full description of which packets are requested to be punted.
Definition: punt.api:75
for(i=1;i<=collision_buckets;i++)
#define udp_error(n, s)
vl_api_address_t dst
Definition: gre.api:55
char const int length
Definition: cJSON.h:163
u16 port
Definition: lb_types.api:73

Definition at line 29 of file udp_input.c.