FD.io VPP  v18.04-17-g3a0d853
Vector Packet Processing
fa_node.h File Reference
+ Include dependency graph for fa_node.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  fa_packet_info_t
 
union  fa_session_l4_key_t
 
union  fa_5tuple_t
 
struct  fa_5tuple_opaque_t
 
struct  fa_session_t
 
struct  fa_full_session_id_t
 
struct  acl_fa_per_worker_data_t
 

Macros

#define TCP_FLAG_FIN   0x01
 
#define TCP_FLAG_SYN   0x02
 
#define TCP_FLAG_RST   0x04
 
#define TCP_FLAG_PUSH   0x08
 
#define TCP_FLAG_ACK   0x10
 
#define TCP_FLAG_URG   0x20
 
#define TCP_FLAG_ECE   0x40
 
#define TCP_FLAG_CWR   0x80
 
#define TCP_FLAGS_RSTFINACKSYN   (TCP_FLAG_RST + TCP_FLAG_FIN + TCP_FLAG_SYN + TCP_FLAG_ACK)
 
#define TCP_FLAGS_ACKSYN   (TCP_FLAG_SYN + TCP_FLAG_ACK)
 
#define ACL_FA_CONN_TABLE_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)
 
#define ACL_FA_CONN_TABLE_DEFAULT_HASH_MEMORY_SIZE   (1<<30)
 
#define ACL_FA_CONN_TABLE_DEFAULT_MAX_ENTRIES   1000000
 
#define FA_POLICY_EPOCH_MASK   0x7fff
 
#define FA_POLICY_EPOCH_IS_INPUT   0x8000
 
#define CT_ASSERT_EQUAL(name, x, y)   typedef int assert_ ## name ## _compile_time_assertion_failed[((x) == (y))-1]
 
#define elog_acl_maybe_trace_X1(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1)
 
#define elog_acl_maybe_trace_X2(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1, acl_elog_val2)
 
#define elog_acl_maybe_trace_X3(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1, acl_elog_val2, acl_elog_val3)
 
#define elog_acl_maybe_trace_X4(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1, acl_elog_val2, acl_elog_val3, acl_elog_val4)
 

Enumerations

enum  acl_fa_next_t { ACL_FA_ERROR_DROP, ACL_FA_N_NEXT }
 
enum  { ACL_FA_CLEANER_RESCHEDULE = 1, ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX }
 

Functions

 CT_ASSERT_EQUAL (fa_l3_key_size_is_40, offsetof(fa_5tuple_t, pkt), offsetof(clib_bihash_kv_40_8_t, value))
 
 CT_ASSERT_EQUAL (fa_l4_key_t_is_8, sizeof(fa_session_l4_key_t), sizeof(u64))
 
 CT_ASSERT_EQUAL (fa_packet_info_t_is_8, sizeof(fa_packet_info_t), sizeof(u64))
 
 CT_ASSERT_EQUAL (fa_l3_kv_size_is_48, sizeof(fa_5tuple_t), sizeof(clib_bihash_kv_40_8_t))
 
 CT_ASSERT_EQUAL (fa_session_t_size_is_128, sizeof(fa_session_t), 128)
 
 CT_ASSERT_EQUAL (fa_full_session_id_size_is_64, sizeof(fa_full_session_id_t), sizeof(u64))
 
void acl_fa_enable_disable (u32 sw_if_index, int is_input, int enable_disable)
 
void show_fa_sessions_hash (vlib_main_t *vm, u32 verbose)
 
u8format_acl_plugin_5tuple (u8 *s, va_list *args)
 

Variables

enum { ... }  acl_fa_cleaner_process_event_e
 

Macro Definition Documentation

#define ACL_FA_CONN_TABLE_DEFAULT_HASH_MEMORY_SIZE   (1<<30)

Definition at line 21 of file fa_node.h.

#define ACL_FA_CONN_TABLE_DEFAULT_HASH_NUM_BUCKETS   (64 * 1024)

Definition at line 20 of file fa_node.h.

#define ACL_FA_CONN_TABLE_DEFAULT_MAX_ENTRIES   1000000

Definition at line 22 of file fa_node.h.

#define CT_ASSERT_EQUAL (   name,
  x,
  y 
)    typedef int assert_ ## name ## _compile_time_assertion_failed[((x) == (y))-1]

Definition at line 102 of file fa_node.h.

