]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #3040 in SNORT/snort3 from ~OSERHIIE/snort3:perf to master
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 31 Aug 2021 09:54:37 +0000 (09:54 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Tue, 31 Aug 2021 09:54:37 +0000 (09:54 +0000)
Squashed commit of the following:

commit ce52f396cb63d4db814560cd2964813032c134c0
Author: Oleksandr Serhiienko <oserhiie@cisco.com>
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

src/service_inspectors/http_inspect/http_flow_data.h

index 36b4dab7073d7d1e596bd652284aff5f20c42853..02925e799d9d02b7c46e5f279218aebc70b371ad 100644 (file)
@@ -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;