From: Mike Stepanek (mstepane) Date: Tue, 31 Aug 2021 09:54:37 +0000 (+0000) Subject: Merge pull request #3040 in SNORT/snort3 from ~OSERHIIE/snort3:perf to master X-Git-Tag: 3.1.12.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f22e893355cc0dfab334d9fc19923230f97381b;p=thirdparty%2Fsnort3.git Merge pull request #3040 in SNORT/snort3 from ~OSERHIIE/snort3:perf to master Squashed commit of the following: commit ce52f396cb63d4db814560cd2964813032c134c0 Author: Oleksandr Serhiienko Date: Wed Aug 25 02:17:08 2021 +0300 http_inspect: reduce void space in HttpFlowData In order to reduce LLC-load-misses and improve performance, the HttpFlowData fields were reordered to cut out the void space --- diff --git a/src/service_inspectors/http_inspect/http_flow_data.h b/src/service_inspectors/http_inspect/http_flow_data.h index 36b4dab70..02925e799 100644 --- a/src/service_inspectors/http_inspect/http_flow_data.h +++ b/src/service_inspectors/http_inspect/http_flow_data.h @@ -190,19 +190,6 @@ private: HttpEnums::VERS__NOT_PRESENT }; HttpEnums::MethodId method_id = HttpEnums::METH__NOT_PRESENT; - bool cutover_on_clear = false; - bool ssl_search_abandoned = false; - - // *** HttpJsNorm - JSIdentifierCtxBase* js_ident_ctx = nullptr; - snort::JSNormalizer* js_normalizer = nullptr; - bool js_built_in_event = false; - - void reset_js_ident_ctx(); - snort::JSNormalizer& acquire_js_ctx(int32_t ident_depth, size_t norm_depth, - uint8_t max_template_nesting); - void release_js_ctx(); - // *** Transaction management including pipelining static const int MAX_PIPELINE = 100; // requests seen - responses seen <= MAX_PIPELINE HttpTransaction* transaction[2] = { nullptr, nullptr }; @@ -224,6 +211,19 @@ private: // Accounts for a 32k sliding window and 11520 bytes of inflate_huft allocations static const size_t zlib_inflate_memory = (1 << 15) + 1440*2*sizeof(int); + // *** HttpJsNorm + JSIdentifierCtxBase* js_ident_ctx = nullptr; + snort::JSNormalizer* js_normalizer = nullptr; + bool js_built_in_event = false; + + void reset_js_ident_ctx(); + snort::JSNormalizer& acquire_js_ctx(int32_t ident_depth, size_t norm_depth, + uint8_t max_template_nesting); + void release_js_ctx(); + + bool cutover_on_clear = false; + bool ssl_search_abandoned = false; + #ifdef REG_TEST static uint64_t instance_count; uint64_t seq_num;