#define elog_acl_maybe_trace_X1 (   am,
  acl_elog_trace_format_label,
  acl_elog_trace_format_args,
  acl_elog_val1 
)
Value:
do { \
if (am->trace_sessions) { \
CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1)]; } *static_check); \
u16 thread_index = os_get_thread_index (); \
vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \
{ \
.format = "(%02d) " acl_elog_trace_format_label, \
.format_args = "i2" acl_elog_trace_format_args, \
}; \
CLIB_PACKED(struct \
{ \
typeof(acl_elog_val1) val1; \
}) *ed; \
ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \
ed->thread = thread_index; \
ed->val1 = acl_elog_val1; \
} \
} while (0)
vlib_main_t vlib_global_main
Definition: main.c:1642
#define CLIB_UNUSED(x)
Definition: clib.h:79
pthread_t thread[MAX_CONNS]
Definition: main.c:125
vlib_worker_thread_t * vlib_worker_threads
Definition: threads.c:35
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:475
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
static_always_inline uword os_get_thread_index(void)
Definition: os.h:62
static void elog_track(elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
Log a single-datum event to a specific track, non-inline version.
Definition: elog.h:395
#define CLIB_PACKED(x)
Definition: clib.h:78

Definition at line 188 of file fa_node.h.

#define elog_acl_maybe_trace_X2 (   am,
  acl_elog_trace_format_label,
  acl_elog_trace_format_args,
  acl_elog_val1,
  acl_elog_val2 
)
Value:
do { \
if (am->trace_sessions) { \
CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2)]; } *static_check); \
u16 thread_index = os_get_thread_index (); \
vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \
{ \
.format = "(%02d) " acl_elog_trace_format_label, \
.format_args = "i2" acl_elog_trace_format_args, \
}; \
CLIB_PACKED(struct \
{ \
typeof(acl_elog_val1) val1; \
typeof(acl_elog_val2) val2; \
}) *ed; \
ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \
ed->thread = thread_index; \
ed->val1 = acl_elog_val1; \
ed->val2 = acl_elog_val2; \
} \
} while (0)
vlib_main_t vlib_global_main
Definition: main.c:1642
#define CLIB_UNUSED(x)
Definition: clib.h:79
pthread_t thread[MAX_CONNS]
Definition: main.c:125
vlib_worker_thread_t * vlib_worker_threads
Definition: threads.c:35
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:475
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
static_always_inline uword os_get_thread_index(void)
Definition: os.h:62
static void elog_track(elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
Log a single-datum event to a specific track, non-inline version.
Definition: elog.h:395
#define CLIB_PACKED(x)
Definition: clib.h:78

Definition at line 213 of file fa_node.h.

#define elog_acl_maybe_trace_X3 (   am,
  acl_elog_trace_format_label,
  acl_elog_trace_format_args,
  acl_elog_val1,
  acl_elog_val2,
  acl_elog_val3 
)
Value:
do { \
if (am->trace_sessions) { \
CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2) \
- sizeof(acl_elog_val3)]; } *static_check); \
u16 thread_index = os_get_thread_index (); \
vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \
{ \
.format = "(%02d) " acl_elog_trace_format_label, \
.format_args = "i2" acl_elog_trace_format_args, \
}; \
CLIB_PACKED(struct \
{ \
typeof(acl_elog_val1) val1; \
typeof(acl_elog_val2) val2; \
typeof(acl_elog_val3) val3; \
}) *ed; \
ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \
ed->thread = thread_index; \
ed->val1 = acl_elog_val1; \
ed->val2 = acl_elog_val2; \
ed->val3 = acl_elog_val3; \
} \
} while (0)
vlib_main_t vlib_global_main
Definition: main.c:1642
#define CLIB_UNUSED(x)
Definition: clib.h:79
pthread_t thread[MAX_CONNS]
Definition: main.c:125
vlib_worker_thread_t * vlib_worker_threads
Definition: threads.c:35
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:475
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
static_always_inline uword os_get_thread_index(void)
Definition: os.h:62
static void elog_track(elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
Log a single-datum event to a specific track, non-inline version.
Definition: elog.h:395
#define CLIB_PACKED(x)
Definition: clib.h:78

Definition at line 241 of file fa_node.h.

#define elog_acl_maybe_trace_X4 (   am,
  acl_elog_trace_format_label,
  acl_elog_trace_format_args,
  acl_elog_val1,
  acl_elog_val2,
  acl_elog_val3,
  acl_elog_val4 
)
Value:
do { \
if (am->trace_sessions) { \
CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2) \
- sizeof(acl_elog_val3) -sizeof(acl_elog_val4)]; } *static_check); \
u16 thread_index = os_get_thread_index (); \
vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \
{ \
.format = "(%02d) " acl_elog_trace_format_label, \
.format_args = "i2" acl_elog_trace_format_args, \
}; \
CLIB_PACKED(struct \
{ \
typeof(acl_elog_val1) val1; \
typeof(acl_elog_val2) val2; \
typeof(acl_elog_val3) val3; \
typeof(acl_elog_val4) val4; \
}) *ed; \
ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \
ed->thread = thread_index; \
ed->val1 = acl_elog_val1; \
ed->val2 = acl_elog_val2; \
ed->val3 = acl_elog_val3; \
ed->val4 = acl_elog_val4; \
} \
} while (0)
vlib_main_t vlib_global_main
Definition: main.c:1642
#define CLIB_UNUSED(x)
Definition: clib.h:79
pthread_t thread[MAX_CONNS]
Definition: main.c:125
vlib_worker_thread_t * vlib_worker_threads
Definition: threads.c:35
#define ELOG_TYPE_DECLARE(f)
Definition: elog.h:439
#define ELOG_TRACK_DATA(em, f, track)
Definition: elog.h:475
unsigned short u16
Definition: types.h:57
unsigned char u8
Definition: types.h:56
static_always_inline uword os_get_thread_index(void)
Definition: os.h:62
static void elog_track(elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
Log a single-datum event to a specific track, non-inline version.
Definition: elog.h:395
#define CLIB_PACKED(x)
Definition: clib.h:78

Definition at line 272 of file fa_node.h.

#define FA_POLICY_EPOCH_IS_INPUT   0x8000

Definition at line 81 of file fa_node.h.

#define FA_POLICY_EPOCH_MASK   0x7fff

Definition at line 79 of file fa_node.h.

#define TCP_FLAG_ACK   0x10

Definition at line 13 of file fa_node.h.

#define TCP_FLAG_CWR   0x80

Definition at line 16 of file fa_node.h.

#define TCP_FLAG_ECE   0x40

Definition at line 15 of file fa_node.h.

#define TCP_FLAG_FIN   0x01

Definition at line 9 of file fa_node.h.

#define TCP_FLAG_PUSH   0x08

Definition at line 12 of file fa_node.h.

#define TCP_FLAG_RST   0x04

Definition at line 11 of file fa_node.h.

#define TCP_FLAG_SYN   0x02

Definition at line 10 of file fa_node.h.

#define TCP_FLAG_URG   0x20

Definition at line 14 of file fa_node.h.

#define TCP_FLAGS_ACKSYN   (TCP_FLAG_SYN + TCP_FLAG_ACK)

Definition at line 18 of file fa_node.h.

#define TCP_FLAGS_RSTFINACKSYN   (TCP_FLAG_RST + TCP_FLAG_FIN + TCP_FLAG_SYN + TCP_FLAG_ACK)

Definition at line 17 of file fa_node.h.

Enumeration Type Documentation

anonymous enum
Enumerator
ACL_FA_CLEANER_RESCHEDULE 
ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX 

Definition at line 174 of file fa_node.h.

Enumerator
ACL_FA_ERROR_DROP 
ACL_FA_N_NEXT 

Definition at line 168 of file fa_node.h.

Function Documentation

void acl_fa_enable_disable ( u32  sw_if_index,
int  is_input,
int  enable_disable 
)

Definition at line 1367 of file fa_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CT_ASSERT_EQUAL ( fa_l3_key_size_is_40  ,
offsetof(fa_5tuple_t, pkt)  ,
offsetof(clib_bihash_kv_40_8_t, value)   
)
CT_ASSERT_EQUAL ( fa_l4_key_t_is_8  ,
sizeof(fa_session_l4_key_t ,
sizeof(u64  
)
CT_ASSERT_EQUAL ( fa_packet_info_t_is_8  ,
sizeof(fa_packet_info_t ,
sizeof(u64  
)
CT_ASSERT_EQUAL ( fa_l3_kv_size_is_48  ,
sizeof(fa_5tuple_t ,
sizeof(clib_bihash_kv_40_8_t  
)
CT_ASSERT_EQUAL ( fa_session_t_size_is_128  ,
sizeof(fa_session_t ,
128   
)
CT_ASSERT_EQUAL ( fa_full_session_id_size_is_64  ,
sizeof(fa_full_session_id_t ,
sizeof(u64  
)
u8* format_acl_plugin_5tuple ( u8 s,
va_list *  args 
)

Definition at line 98 of file fa_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void show_fa_sessions_hash ( vlib_main_t vm,
u32  verbose 
)

Definition at line 1422 of file fa_node.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

enum { ... } acl_fa_cleaner_process_event_e