Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine developed by the OISF and the Suricata community.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Victor Julien 5251ea9ff5 flow: lockless flow manager checks
Until this point, the flow manager would check for timed out flows
by walking the flow hash, locking first the hash row and then each
individual flow to get it's state and timestamp. To not be too
intrusive trylocks were used so that a busy flow wouldn't cause the
flow manager to wait for a long time while holding the hash row lock.

Building on the changes in handling of the flow state and lastts
fields, this patch changes the flow managers behavior.

It can now get a flows state atomically and the lastts can be safely
read while holding just the flow hash row lock. This allows the flow
manager to do the basic time out check much more cheaply:

1. it doesn't have to wait for getting a lock
2. it doesn't interupt the packet path

As a consequence the trylock is now also gone. A flow that returns
'true' on timeout is pretty much certainly not going to be busy so
we can safely lock it unconditionally. This also means the flow
manager now walks the entire row unconditionally and is guaranteed
to inspect each flow in the row.

To make sure the functions called before the flow lock don't
accidentally change the flow (which would require a lock) the args
to these flows are changed to const pointers.
12 years ago
benches Initial add of the files. 17 years ago
contrib Add option on Tile-Gx for logging for fast.log alerts over PCIe 13 years ago
doc Update docs from wiki 14 years ago
lua output-lua: add SCPacketTimeString 12 years ago
m4 Prelude plugin: add detection in configure script 17 years ago
qa Suppress ARM valgrind warning 12 years ago
rules ipv6: check for MLD messages with HL not 1 12 years ago
scripts suricatasc: exit with error if command returns NOK 12 years ago
src flow: lockless flow manager checks 12 years ago
.gitignore unittest: make check use a qa/log dir for logging 13 years ago
.travis.yml travis-ci: use make check 12 years ago
COPYING Initial add of the files. 17 years ago
ChangeLog Update changelog for 2.1beta3 12 years ago
LICENSE import of gplv2 LICENSE 17 years ago
Makefile.am Respect DESTDIR in install-conf and install-rules. 12 years ago
Makefile.cvs Initial add of the files. 17 years ago
acsite.m4 Added C99 defs/macros to acsite.m4 for CentOS 17 years ago
autogen.sh OpenBSD 5.2 build fixes, Unit test fix. 14 years ago
classification.config Import of classification.config 17 years ago
config.rpath Add file needed for some autotools version. 13 years ago
configure.ac Fix compilation on OS X Yosemite 12 years ago
doxygen.cfg doxygen: add source browser 12 years ago
reference.config Update reference.config 12 years ago
suricata.yaml.in tcp: add stream.reassembly.zero-copy-size option 12 years ago
threshold.config threshold: improve comments of shipped threshold.config, add links to wiki. 14 years ago