47 #define CNAT_DB_SCANNER_TURN_ON 5 138 u32 nsessions, session_index_head, session_index;
147 *dirty_index = db_index;
148 timeout_dirty =
TRUE;
163 }
while(session_index != session_index_head
184 static int dirty_index = -1;
185 u16 instance __attribute__((unused));
250 dirty_index = db_index;
271 dirty_index = db_index;
331 static u32 base_index = 0, free_bitmap_index = 0;
332 int bits_scanned = 0,
i;
357 inuse_bitmap = ~(h->
free_bitmap[free_bitmap_index]);
359 while (inuse_bitmap) {
364 inuse_bitmap &= ~((
uword) 1 << i);
386 free_bitmap_index = 0;
389 free_bitmap_index ++;
423 static u8 timeout_count = 0;
426 uword * event_data = 0;
448 if (timeout_count < 100) {
471 .name =
"cnat-db-scanner",
472 .process_log2_n_stack_bytes = 18,
#define MAX_DB_ENTRY_SELECTED_PER_SCAN
static void check_session_for_expiry(cnat_session_entry_t *sdb, u8 timeout_dirty)
cnat_main_db_entry_t * cnat_main_db
u16 query_and_update_db_timeout(void *db, u8 db_type)
sll srl srl sll sra u16x4 i
static void cnat_db_scanner(void)
always_inline uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
u32 out2in_forwarding_count
static u8 handle_db_scan_for_sessions(cnat_main_db_entry_t *db, int *dirty_index, uword db_index)
union cnat_main_db_entry_t::@164 alg
#define NAT44_RESERVED_INST_ID
void cnat_scanner_db_process_turn_on(vlib_main_t *vm)
cnat_session_entry_t * cnat_session_db
static uword cnat_db_scanner_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
always_inline void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
#define CNAT_DB_FLAG_STATIC_PORT
always_inline uword vlib_process_suspend(vlib_main_t *vm, f64 dt)
vlib_node_registration_t cnat_db_scanner_node
(constructor) VLIB_REGISTER_NODE (cnat_db_scanner_node)
void handle_pending_nfv9_pkts()
u16 udp_init_session_timeout
u32 translation_delete_rate
void cnat_delete_session_db_entry(cnat_session_entry_t *ep, u8 log)
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
clib_error_t * cnat_db_scanner_init(vlib_main_t *vm)
uword check_these_pool_indices[2 *MAX_DB_ENTRY_SELECTED_PER_SCAN]
#define CNAT_DB_FLAG_ALG_ENTRY
static void walk_the_db(void)
u32 in2out_forwarding_rate
always_inline f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
struct cnat_main_db_entry_t::@165::seq_pcp_t seq_pcp
u32 out2in_forwarding_rate
#define CNAT_DB_SCANNER_TURN_ON
#define SESSION_LOG_ENABLE
#define CNAT_DB_DSLITE_FLAG
#define CNAT_DB_FLAG_TCP_ACTIVE
u16 tcp_initial_setup_timeout
#define MAX_DB_ENTRY_PER_SCAN
u32 translation_create_rate
u32 nat44_active_translations
cnat_pptp_config_t pptp_cfg
always_inline pool_header_t * pool_header(void *v)
void cnat_delete_main_db_entry_v2(cnat_main_db_entry_t *ep)
cnat_vrfmap_t * cnat_map_by_vrf
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define NUM_BITS_IN_UWORD
u16 udp_act_session_timeout
Linear Congruential Random Number Generator.
u32 in2out_forwarding_count
u32 translation_create_count
#define VLIB_REGISTER_NODE(x,...)
u32 translation_delete_count
cnat_db_scanner_main_t cnat_db_scanner_main
always_inline f64 vlib_time_now(vlib_main_t *vm)
#define CNAT_DB_FLAG_UDP_ACTIVE
union cnat_main_db_entry_t::@165 proto_data
static void cnat_session_log_nat44_mapping_delete(cnat_main_db_entry_t *db, cnat_session_entry_t *sdb, cnat_vrfmap_t *vrfmap)