This queue will be used by the FlowManager to pass timed out flows
to another thread that will do the actual cleanup.
/** spare/unused/prealloced flows live here */
FlowQueue flow_spare_q;
+/** queue to pass flows to cleanup/log thread(s) */
+FlowQueue flow_recycle_q;
+
FlowBucket *flow_hash;
FlowConfig flow_config;
SC_ATOMIC_INIT(flow_memuse);
SC_ATOMIC_INIT(flow_prune_idx);
FlowQueueInit(&flow_spare_q);
+ FlowQueueInit(&flow_recycle_q);
unsigned int seed = RandomTimePreseed();
/* set defaults */
}
(void) SC_ATOMIC_SUB(flow_memuse, flow_config.hash_size * sizeof(FlowBucket));
FlowQueueDestroy(&flow_spare_q);
+ FlowQueueDestroy(&flow_recycle_q);
SC_ATOMIC_DESTROY(flow_prune_idx);
SC_ATOMIC_DESTROY(flow_memuse);