From: Juliana Fajardini Date: Fri, 25 Jul 2025 21:42:32 +0000 (-0300) Subject: detect: remove unused non-pf stats counters X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8453d73cd2d7b5e47a878cc2855f67e406cdc3f;p=thirdparty%2Fsuricata.git detect: remove unused non-pf stats counters 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 --- diff --git a/doc/userguide/upgrade.rst b/doc/userguide/upgrade.rst index b19fc07296..eecd4ab4d3 100644 --- a/doc/userguide/upgrade.rst +++ b/doc/userguide/upgrade.rst @@ -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 ~~~~~~~~~~~~ diff --git a/etc/schema.json b/etc/schema.json index 97d5657195..7e847f8a6e 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -6470,9 +6470,6 @@ } } }, - "fnonmpm_list": { - "type": "integer" - }, "lua": { "type": "object", "additionalProperties": false, @@ -6502,9 +6499,6 @@ }, "mpm_list": { "type": "integer" - }, - "nonmpm_list": { - "type": "integer" } } }, diff --git a/src/detect-engine.c b/src/detect-engine.c index 9137f4b675..904234dd37 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -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 diff --git a/src/detect.h b/src/detect.h index c7c709b4ca..6f092b5333 100644 --- a/src/detect.h +++ b/src/detect.h @@ -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