Squashed commit of the following:
commit
0f8c59bf66e5fb22a20a884d86a069deaf79f715
Author: Masud Hasan <mashasan@cisco.com>
Date: Mon Apr 15 22:08:16 2019 -0400
flow_cache: Pruning one stream when excess pruning skips even if max_sessions is reached
if ( ignore_offloads > 0 )
--ignore_offloads;
}
+
+ if (!pruned and hash_table->get_count() > max_cap)
+ {
+ prune_one(PruneReason::EXCESS, true);
+ ++pruned;
+ }
+
return pruned;
}
if ( hash_table->get_count() <= 1 )
return false;
+ // ZHash returns in LRU order, which is updated per packet via find --> move_to_front call
auto flow = static_cast<Flow*>(hash_table->first());
assert(flow);