]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove unused non-pf stats counters
authorJuliana Fajardini <jufajardini@oisf.net>
Fri, 25 Jul 2025 21:42:32 +0000 (18:42 -0300)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Aug 2025 09:26:29 +0000 (11:26 +0200)
Remove unused rule prefilter-related stats counters that aren't in use.

94644ac9604c (detect: move non-pf rules into special prefilter engines)
removed the logic that made use of and incremented the stats counters:
- det_ctx->counter_fnonmpm_list
- det_ctx->counter_nonmpm_list

Some code was left, registering them, and mentioning them in the
json schema.

Ticket #7834

doc/userguide/upgrade.rst
etc/schema.json
src/detect-engine.c
src/detect.h

index b19fc07296888350e04107354164c6b653f40b46..eecd4ab4d314431694b89b289b9690568cdd311b 100644 (file)
@@ -180,6 +180,9 @@ Major changes
 Removals
 ~~~~~~~~
 - The ssh keywords ``ssh.protoversion`` and ``ssh.softwareversion`` have been removed.
+- The detect engine stats counters for non-mpm-prefiltered rules ``fnonmpm_list``
+  and ``nonmpm_list`` were not in use since Suricata 8.0.0 and **were thus removed
+  in 8.0.1.**
 
 Deprecations
 ~~~~~~~~~~~~
index 97d56571950d9d433eefc11f909651fee4e3cc15..7e847f8a6e3296d0a90f58c50aec0284287eda04 100644 (file)
                                 }
                             }
                         },
-                        "fnonmpm_list": {
-                            "type": "integer"
-                        },
                         "lua": {
                             "type": "object",
                             "additionalProperties": false,
                         },
                         "mpm_list": {
                             "type": "integer"
-                        },
-                        "nonmpm_list": {
-                            "type": "integer"
                         }
                     }
                 },
index 9137f4b67581258e6add2e13098c6f6e2ffb47d9..904234dd37f2dc59ba899a706e3445909aae76f1 100644 (file)
@@ -3425,8 +3425,6 @@ TmEcode DetectEngineThreadCtxInit(ThreadVars *tv, void *initdata, void **data)
 
 #ifdef PROFILING
     det_ctx->counter_mpm_list = StatsRegisterAvgCounter("detect.mpm_list", tv);
-    det_ctx->counter_nonmpm_list = StatsRegisterAvgCounter("detect.nonmpm_list", tv);
-    det_ctx->counter_fnonmpm_list = StatsRegisterAvgCounter("detect.fnonmpm_list", tv);
     det_ctx->counter_match_list = StatsRegisterAvgCounter("detect.match_list", tv);
 #endif
 
@@ -3484,12 +3482,8 @@ DetectEngineThreadCtx *DetectEngineThreadCtxInitForReload(
     det_ctx->counter_alerts_suppressed = StatsRegisterCounter("detect.alerts_suppressed", tv);
 #ifdef PROFILING
     uint16_t counter_mpm_list = StatsRegisterAvgCounter("detect.mpm_list", tv);
-    uint16_t counter_nonmpm_list = StatsRegisterAvgCounter("detect.nonmpm_list", tv);
-    uint16_t counter_fnonmpm_list = StatsRegisterAvgCounter("detect.fnonmpm_list", tv);
     uint16_t counter_match_list = StatsRegisterAvgCounter("detect.match_list", tv);
     det_ctx->counter_mpm_list = counter_mpm_list;
-    det_ctx->counter_nonmpm_list = counter_nonmpm_list;
-    det_ctx->counter_fnonmpm_list = counter_fnonmpm_list;
     det_ctx->counter_match_list = counter_match_list;
 #endif
 
index c7c709b4cadd0bd4a810a61d2b016a74fdf6367f..6f092b5333124faaa8b30082be722cf1d535d531 100644 (file)
@@ -1293,8 +1293,6 @@ typedef struct DetectEngineThreadCtx_ {
     uint16_t counter_alerts_suppressed;
 #ifdef PROFILING
     uint16_t counter_mpm_list;
-    uint16_t counter_nonmpm_list;
-    uint16_t counter_fnonmpm_list;
     uint16_t counter_match_list;
 #endif