]> git.ipfire.org Git - thirdparty/suricata.git/commit
flow: process evicted flows on low/no traffic
authorVictor Julien <victor@inliniac.net>
Fri, 1 Oct 2021 11:20:02 +0000 (13:20 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 4 Oct 2021 09:38:21 +0000 (11:38 +0200)
commitb788d3345cd4e4c467672bb6bfb90d2b8620e068
treecb18566852bd91b11a0d8558a50b14764e7137bf
parent31977170a8a44290fd8f501ef1018b7696644040
flow: process evicted flows on low/no traffic

In a scenario where there was suddenly no more traffic flowing, flows
in a threads `flow_queue` would not be processed. The easiest way to
see this would be in a traffic replay scenario. After the replay is done
no more packets come in and these evicted flows got stuck.

In workers mode, the capture part handles timeout this was updated to
take the `ThreadVars::flow_queue` into account.

The autofp mode the logic that puts a flow into a threads `flow_queue`
would already wake a thread up, but the `flow_queue` was then ignored.
This has been updated to take the `flow_queue` into account.

In both cases a "capture timeout" packet is pushed through the pipeline
to "flush" the queues.

Bug: #4722.
src/tm-threads.c
src/tm-threads.h