Victor Julien
c89d01679f
counters: improve thread setup error handling
11 months ago
Victor Julien
33589e6079
unix-socket: don't doubly setup stats private area
11 months ago
Victor Julien
13d2fa6092
counters: minor code cleanup
11 months ago
Victor Julien
c27d0b4192
counters: remove ThreadVars from sync API
11 months ago
Victor Julien
3f4af00fdd
counters: remove ThreadVars from API
11 months ago
Victor Julien
4234567bb9
counters: unify public and private structs
...
This way ThreadVars can hold a single stats member.
11 months ago
Victor Julien
3a58c53b93
counters: improve error checking
...
Implement for unix manager.
Harden against incomplete setup.
More gracefully handle no-stats config
11 months ago
Victor Julien
c4551e95bc
counters: compress local stats table
...
To avoid overhead of copies during syncs, compress the local stats table.
Previously all counters had 2 64bit ints: one for the value, one to
track the number of times the counter was updated. The updates field was
only used for counters of type "average" however. Since only a few
average counters were in use, this effectively meant that almost half of
the space used for the table was wasted.
This patch reduces `StatsLocalCounter` to a single i64. Regular counters
simply use this directly by using their id as an index into the table.
For avg counters the logic is similar, however they effectively use 2
indexes, idx and idx+1. The value is at `idx`, the updates are at `idx +
1`.
Ticket: #5613 .
11 months ago
Victor Julien
70096873ce
counters: threadvar init func
...
Add initializion.
Also fixes DetectDsizeIcmpv6Test01 using two different ThreadVar
structs.
11 months ago
Victor Julien
6c77c8f371
counters: use spinlock for thread sync
...
Sync should be short, so no value in getting scheduled away.
11 months ago
Victor Julien
96cabab46b
counters: optimize thread stats syncs
...
Minimize the work done under lock when synchronizing thread stats.
Instead of looping all stats to copy them from the threads private store
to the public store, this patch simply memcpy's the whole array.
When the stats thread then takes the stats from the threads public
store, it now also copies the whole array to a local store before
processing the stats one by one.
This keeps the locking time minimal.
Packet Thread(s)
[ private thread stats ]
| lock
| memcpy
V unlock
[ copy of thread stats ]
Stats Thread
[ copy of thread stats ]
| lock
| memcpy
V unlock
[ private copy of thread stats ]
11 months ago
Victor Julien
11f214bda8
counters: reduce scope of helper function
...
Not needed outside of the counters code.
11 months ago
Victor Julien
5f754b11a6
counters: move counter pointer out of thread private data
...
Ticket: #5613 .
11 months ago
Victor Julien
3da562cd1b
counters: remove unused elements from StatsThreadStore
11 months ago
Victor Julien
444166ec84
counters: move regular counter id to dedicated type
11 months ago
Victor Julien
0d8c81c062
counters: avoid unneeded 'updates' increment
...
No longer used now that the counter functions are only for regular counters.
11 months ago
Victor Julien
fd9ce24fa3
counters: remove unused id var in local stats counter
...
Ticket: #5613 .
11 months ago
Victor Julien
2e1705e54a
counters: minor code cleanup
11 months ago
Victor Julien
b474b40d74
counters: use a dedicated type for global counters
...
Type isn't used by any callers right now.
11 months ago
Victor Julien
a8095d8ef5
counters: use a dedicated type for avg counters
11 months ago
Victor Julien
e13b4ecbce
counters: use a dedicated type for max counters
...
Also adds a dedicated 'Update' function to match the type.
Avoids unnecessarily incrementing the 'updates' variable.
11 months ago
Victor Julien
888b415257
counters: fix comment for set function
...
Handles u64, not a double.
11 months ago
Victor Julien
2eb2926cd2
decode: register decoder.erspan and decoder.nsh counters correctly
...
These are regular counters, not 'max' counters.
11 months ago
Philippe Antoine
2349f19977
nfs: use nfsv2 procedure names with nfs_procedure keyword
...
Ticket: 5140
11 months ago
Jhonny Sousa
257ed82dbd
nfs: Fix NFSv2 STATFS procedure parsing
...
Ticket: #5140
11 months ago
Philippe Antoine
15b1bf4865
rust: bindgen SCHTPFileCloseHandleRange
...
Ticket: 7762
11 months ago
Philippe Antoine
cddbd0b906
rust: bindgen more file functions
...
Ticket: 7762
11 months ago
Philippe Antoine
327b8b04a9
rust: bindgen with default derive
...
Ticket: 7762
11 months ago
Victor Julien
80d5afe91b
pop3: AUTH command handling improvements
...
Better track the state so it's known when to expect a base64 request
message. Also better validate the base64.
Ticket: #7994 .
11 months ago
Victor Julien
2973eded56
pop3: convert to nom 8
...
Ticket: #8127 .
11 months ago
Victor Julien
da2db65f62
pop3: rustfmt
11 months ago
Jason Ish
83d8b1d2f8
quic: update to nom 8.0
...
Ticket: #8140
11 months ago
Philippe Antoine
3cb873e3bc
ci: check script eve-parity is working
11 months ago
Philippe Antoine
1df568300c
doc/jsonschema: use dnp3_func instead of its alias
11 months ago
Philippe Antoine
273e9f55eb
scripts: eve-parity hard fail on unknown keyword
11 months ago
Philippe Antoine
f581b8f1ae
scripts: complete eve-parity type check
11 months ago
Pierre Chifflier
459e2599c7
configure: fix binary crate name in hint message if bindgen is not found
11 months ago
Philippe Antoine
62fcdf9bff
detect: add debug validation check about flags consistency
...
If a flag is not a uint with a size, it should not have a specific
flag like multi_uint, nor enum nor bitflags
11 months ago
Philippe Antoine
32ce3d29be
detect/krb: use flag u32 for krb5_msg_type
11 months ago
Philippe Antoine
8b9a779a16
file: fix hash computation for small multipart files
...
Ticket: 8119
Fixes: f68e2f5537 ("files: append data on closing even with
FILE_NOSTORE")
11 months ago
Jason Ish
7417cf07f6
github-ci: add schema tests to docs workflow
...
This will run the schema tests when no code has been modified.
11 months ago
Juliana Fajardini
331bc8aeac
schema: add descriptions to global memcaps/memuses
...
For FTP, Host, IP Pair and HTTP.
Related to
Task #6434
11 months ago
Juliana Fajardini
2855574a2c
schema: add additional properties to stats.capture
...
The `stats.capture` object may have different properties based on the
capture method used.
This adds the ones pertaining to AF_PACKET capture.
Related to
Task #6434
11 months ago
Juliana Fajardini
12e0e51864
schema: add desc for each main stats module
...
Part of the schema documentation effort.
Related to
Task #6434
11 months ago
Juliana Fajardini
025ffa6135
schema: allow stats.stream event counters
...
While the counters exist, they're not present in the schema, causing
validation to fail if stats.stream-events is enabled.
Task #7858
11 months ago
Juliana Fajardini
173fec81f8
schema/stats: flow_mgr is actually flow.mgr
...
The schema accounts for a stats counters group that is a subgroup of the
flows stats counters. Remove `flow_mgr`, thus.
11 months ago
Juliana Fajardini
1647081b29
doc: remove remaining references to pruned flows
...
These were removed with a5587fec2e but these mentions went under the
radar.
11 months ago
Jhonny Sousa
05a4aaf2c0
util/misc: Change shortening format and add unittests
...
Ticket: #5583
11 months ago
Jhonny Sousa
626027a456
util/pool: Convert unittests to new FAIL/PASS api
...
Ticket: #6322
12 months ago
Philippe Antoine
8ca589b5fb
detect/tls: get rid of stack allocation
...
By making the pcre trim the trailing spaces
Ticket: 8001
12 months ago