FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
l2sess_node.c File Reference
+ Include dependency graph for l2sess_node.c:

Go to the source code of this file.

Data Structures

struct  l2sess_trace_t
 

Macros

#define foreach_l2sess_error   _(SWAPPED, "Mac swap packets processed")
 

Enumerations

enum  l2sess_error_t { L2SESS_N_ERROR }
 
enum  l2sess_next_t { L2SESS_NEXT_DROP, L2SESS_N_NEXT }
 

Functions

u8 l2sess_get_l4_proto (vlib_buffer_t *b0, int node_is_ip6)
 
u8 l2sess_get_tcp_flags (vlib_buffer_t *b0, int node_is_ip6)
 
static int l4_tcp_or_udp (u8 proto)
 
void l2sess_get_session_tables (l2sess_main_t *sm, u32 sw_if_index, int node_is_out, int node_is_ip6, u8 l4_proto, u32 *session_tables)
 
void l2sess_get_session_nexts (l2sess_main_t *sm, u32 sw_if_index, int node_is_out, int node_is_ip6, u8 l4_proto, u32 *session_nexts)
 
static void swap_bytes (vlib_buffer_t *b0, int off_a, int off_b, int nbytes)
 
void l2sess_flip_l3l4_fields (vlib_buffer_t *b0, int node_is_ip6, u8 l4_proto)
 
void l2sess_add_session (vlib_buffer_t *b0, int node_is_out, int node_is_ip6, u32 session_table, u32 session_match_next, u32 opaque_index)
 
static void * get_ptr_to_offset (vlib_buffer_t *b0, int offset)
 
void session_store_ip4_l3l4_info (vlib_buffer_t *b0, l2s_session_t *sess, int node_is_out)
 
void session_store_ip6_l3l4_info (vlib_buffer_t *b0, l2s_session_t *sess, int node_is_out)
 
static void build_match_from_session (l2sess_main_t *sm, u8 *match, l2s_session_t *sess, int is_out)
 
static void delete_session (l2sess_main_t *sm, u32 sw_if_index, u32 session_index)
 
static void udp_session_account_buffer (vlib_buffer_t *b0, l2s_session_t *s, int which_side, u64 now)
 
static u64 udp_session_get_timeout (l2sess_main_t *sm, l2s_session_t *sess, u64 now)
 
static void tcp_session_account_buffer (vlib_buffer_t *b0, l2s_session_t *s, int which_side, u64 now)
 
static u64 tcp_session_get_timeout (l2sess_main_t *sm, l2s_session_t *sess, u64 now)
 
static u64 session_get_timeout (l2sess_main_t *sm, l2s_session_t *sess, u64 now)
 
static u64 get_session_last_active_time (l2s_session_t *sess)
 
static int session_is_alive (l2sess_main_t *sm, l2s_session_t *sess, u64 now, u64 *last_active_cache)
 
static void check_idle_sessions (l2sess_main_t *sm, u32 sw_if_index, u64 now)
 
static uword l2sess_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int node_is_out, int node_is_ip6, int node_is_track, u32 *feat_next_node_index)
 

Variables

static char * l2sess_error_strings []
 

Macro Definition Documentation

#define foreach_l2sess_error   _(SWAPPED, "Mac swap packets processed")

Definition at line 52 of file l2sess_node.c.

Enumeration Type Documentation

Enumerator
L2SESS_N_ERROR 

Definition at line 54 of file l2sess_node.c.

Enumerator
L2SESS_NEXT_DROP 
L2SESS_N_NEXT 

Definition at line 68 of file l2sess_node.c.

Function Documentation

static void build_match_from_session ( l2sess_main_t sm,
u8 match,
l2s_session_t sess,
int  is_out 
)
static

Definition at line 322 of file l2sess_node.c.

+ Here is the caller graph for this function:

static void check_idle_sessions ( l2sess_main_t sm,
u32  sw_if_index,
u64  now 
)
static

Definition at line 467 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void delete_session ( l2sess_main_t sm,
u32  sw_if_index,
u32  session_index 
)
static

Definition at line 344 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void* get_ptr_to_offset ( vlib_buffer_t b0,
int  offset 
)
static

Definition at line 283 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 get_session_last_active_time ( l2s_session_t sess)
inlinestatic

Definition at line 446 of file l2sess_node.c.

+ Here is the caller graph for this function:

void l2sess_add_session ( vlib_buffer_t b0,
int  node_is_out,
int  node_is_ip6,
u32  session_table,
u32  session_match_next,
u32  opaque_index 
)

Definition at line 262 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void l2sess_flip_l3l4_fields ( vlib_buffer_t b0,
int  node_is_ip6,
u8  l4_proto 
)

Definition at line 243 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 l2sess_get_l4_proto ( vlib_buffer_t b0,
int  node_is_ip6 
)

Definition at line 75 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void l2sess_get_session_nexts ( l2sess_main_t sm,
u32  sw_if_index,
int  node_is_out,
int  node_is_ip6,
u8  l4_proto,
u32 session_nexts 
)

Definition at line 188 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void l2sess_get_session_tables ( l2sess_main_t sm,
u32  sw_if_index,
int  node_is_out,
int  node_is_ip6,
u8  l4_proto,
u32 session_tables 
)

Definition at line 116 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 l2sess_get_tcp_flags ( vlib_buffer_t b0,
int  node_is_ip6 
)

Definition at line 93 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword l2sess_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  node_is_out,
int  node_is_ip6,
int  node_is_track,
u32 feat_next_node_index 
)
static

Definition at line 528 of file l2sess_node.c.

+ Here is the call graph for this function:

static int l4_tcp_or_udp ( u8  proto)
inlinestatic

Definition at line 110 of file l2sess_node.c.

+ Here is the caller graph for this function:

static u64 session_get_timeout ( l2sess_main_t sm,
l2s_session_t sess,
u64  now 
)
inlinestatic

Definition at line 426 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int session_is_alive ( l2sess_main_t sm,
l2s_session_t sess,
u64  now,
u64 last_active_cache 
)
static

Definition at line 456 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void session_store_ip4_l3l4_info ( vlib_buffer_t b0,
l2s_session_t sess,
int  node_is_out 
)

Definition at line 296 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void session_store_ip6_l3l4_info ( vlib_buffer_t b0,
l2s_session_t sess,
int  node_is_out 
)

Definition at line 309 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void swap_bytes ( vlib_buffer_t b0,
int  off_a,
int  off_b,
int  nbytes 
)
inlinestatic

Definition at line 224 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void tcp_session_account_buffer ( vlib_buffer_t b0,
l2s_session_t s,
int  which_side,
u64  now 
)
static

Definition at line 389 of file l2sess_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 tcp_session_get_timeout ( l2sess_main_t sm,
l2s_session_t sess,
u64  now 
)
inlinestatic

Definition at line 409 of file l2sess_node.c.

+ Here is the caller graph for this function:

static void udp_session_account_buffer ( vlib_buffer_t b0,
l2s_session_t s,
int  which_side,
u64  now 
)
static

Definition at line 373 of file l2sess_node.c.

+ Here is the caller graph for this function:

static u64 udp_session_get_timeout ( l2sess_main_t sm,
l2s_session_t sess,
u64  now 
)
inlinestatic

Definition at line 383 of file l2sess_node.c.

+ Here is the caller graph for this function:

Variable Documentation

char* l2sess_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_l2sess_error
Definition: l2sess_node.c:52

Definition at line 62 of file l2sess_node.c.