struct rte_mempool *timer_key_mempool;
static int timer_objs_mempool_count;
static int timer_ring_alloc_cnt;
+static uint32_t timer_dyn_timeout = 30;
uint64_t cgnapt_timeout;
uint32_t timer_lcore;
{
uint32_t dequeue_loop_cnt_present = 0;
uint32_t n_flows_present = 0;
+ uint32_t timer_dyn_timeout_present = 0;
struct pipeline_timer *p_timer = (struct pipeline_timer *)p;
uint32_t i;
continue;
}
+ if (strcmp(arg_name, "timer_dyn_timeout") == 0) {
+ if (timer_dyn_timeout_present)
+ return -1;
+ timer_dyn_timeout_present = 1;
+
+ timer_dyn_timeout = atoi(arg_value);
+ printf("cgnapt dyn timeout: %d\n", timer_dyn_timeout);
+ continue;
+ }
+
if (strcmp(arg_name, "n_flows") == 0) {
if(n_flows_present)
return -1;
return NULL;
p_timer->dequeue_loop_cnt = 100;
- cgnapt_timeout = rte_get_tsc_hz() * CGNAPT_DYN_TIMEOUT;
- printf("cgnapt_timerout%" PRIu64 "", cgnapt_timeout);
timer_lcore = rte_lcore_id();
if (pipeline_cgnapt_parse_args(p_timer, params))
return NULL;
+ cgnapt_timeout = rte_get_tsc_hz() * timer_dyn_timeout;
+ printf("cgnapt_timerout%" PRIu64 "\n", cgnapt_timeout);
+
/* Create port alloc buffer */
timer_mempool = rte_mempool_create("timer_mempool",