From: Victor Julien Date: Sun, 26 Nov 2017 09:30:47 +0000 (+0100) Subject: flow: optimize Flow structure layout X-Git-Tag: suricata-4.1.0-beta1~535 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ed1debc968ce17d874640f0c106c39af6119a0e;p=thirdparty%2Fsuricata.git flow: optimize Flow structure layout Shrink structure with 8 bytes by moving new ttl fields into an existing 'gap'. Also fixes a strange ASAN issue in GCC 5.4.0 in unittests. --- diff --git a/src/flow.h b/src/flow.h index f969c7a5ea..f2aa47df01 100644 --- a/src/flow.h +++ b/src/flow.h @@ -331,10 +331,6 @@ typedef struct Flow_ uint8_t proto; uint8_t recursion_level; uint16_t vlan_id[2]; - uint8_t min_ttl_toserver; - uint8_t max_ttl_toserver; - uint8_t min_ttl_toclient; - uint8_t max_ttl_toclient; /** flow hash - the flow hash before hash table size mod. */ uint32_t flow_hash; @@ -409,6 +405,12 @@ typedef struct Flow_ /** Thread ID for the stream/detect portion of this flow */ FlowThreadId thread_id; + /** ttl tracking */ + uint8_t min_ttl_toserver; + uint8_t max_ttl_toserver; + uint8_t min_ttl_toclient; + uint8_t max_ttl_toclient; + /** application level storage ptrs. * */