12 #define TCP_FLAG_FIN 0x01 13 #define TCP_FLAG_SYN 0x02 14 #define TCP_FLAG_RST 0x04 15 #define TCP_FLAG_PUSH 0x08 16 #define TCP_FLAG_ACK 0x10 17 #define TCP_FLAG_URG 0x20 18 #define TCP_FLAG_ECE 0x40 19 #define TCP_FLAG_CWR 0x80 20 #define TCP_FLAGS_RSTFINACKSYN (TCP_FLAG_RST + TCP_FLAG_FIN + TCP_FLAG_SYN + TCP_FLAG_ACK) 21 #define TCP_FLAGS_ACKSYN (TCP_FLAG_SYN + TCP_FLAG_ACK) 23 #define ACL_FA_CONN_TABLE_DEFAULT_HASH_NUM_BUCKETS (64 * 1024) 24 #define ACL_FA_CONN_TABLE_DEFAULT_HASH_MEMORY_SIZE (1ULL<<30) 25 #define ACL_FA_CONN_TABLE_DEFAULT_MAX_ENTRIES 500000 87 u64 padding_for_kv_16_8[3];
99 return (
format (s,
"l4 lsb_of_sw_if_index %d proto %d l4_is_input %d l4_slow_path %d l4_flags 0x%02x port %d -> %d",
101 l4->
proto, is_input, is_slowpath,
124 #define FA_POLICY_EPOCH_MASK 0x7fff 126 #define FA_POLICY_EPOCH_IS_INPUT 0x8000 147 #define CT_ASSERT_EQUAL(name, x,y) typedef int assert_ ## name ## _compile_time_assertion_failed[((x) == (y))-1] 164 #undef CT_ASSERT_EQUAL 166 #define FA_SESSION_BOGUS_INDEX ~0 258 #define elog_acl_maybe_trace_X1(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1) \ 260 if (am->trace_sessions) { \ 261 CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1)]; } *static_check); \ 262 u16 thread_index = os_get_thread_index (); \ 263 vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \ 264 ELOG_TYPE_DECLARE (e) = \ 266 .format = "(%02d) " acl_elog_trace_format_label, \ 267 .format_args = "i2" acl_elog_trace_format_args, \ 272 typeof(acl_elog_val1) val1; \ 274 ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \ 275 ed->thread = thread_index; \ 276 ed->val1 = acl_elog_val1; \ 283 #define elog_acl_maybe_trace_X2(am, acl_elog_trace_format_label, acl_elog_trace_format_args, \ 284 acl_elog_val1, acl_elog_val2) \ 286 if (am->trace_sessions) { \ 287 CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2)]; } *static_check); \ 288 u16 thread_index = os_get_thread_index (); \ 289 vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \ 290 ELOG_TYPE_DECLARE (e) = \ 292 .format = "(%02d) " acl_elog_trace_format_label, \ 293 .format_args = "i2" acl_elog_trace_format_args, \ 298 typeof(acl_elog_val1) val1; \ 299 typeof(acl_elog_val2) val2; \ 301 ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \ 302 ed->thread = thread_index; \ 303 ed->val1 = acl_elog_val1; \ 304 ed->val2 = acl_elog_val2; \ 311 #define elog_acl_maybe_trace_X3(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1, \ 312 acl_elog_val2, acl_elog_val3) \ 314 if (am->trace_sessions) { \ 315 CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2) \ 316 - sizeof(acl_elog_val3)]; } *static_check); \ 317 u16 thread_index = os_get_thread_index (); \ 318 vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \ 319 ELOG_TYPE_DECLARE (e) = \ 321 .format = "(%02d) " acl_elog_trace_format_label, \ 322 .format_args = "i2" acl_elog_trace_format_args, \ 327 typeof(acl_elog_val1) val1; \ 328 typeof(acl_elog_val2) val2; \ 329 typeof(acl_elog_val3) val3; \ 331 ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \ 332 ed->thread = thread_index; \ 333 ed->val1 = acl_elog_val1; \ 334 ed->val2 = acl_elog_val2; \ 335 ed->val3 = acl_elog_val3; \ 342 #define elog_acl_maybe_trace_X4(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1, \ 343 acl_elog_val2, acl_elog_val3, acl_elog_val4) \ 345 if (am->trace_sessions) { \ 346 CLIB_UNUSED(struct { u8 available_space[18 - sizeof(acl_elog_val1) - sizeof(acl_elog_val2) \ 347 - sizeof(acl_elog_val3) -sizeof(acl_elog_val4)]; } *static_check); \ 348 u16 thread_index = os_get_thread_index (); \ 349 vlib_worker_thread_t * w = vlib_worker_threads + thread_index; \ 350 ELOG_TYPE_DECLARE (e) = \ 352 .format = "(%02d) " acl_elog_trace_format_label, \ 353 .format_args = "i2" acl_elog_trace_format_args, \ 358 typeof(acl_elog_val1) val1; \ 359 typeof(acl_elog_val2) val2; \ 360 typeof(acl_elog_val3) val3; \ 361 typeof(acl_elog_val4) val4; \ 363 ed = ELOG_TRACK_DATA (&vlib_global_main.elog_main, e, w->elog_track); \ 364 ed->thread = thread_index; \ 365 ed->val1 = acl_elog_val1; \ 366 ed->val2 = acl_elog_val2; \ 367 ed->val3 = acl_elog_val3; \ 368 ed->val4 = acl_elog_val4; \
uword * pending_clear_sw_if_index_bitmap
u64 * wip_session_change_requests
#define CT_ASSERT_EQUAL(name, x, y)
fa_session_t * fa_sessions_pool
u64 rcvd_session_change_requests
#define static_always_inline
vl_api_interface_index_t sw_if_index
u64 cnt_session_timer_restarted
u64 * fa_session_epoch_change_by_sw_if_index
fa_session_l4_key_l4_flags_t
static_always_inline int is_session_l4_key_u64_slowpath(u64 l4key)
int interrupt_is_unwanted
u64 * fa_conn_list_head_expiry_time
u64 * fa_session_adds_by_sw_if_index
u64 * fa_session_dels_by_sw_if_index
u64 sent_session_change_requests
clib_bihash_kv_40_8_t kv_40_8
void acl_fa_enable_disable(u32 sw_if_index, int is_input, int enable_disable)
static_always_inline u8 * format_fa_session_l4_key(u8 *s, va_list *args)
clib_bihash_kv_16_8_t kv_16_8
uword * serviced_sw_if_index_bitmap
VLIB buffer representation.
u8 * format_acl_plugin_5tuple(u8 *s, va_list *args)
u64 cnt_already_deleted_sessions
clib_spinlock_t pending_session_change_request_lock
void show_fa_sessions_hash(vlib_main_t *vm, u32 verbose)
u64 * pending_session_change_requests
u64 current_time_wait_interval
acl_fa_cleaner_process_event_e