From 7ed1debc968ce17d874640f0c106c39af6119a0e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 26 Nov 2017 10:30:47 +0100 Subject: [PATCH] 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. --- src/flow.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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. * */ -- 2.47.2