16 #include <netinet/in.h> 50 [ICMP4_echo_reply] = ICMP4_echo_request + 1,
51 [ICMP4_timestamp_reply] = ICMP4_timestamp_request + 1,
52 [ICMP4_information_reply] = ICMP4_information_request + 1,
53 [ICMP4_address_mask_reply] = ICMP4_address_mask_request + 1
58 [ICMP4_echo_request] = 1,
59 [ICMP4_timestamp_request] = 1,
60 [ICMP4_information_request] = 1,
61 [ICMP4_address_mask_request] = 1
66 [ICMP6_echo_reply - 128] = ICMP6_echo_request + 1,
67 [ICMP6_node_information_response - 128] = ICMP6_node_information_request + 1
72 [ICMP6_echo_request - 128] = 1,
73 [ICMP6_node_information_request - 128] = 1
84 return format(s,
"lc_index %d (lsb16 of sw_if_index %d) l3 %s%s %U -> %U" 85 " l4 proto %d l4_valid %d port %d -> %d tcp flags (%s) %02x rsvd %x",
113 "acl-plugin: lc_index: %d, sw_if_index %d, next index %d, action: %d, match: acl %d rule %d trace_bits %08x\n" 114 " pkt info %016llx %016llx %016llx %016llx %016llx %016llx",
126 #define foreach_acl_fa_error \ 127 _(ACL_DROP, "ACL deny packets") \ 128 _(ACL_PERMIT, "ACL permit packets") \ 129 _(ACL_NEW_SESSION, "new sessions added") \ 130 _(ACL_EXIST_SESSION, "existing session packets") \ 131 _(ACL_CHECK, "checked packets") \ 132 _(ACL_RESTART_SESSION_TIMER, "restart session timer") \ 133 _(ACL_TOO_MANY_SESSIONS, "too many sessions to add new") \ 138 #define _(sym,str) ACL_FA_ERROR_##sym, 145 #define _(sym,string) string, 177 int src_index = is_input ? 0 : 1;
178 int dst_index = is_input ? 1 : 0;
179 u32 valid_new_sess = 1;
180 p5tuple_sess->
addr[src_index] = p5tuple_pkt->
addr[0];
181 p5tuple_sess->
addr[dst_index] = p5tuple_pkt->
addr[1];
186 p5tuple_sess->
l4.
port[src_index] = p5tuple_pkt->
l4.
port[0];
187 p5tuple_sess->
l4.
port[dst_index] = p5tuple_pkt->
l4.
port[1];
194 sizeof(icmp6_invmap) };
196 sizeof(icmp6_valid_new) };
197 int type = is_ip6 ? p5tuple_pkt->
l4.
port[0]-128: p5tuple_pkt->
l4.
port[0];
212 type <= icmp_invmap_size[is_ip6] &&
213 icmp_invmap[is_ip6][type])
215 p5tuple_sess->
l4.
port[0] = icmp_invmap[is_ip6][type] - 1;
225 type > icmp_valid_new_size[is_ip6] ||
226 !icmp_valid_new[is_ip6][type])
232 return valid_new_sess;
269 for(timeout_type = 0; timeout_type <
ACL_N_TIMEOUTS; timeout_type++) {
325 "ACL plugin FA session bihash",
368 #ifdef FA_NODE_VERBOSE_DEBUG 385 #ifdef FA_NODE_VERBOSE_DEBUG 386 clib_warning(
"thread id in key %d != curr thread index, not deleting");
469 return (curr_sess_count < am->fa_conn_table_max_entries);
509 int total_expired = 0;
534 u64 sess_timeout_time =
538 #ifdef FA_NODE_VERBOSE_DEBUG 539 clib_warning (
"ACL_FA_NODE_CLEAN: Restarting timer for session %d, sw_if_index %d",
550 #ifdef FA_NODE_VERBOSE_DEBUG 551 clib_warning (
"ACL_FA_NODE_CLEAN: Deleting session %d, sw_if_index %d",
572 return (total_expired);
615 memcpy (sess, pkv,
sizeof (pkv->
key));
642 return (clib_bihash_search_40_8 (&am->
fa_sessions_hash, &p5tuple->
kv, pvalue_sess) == 0);
649 int is_input,
int is_l2_path,
u32 * l2_feat_next_node_index,
652 u32 n_left_from, *from, *to_next;
654 u32 pkts_acl_checked = 0;
655 u32 pkts_new_session = 0;
656 u32 pkts_exist_session = 0;
657 u32 pkts_acl_permit = 0;
658 u32 pkts_restart_session_timer = 0;
659 u32 trace_bitmap = 0;
674 while (n_left_from > 0)
680 while (n_left_from > 0 && n_left_to_next > 0)
688 int acl_check_needed = 1;
689 u32 match_acl_in_index = ~0;
690 u32 match_acl_pos = ~0;
691 u32 match_rule_index = ~0;
729 #ifdef FA_NODE_VERBOSE_DEBUG 731 (
"ACL_FA_NODE_DBG: session 5-tuple %016llx %016llx %016llx %016llx %016llx %016llx",
735 (
"ACL_FA_NODE_DBG: packet 5-tuple %016llx %016llx %016llx %016llx %016llx %016llx",
745 (am, sw_if_index0, &kv_sess, &value_sess))
747 trace_bitmap |= 0x80000000;
748 error0 = ACL_FA_ERROR_ACL_EXIST_SESSION;
755 int old_timeout_type =
762 int new_timeout_type =
764 acl_check_needed = 0;
765 pkts_exist_session += 1;
770 pkts_restart_session_timer++;
772 0x00010000 + ((0xff & old_timeout_type) << 8) +
773 (0xff & new_timeout_type);
785 clib_warning(
"BUG: session LSB16(sw_if_index) and 5-tuple collision!");
786 acl_check_needed = 0;
800 acl_check_needed = 1;
801 trace_bitmap |= 0x40000000;
807 if (acl_check_needed)
811 is_ip6, &action, &match_acl_pos, &match_acl_in_index,
812 &match_rule_index, &trace_bitmap);
815 pkts_acl_permit += 1;
826 now, &kv_sess, current_policy_epoch);
829 pkts_new_session += 1;
836 pkts_acl_permit += 1;
842 error0 = ACL_FA_ERROR_ACL_TOO_MANY_SESSIONS;
856 #ifdef FA_NODE_VERBOSE_DEBUG 857 clib_warning(
"ACL_FA_NODE_DBG: sw_if_index %d lc_index %d action %d acl_index %d rule_index %d", sw_if_index0, lc_index0, action, match_acl_in_index, match_rule_index);
861 && (b0->
flags & VLIB_BUFFER_IS_TRACED)))
883 pkts_acl_checked += 1;
887 to_next, n_left_to_next, bi0,
895 ACL_FA_ERROR_ACL_CHECK, pkts_acl_checked);
897 ACL_FA_ERROR_ACL_PERMIT, pkts_acl_permit);
899 ACL_FA_ERROR_ACL_NEW_SESSION,
902 ACL_FA_ERROR_ACL_EXIST_SESSION,
905 ACL_FA_ERROR_ACL_RESTART_SESSION_TIMER,
906 pkts_restart_session_timer);
999 #define foreach_acl_fa_cleaner_error \ 1000 _(UNKNOWN_EVENT, "unknown event received") \ 1005 #define _(sym,str) ACL_FA_CLEANER_ERROR_##sym, 1012 #define _(sym,string) string, 1053 elog_acl_maybe_trace_X1(am,
"acl_fa_worker_conn_cleaner: now %lu, someone tried to call clear but one of the bitmaps are empty",
"i8", now);
1056 #ifdef FA_NODE_VERBOSE_DEBUG 1057 clib_warning(
"WORKER-CLEAR: (before and) swiping sw-if-index bitmap: %U, my serviced bitmap %U",
1070 #ifdef FA_NODE_VERBOSE_DEBUG 1071 clib_warning(
"WORKER-CLEAR: swiping sw-if-index bitmap: %U, my serviced bitmap %U",
1085 if (0 == num_expired) {
1091 elog_acl_maybe_trace_X1(am,
"acl_fa_worker_conn_cleaner: now %lu, more work to do - requesting interrupt",
"i8", now);
1100 }
else if (num_expired <= am->fa_min_deleted_sessions_per_interval) {
1135 for (i = 0; i < n_threads; i++) {
1150 u64 max_timer_wait_interval = cpu_cps / 2;
1151 uword event_type, *event_data = 0;
1161 int has_pending_conns = 0;
1181 elog_acl_maybe_trace_X3(am,
"acl_fa_session_cleaner_process: now %lu, worker: %d tt: %d",
"i8i2i2", now, ti, tt);
1182 elog_acl_maybe_trace_X2(am,
"acl_fa_session_cleaner_process: head expiry: %lu, is earlier than curr next expire: %lu",
"i8i8", head_expiry, next_expire);
1183 next_expire = head_expiry;
1186 has_pending_conns = 1;
1194 am->fa_cleaner_cnt_wait_without_timeout++;
1201 f64 timeout = ((
i64) next_expire - (
i64) now) / cpu_cps;
1209 am->fa_cleaner_cnt_wait_with_timeout++;
1210 elog_acl_maybe_trace_X2(am,
"acl_conn_cleaner: now %lu entering wait with timeout %.6f sec",
"i8f8", now, timeout);
1226 uword *clear_sw_if_index_bitmap = 0;
1227 uword *sw_if_index0;
1230 elog_acl_maybe_trace_X1(am,
"acl_fa_session_cleaner_process: now %lu, received ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX",
"i8", now);
1233 am->fa_cleaner_cnt_delete_by_sw_index++;
1234 elog_acl_maybe_trace_X1(am,
"acl_fa_session_cleaner_process: ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX %d",
"i4", *sw_if_index0);
1235 if (*sw_if_index0 == ~0)
1243 clear_sw_if_index_bitmap =
clib_bitmap_set(clear_sw_if_index_bitmap, *sw_if_index0, 1);
1247 #ifdef FA_NODE_VERBOSE_DEBUG 1261 clib_warning(
"ERROR-BUG! Could not initiate cleaning on worker because another cleanup in progress");
1279 #ifdef FA_NODE_VERBOSE_DEBUG 1293 #ifdef FA_NODE_VERBOSE_DEBUG 1300 #ifdef FA_NODE_VERBOSE_DEBUG 1301 clib_warning (
"ACL plugin connection cleaner: unknown event %u",
1307 ACL_FA_CLEANER_ERROR_UNKNOWN_EVENT, 1);
1308 am->fa_cleaner_cnt_unknown_event++;
1315 _vec_len (event_data) = 0;
1321 int need_more_wait = 0;
1322 int max_wait_cycles = 100;
1330 if (need_more_wait) {
1333 }
while (need_more_wait && (--max_wait_cycles > 0));
1335 int interrupts_needed = 0;
1336 int interrupts_unwanted = 0;
1340 interrupts_needed++;
1344 interrupts_unwanted++;
1348 if (interrupts_needed) {
1353 }
else if (interrupts_unwanted) {
1358 am->fa_cleaner_cnt_event_cycles++;
1370 if (enable_disable) {
1386 sw_if_index, enable_disable, 0, 0);
1388 sw_if_index, enable_disable, 0, 0);
1399 sw_if_index, enable_disable, 0, 0);
1401 sw_if_index, enable_disable, 0, 0);
1410 #ifdef FA_NODE_VERBOSE_DEBUG 1411 clib_warning(
"ENABLE-DISABLE: clean the connections on interface %d", sw_if_index);
1429 vlib_cli_output(vm,
"\nSession lookup hash table is not allocated.\n\n");
1438 .name =
"acl-plugin-fa-worker-cleaner-process",
1440 .state = VLIB_NODE_STATE_INTERRUPT,
1446 .name =
"acl-plugin-fa-cleaner-process",
1457 .name =
"acl-plugin-in-ip6-l2",
1458 .vector_size =
sizeof (
u32),
1473 .name =
"acl-plugin-in-ip4-l2",
1474 .vector_size =
sizeof (
u32),
1489 .name =
"acl-plugin-out-ip6-l2",
1490 .vector_size =
sizeof (
u32),
1505 .name =
"acl-plugin-out-ip4-l2",
1506 .vector_size =
sizeof (
u32),
1522 .name =
"acl-plugin-in-ip6-fa",
1523 .vector_size =
sizeof (
u32),
1537 .arc_name =
"ip6-unicast",
1538 .node_name =
"acl-plugin-in-ip6-fa",
1545 .name =
"acl-plugin-in-ip4-fa",
1546 .vector_size =
sizeof (
u32),
1560 .arc_name =
"ip4-unicast",
1561 .node_name =
"acl-plugin-in-ip4-fa",
1569 .name =
"acl-plugin-out-ip6-fa",
1570 .vector_size =
sizeof (
u32),
1584 .arc_name =
"ip6-output",
1585 .node_name =
"acl-plugin-out-ip6-fa",
1592 .name =
"acl-plugin-out-ip4-fa",
1593 .vector_size =
sizeof (
u32),
1608 .arc_name =
"ip4-output",
1609 .node_name =
"acl-plugin-out-ip4-fa",
static uword acl_in_ip4_l2_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static int acl_fa_restart_timer_for_session(acl_main_t *am, u64 now, fa_full_session_id_t sess_id)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
u32 * input_policy_epoch_by_sw_if_index
static int acl_fa_ifc_has_in_acl(acl_main_t *am, int sw_if_index0)
u32 fa_cleaner_node_index
static void acl_fa_conn_list_add_session(acl_main_t *am, fa_full_session_id_t sess_id, u64 now)
u32 session_timeout_sec[ACL_N_TIMEOUTS]
static u8 * format_bitmap_hex(u8 *s, va_list *args)
Format a bitmap as a string of hex bytes.
u32 fa_acl_in_ip4_l2_node_feat_next_node_index[32]
static int acl_fa_can_add_session(acl_main_t *am, int is_input, u32 sw_if_index)
static int is_valid_session_ptr(acl_main_t *am, u16 thread_index, fa_session_t *sess)
static char * acl_fa_cleaner_error_strings[]
void show_fa_sessions_hash(vlib_main_t *vm, u32 verbose)
uword * fa_out_acl_on_sw_if_index
uword * pending_clear_sw_if_index_bitmap
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
u64 fa_current_cleaner_timer_wait_interval
static uword * vlib_process_wait_for_event(vlib_main_t *vm)
union fa_session_t::@348 tcp_flags_seen
vnet_interface_main_t interface_main
uword * fa_in_acl_on_sw_if_index
static uword acl_fa_worker_conn_cleaner_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
vlib_node_registration_t acl_out_fa_ip6_node
(constructor) VLIB_REGISTER_NODE (acl_out_fa_ip6_node)
static void vlib_node_set_interrupt_pending(vlib_main_t *vm, u32 node_index)
static void send_interrupts_to_workers(vlib_main_t *vm, acl_main_t *am)
static void acl_fa_verify_init_sessions(acl_main_t *am)
vlib_node_registration_t acl_out_l2_ip4_node
(constructor) VLIB_REGISTER_NODE (acl_out_l2_ip4_node)
#define TCP_FLAGS_RSTFINACKSYN
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static u64 clib_cpu_time_now(void)
static int acl_fa_find_session(acl_main_t *am, u32 sw_if_index0, fa_5tuple_t *p5tuple, clib_bihash_kv_40_8_t *pvalue_sess)
static uword acl_out_ip4_fa_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap. ...
fa_session_t * fa_sessions_pool
u32 * output_policy_epoch_by_sw_if_index
#define foreach_acl_fa_error
static void acl_fa_try_recycle_session(acl_main_t *am, int is_input, u16 thread_index, u32 sw_if_index)
vlib_error_t * errors
Vector of errors for this node.
vlib_main_t ** vlib_mains
static u8 * format_acl_fa_trace(u8 *s, va_list *args)
static const u8 icmp4_invmap[]
#define pool_len(p)
Number of elements in pool vector.
static u32 vnet_l2_feature_next(vlib_buffer_t *b, u32 *next_nodes, u32 feat_bit)
Return the graph node index for the feature corresponding to the next set bit after clearing the curr...
static uword acl_fa_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ip6, int is_input, int is_l2_path, u32 *l2_feat_next_node_index, vlib_node_registration_t *acl_fa_node)
#define clib_bitmap_zero(v)
Clear a bitmap.
#define clib_bitmap_dup(v)
Duplicate a bitmap.
u32 fa_acl_out_ip4_l2_node_feat_next_node_index[32]
f64 fa_cleaner_wait_time_increment
static uword vlib_process_suspend(vlib_main_t *vm, f64 dt)
Suspend a vlib cooperative multi-tasking thread for a period of time.
static int acl_fa_check_idle_sessions(acl_main_t *am, u16 thread_index, u64 now)
uword fa_conn_table_hash_memory_size
#define clib_smp_atomic_add(addr, increment)
vlib_node_registration_t acl_in_fa_ip6_node
(constructor) VLIB_REGISTER_NODE (acl_in_fa_ip6_node)
int clib_bihash_add_del(clib_bihash *h, clib_bihash_kv *add_v, int is_add)
Add or delete a (key,value) pair from a bi-hash table.
static fa_session_t * acl_fa_add_session(acl_main_t *am, int is_input, u32 sw_if_index, u64 now, fa_5tuple_t *p5tuple, u16 current_policy_epoch)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
u64 fa_conn_table_max_entries
static uword clib_bitmap_is_zero(uword *ai)
predicate function; is an entire bitmap empty?
static u32 acl_make_5tuple_session_key(acl_main_t *am, int is_input, int is_ip6, u32 sw_if_index, fa_5tuple_t *p5tuple_pkt, fa_5tuple_t *p5tuple_sess)
u64 cnt_session_timer_restarted
#define foreach_acl_fa_cleaner_error
static uword acl_in_ip6_l2_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static int acl_fa_conn_list_delete_session(acl_main_t *am, fa_full_session_id_t sess_id)
static fa_session_t * get_session_ptr(acl_main_t *am, u16 thread_index, u32 session_index)
static const u8 icmp6_invmap[]
clib_bihash_40_8_t fa_sessions_hash
u32 fa_acl_out_ip6_l2_node_feat_next_node_index[32]
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static uword acl_out_ip6_fa_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static const u8 icmp6_valid_new[]
static u64 fa_session_get_list_timeout(acl_main_t *am, fa_session_t *sess)
static uword acl_out_ip6_l2_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
u64 * fa_session_epoch_change_by_sw_if_index
u32 * output_lc_index_by_sw_if_index
static int fa_session_get_timeout_type(acl_main_t *am, fa_session_t *sess)
static int acl_fa_ifc_has_out_acl(acl_main_t *am, int sw_if_index0)
static_always_inline void vnet_feature_next(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
int interrupt_is_unwanted
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
u32 fa_total_enabled_count
void clib_bihash_init(clib_bihash *h, char *name, u32 nbuckets, uword memory_size)
initialize a bounded index extensible hash table
u64 * fa_session_adds_by_sw_if_index
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define FA_POLICY_EPOCH_IS_INPUT
u64 * fa_session_dels_by_sw_if_index
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
static uword acl_in_ip6_fa_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define VLIB_REGISTER_NODE(x,...)
u64 fa_session_total_adds
#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)
u8 * format_acl_plugin_5tuple(u8 *s, va_list *args)
static void * clib_mem_set_heap(void *heap)
static int acl_fa_conn_time_to_check(acl_main_t *am, acl_fa_per_worker_data_t *pw, u64 now, u16 thread_index, u32 session_index)
#define clib_warning(format, args...)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
void acl_fa_enable_disable(u32 sw_if_index, int is_input, int enable_disable)
static const u8 icmp4_valid_new[]
static vlib_node_registration_t acl_fa_session_cleaner_process_node
(constructor) VLIB_REGISTER_NODE (acl_fa_session_cleaner_process_node)
#define pool_init_fixed(pool, max_elts)
initialize a fixed-size, preallocated pool
VNET_FEATURE_INIT(acl_in_ip6_fa_feature, static)
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
#define pool_put_index(p, i)
Free pool element with given index.
static uword acl_out_ip4_l2_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static u64 fa_session_get_timeout(acl_main_t *am, fa_session_t *sess)
static u64 acl_fa_get_list_head_expiry_time(acl_main_t *am, acl_fa_per_worker_data_t *pw, u64 now, u16 thread_index, int timeout_type)
static int acl_fa_ifc_has_sessions(acl_main_t *am, int sw_if_index0)
static u8 acl_fa_track_session(acl_main_t *am, int is_input, u32 sw_if_index, u64 now, fa_session_t *sess, fa_5tuple_t *pkt_5tuple)
static uword acl_in_ip4_fa_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static int acl_plugin_match_5tuple_inline(u32 lc_index, fa_5tuple_opaque_t *pkt_5tuple, int is_ip6, u8 *r_action, u32 *r_acl_pos_p, u32 *r_acl_match_p, u32 *r_rule_match_p, u32 *trace_bitmap)
static uword acl_fa_session_cleaner_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
#define clib_bitmap_free(v)
Free a bitmap.
vlib_node_registration_t acl_in_l2_ip4_node
(constructor) VLIB_REGISTER_NODE (acl_in_l2_ip4_node)
uword * serviced_sw_if_index_bitmap
vlib_node_registration_t acl_in_l2_ip6_node
(constructor) VLIB_REGISTER_NODE (acl_in_l2_ip6_node)
#define VNET_FEATURES(...)
#define elog_acl_maybe_trace_X1(am, acl_elog_trace_format_label, acl_elog_trace_format_args, acl_elog_val1)
u32 fa_acl_in_ip6_l2_node_feat_next_node_index[32]
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define vec_elt(v, i)
Get vector value at index i.
struct _vlib_node_registration vlib_node_registration_t
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
acl_fa_per_worker_data_t * per_worker_data
vnet_sw_interface_t * sw_interfaces
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
int fa_interrupt_generation
u64 cnt_already_deleted_sessions
static_always_inline uword os_get_thread_index(void)
#define elog_acl_maybe_trace_X2(am, acl_elog_trace_format_label, acl_elog_trace_format_args,acl_elog_val1, acl_elog_val2)
u64 fa_max_deleted_sessions_per_interval
vlib_node_registration_t acl_out_l2_ip6_node
(constructor) VLIB_REGISTER_NODE (acl_out_l2_ip6_node)
static char * acl_fa_error_strings[]
vlib_node_registration_t acl_out_fa_ip4_node
(constructor) VLIB_REGISTER_NODE (acl_out_fa_ip4_node)
#define vec_foreach(var, vec)
Vector iterator.
u16 flags
Copy of main node flags.
#define CLIB_MEMORY_BARRIER()
u32 * input_lc_index_by_sw_if_index
#define VLIB_NODE_FLAG_TRACE
#define CLIB_CACHE_LINE_BYTES
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static u8 * format_fa_5tuple(u8 *s, va_list *args)
static u64 fa_session_get_shortest_timeout(acl_main_t *am)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int fa_sessions_hash_is_initialized
static vlib_node_registration_t acl_fa_worker_session_cleaner_process_node
(constructor) VLIB_REGISTER_NODE (acl_fa_worker_session_cleaner_process_node)
static uword * clib_bitmap_and(uword *ai, uword *bi)
Logical operator across two bitmaps.
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
static void send_one_worker_interrupt(vlib_main_t *vm, acl_main_t *am, int thread_index)
static void acl_plugin_fill_5tuple_inline(u32 lc_index, vlib_buffer_t *b0, int is_ip6, int is_input, int is_l2_path, fa_5tuple_opaque_t *p5tuple_pkt)
vlib_node_registration_t acl_in_fa_ip4_node
(constructor) VLIB_REGISTER_NODE (acl_in_fa_ip4_node)
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
u32 fa_conn_table_hash_num_buckets
u64 fa_session_total_dels
static void acl_fa_delete_session(acl_main_t *am, u32 sw_if_index, fa_full_session_id_t sess_id)
foreach_fa_cleaner_counter vlib_main_t * vlib_main