From 4ce53753bced3ab4aa5c412e55b7ebaeb53dc27b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 23 Jan 2014 09:31:56 +0100 Subject: [PATCH] app-layer: shrink AppLayerParserState Change layout to be more efficient, shrinks structure with 8 bytes. --- src/app-layer-parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index c48227d463..a56cdd421f 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -122,6 +122,8 @@ typedef struct AppLayerParserCtx_ { struct AppLayerParserState_ { uint8_t flags; + /* State version, incremented for each update. Can wrap around. */ + uint16_t version; /* Indicates the current transaction that is being inspected. * We have a var per direction. */ uint64_t inspect_id[2]; @@ -129,8 +131,6 @@ struct AppLayerParserState_ { * we don't need a var per direction since we don't log a transaction * unless we have the entire transaction. */ uint64_t log_id; - /* State version, incremented for each update. Can wrap around. */ - uint16_t version; /* Used to store decoder events. */ AppLayerDecoderEvents *decoder_events;