Advertisement

Suricata6.0 流表管理 原码注释 流的老化 2

阅读量:

流老化入口函数 FlowManger 执行 FlowTimeoutHash 完成流老化处理任务;该函数负责大部分老化流程,并将一个被 aged 的 flow 从 flow_hash 移除至回收队列;随后由被回收线程提取并放置到空闲的全局 flow 内存池中。

1. FlowTimeoutHash 函数

FlowManager-》FlowTimeoutHash

函数有两个参数hash_min和hash_max用于标识flow bucket的范围值。将老化的flow移至td->aside_queue队列中;然后将来自aside_queue队列的流移至flow_recycle_q;如此策略,则必定失败。

复制代码
 /** *  \brief time out flows from the hash
    
  * *  \param ts timestamp
    
  *  \param hash_min min hash index to consider
    
  *  \param hash_max max hash index to consider
    
  *  \param counters ptr to FlowTimeoutCounters structure
    
  * *  \retval cnt number of timed out

全部评论 (0)

还没有任何评论哟~