Ken Steele
b08ddfa7f1
Support for Tile Gx atomic instructions
...
Tilera's GCC supports the GCC __sync_ intrinsics.
Increase the size of some atomic variables for better performance on
Tile. The Tile-Gx architecture has native support for 32-bit and
64-bit atomic operations, but not 8-bit and 16-bit, which are emulated
using 32-bit atomics, so changing some 16-bit and 8-bit atomic into
ints improves performance.
Increasing the size of the atomic variables modified in this change
does not increase the total size of the structures in which they
reside because of existing padding requirements. The one case that
would increase the size of the structure (Flow_) was confitionalized
to only change the size on Tile.
12 years ago
Ken Steele
d84079ba7d
Move FlowIncrUsecnt to header file to allow for inlining.
...
Move FlowIncrUsecnt() and FlowDecrUsecnt() from flow.c to flow.h to
allow for inlining.
12 years ago
Eric Leblond
4db2fc2cbb
Add per-flow generic storage
...
This patch adds a per-flow storage that can be created via the functions
available in flow-storage.c.
12 years ago
Victor Julien
298d21372b
flow: only BUG_ON use_cnt in flows when compiled with debug-validation
13 years ago
Anoop Saldanha
b22a0cffbb
cleanup flowtimeout threadvars retrieval +
...
throw back pseudo pkt back to packetpool inside flow timeout.
13 years ago
Last G
8ae11f73b2
Added parentheses to fix Eclipse static code analysis
...
Fixed bug in action priority (REJECT_DST had lowest prio)
13 years ago
Anoop Saldanha
3d74fa964a
Update all flow referencing to use the new FlowReference and FlowDeReference
...
macros.
13 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Victor Julien
a5587fec2e
flow: remove unused prune-flows option
13 years ago
Eric Leblond
0227a87fcb
cleaning: fix warning when building with clang.
...
clang was issuing some warnings related to unused return in function.
This patch adds some needed error treatment and ignore the rest of the
warnings by adding a cast to void.
13 years ago
Victor Julien
bf4ab2f7e1
Fix misc issues picked up by coccinelle.
14 years ago
Victor Julien
19a7e7f395
flow: create a flow lock macro API, implement it for mutex and rwlocks. Mutex remains the default.
14 years ago
Victor Julien
f4b542d703
Enforce memcap limit before allocating hash table in host and flow engines.
14 years ago
Victor Julien
4157d9408d
Various small flow and host table fixes.
14 years ago
Victor Julien
db24258acf
Undo changes from 88b8f15663
. Atomic stack implementation had a-b-a problem.
14 years ago
Victor Julien
88b8f15663
Add atomic stack implementation. Convert flow spare queue to use this stack. Remove now unused flow-queue code.
14 years ago
Victor Julien
0150e66ede
flow engine: improve scalability
...
Major redesign of the flow engine. Remove the flow queues that turned
out to be major choke points when using many threads. Flow manager now
walks the hash table directly. Simplify the way we get a new flow in
case of emergency.
14 years ago
Victor Julien
bfb3f1b7cf
flow: Refactor how FlowPrune deals with forced timeouts, improving locking logic.
14 years ago
Nikolay Denev
139768dd58
Do not use underscored config vars internally.
14 years ago
Victor Julien
28e15be526
Clean up default output. Use simpler output format for releases.
14 years ago
Anoop Saldanha
7c9d1b80fd
Update size parsing API with new calls for returing u8, u16, u32 and u64 values. Make updates in the codebase to use these new calls
14 years ago
Anoop Saldanha
e0c13434ef
bug 333 - support new Size Parsing API. Update various conf params inside the engine to use this API to parse sizes in the format xxx <-just the no represents bytes, xxxkb <- kilobytes, xxxmb <- megabytes, xxxgb <- gigabytes, where xxx is a \d+
14 years ago
Anoop Saldanha
cc7db6315c
Move setting packet iponly flags from decode section to stream section
14 years ago
Victor Julien
322779fb23
flow engine: release flow lock earlier in flow kill/prune process. Minor cleanups.
14 years ago
Victor Julien
5401764697
flow engine: minor cleanup.
14 years ago
Victor Julien
ad4e016288
flow engine: make FlowEnqueue lock the queue. Adapt callers.
14 years ago
Victor Julien
fbbdbb251f
flow engine: remove unneeded 'need_srclock' argument for FlowRequeue
14 years ago
Victor Julien
0331da9773
flow engine: introduce FlowRequeueMoveToSpare
...
As part of a clean up of how FlowRequeue is used, introduce
FlowRequeueMoveToSpare for moving a flow from a locked queue to the
spare queue.
14 years ago
Victor Julien
7fa3df33f2
flow engine: introduce FlowRequeueMoveToBot
...
As part of a clean up of how FlowRequeue is used, introduce
FlowRequeueMoveToBot for moving a flow to the bottom of it's queue.
14 years ago
Victor Julien
ae1e4c1d7d
Add missing hash row unlock.
14 years ago
Victor Julien
e1022ee5ae
file-extraction: Disconnect file handling from flow and move into the app layer state.
14 years ago
Pablo Rincon
6d60b3a747
filename and fileext keywords
14 years ago
Victor Julien
06904c9024
App Layer cleanup
...
Removal of per flow 'aldata' array. It contained a ptr for each ALPROTO. Instead now we have 2 ptrs in the flow: alparser and alstate.
Various cleanups and dead code removal from the app layer API.
Should safe 100+ bytes memory per flow on 64 bit.
Updated lots of unittests to reflect these changes.
14 years ago
Victor Julien
9769510ba3
flow: support requeue of flows from closed to new list for TCP ssn reuse.
14 years ago
Anoop Saldanha
dcaef183e8
fix compiler warning for printf format
14 years ago
Victor Julien
9baa16af63
Convert flow memcap to u64. Bug #332 .
14 years ago
pilcrow
ed69eeab14
Safer macro parenthesization and do/while use
14 years ago
Anoop Saldanha
b6ba944e6d
Rearrange flow manager functions into flow-manager.[ch]. Some other minor changes/updates
14 years ago
Anoop Saldanha
7c729d2d53
some more code cleanup + comments added
14 years ago
Anoop Saldanha
d14fdb1156
Remove the unnecessary unittest runmode check to get the test working. Modify tests to get it working around this
14 years ago
Anoop Saldanha
16884a0dea
refix failing unittest
14 years ago
Anoop Saldanha
552e72e35e
fix failing unittest
14 years ago
Anoop Saldanha
0957c0f8a4
shutdown timeout reassembly shouldn't check timeout flag set or not on flow
14 years ago
Anoop Saldanha
54f6e4ff4d
Merge thread kill functions. Merge slot's tm_id with the one used by packet profiling. Remove some junk unused code from ms sync pts. Timeout setup cleanup as well. packet q dbg_maxlen now u32 var.
14 years ago
Anoop Saldanha
e335bdbfbc
Code cleanup. All code to kill flow manager thread under one function now.
14 years ago
Anoop Saldanha
99a496e852
Indentation fixes
14 years ago
Anoop Saldanha
e68ca2f32f
Rewrite forced reassembly v2 using while loop instead of goto
14 years ago
Anoop Saldanha
6cc179fad8
flow mgr code doesn't have to bother on immediately exiting on seeing a suricata_ctl flag set
14 years ago
Anoop Saldanha
b09c9751aa
Now flow hash section can force reassemble flows as well
14 years ago
Anoop Saldanha
42493ee6b7
rename pseudo packet creation function. Shift the check for forced reassembly necessity on a session/direction to an inline function in the stream api
14 years ago