]> git.ipfire.org Git - thirdparty/suricata.git/commit
flow: improve 'under stress' behavior
authorVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2020 09:34:00 +0000 (10:34 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Jul 2020 08:29:41 +0000 (10:29 +0200)
commit54d2f2c300178056f6ae427edaee21b53624c88e
tree3f71e5225ed1fa57bf6c1fbdce1eb620e47cd76c
parentc50ef8cc2114ab8d3dc5010ef2eaf127be1dca5d
flow: improve 'under stress' behavior

When under stress, the packet threads ultimately fall back
to walking the hash table until they find a flow they can
safely evict and reuse. This could lead to all threads
fighting over the FlowBucket locks.

Fix by adding a limit to the number of hash rows that are
checked for a new flow. If the limit is reached, simply fail
to get a flow.
src/flow-hash.c