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.
pull/3017/head
Victor Julien 8 years ago
parent 17c4623975
commit 7ed1debc96

@ -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.
*
*/

Loading…
Cancel
Save