From: Philippe Antoine Date: Thu, 28 Apr 2022 09:37:36 +0000 (+0200) Subject: flow: finish to remove obsolete counters X-Git-Tag: suricata-7.0.0-beta1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ce55c9df285ebeddd58ff35dd3f3ef15589671;p=thirdparty%2Fsuricata.git flow: finish to remove obsolete counters As was begun in b3599507f4eb891841417575587d690ea13fe6c0 Ticket: #5317 --- diff --git a/etc/schema.json b/etc/schema.json index 3bd70f8cea..e079e02edd 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -4682,15 +4682,6 @@ "mgr": { "type": "object", "properties": { - "bypassed_pruned": { - "type": "integer" - }, - "closed_pruned": { - "type": "integer" - }, - "est_pruned": { - "type": "integer" - }, "flows_checked": { "type": "integer" }, @@ -4712,9 +4703,6 @@ "full_hash_pass": { "type": "integer" }, - "new_pruned": { - "type": "integer" - }, "rows_maxlen": { "type": "integer" }, diff --git a/src/flow-manager.c b/src/flow-manager.c index 5b5a29cd0b..03d201f7f9 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -116,11 +116,6 @@ void FlowTimeoutsEmergency(void) #define NEW_FLOW_COUNT_COND 10 typedef struct FlowTimeoutCounters_ { - uint32_t new; - uint32_t est; - uint32_t clo; - uint32_t byp; - uint32_t rows_checked; uint32_t rows_skipped; uint32_t rows_empty; @@ -609,10 +604,6 @@ typedef struct FlowCounters_ { uint16_t flow_mgr_full_pass; uint16_t flow_mgr_rows_sec; - uint16_t flow_mgr_cnt_clo; - uint16_t flow_mgr_cnt_new; - uint16_t flow_mgr_cnt_est; - uint16_t flow_mgr_cnt_byp; uint16_t flow_mgr_spare; uint16_t flow_emerg_mode_enter; uint16_t flow_emerg_mode_over; @@ -649,10 +640,6 @@ static void FlowCountersInit(ThreadVars *t, FlowCounters *fc) fc->flow_mgr_full_pass = StatsRegisterCounter("flow.mgr.full_hash_pass", t); fc->flow_mgr_rows_sec = StatsRegisterCounter("flow.mgr.rows_per_sec", t); - fc->flow_mgr_cnt_clo = StatsRegisterCounter("flow.mgr.closed_pruned", t); - fc->flow_mgr_cnt_new = StatsRegisterCounter("flow.mgr.new_pruned", t); - fc->flow_mgr_cnt_est = StatsRegisterCounter("flow.mgr.est_pruned", t); - fc->flow_mgr_cnt_byp = StatsRegisterCounter("flow.mgr.bypassed_pruned", t); fc->flow_mgr_spare = StatsRegisterCounter("flow.spare", t); fc->flow_emerg_mode_enter = StatsRegisterCounter("flow.emerg_mode_entered", t); fc->flow_emerg_mode_over = StatsRegisterCounter("flow.emerg_mode_over", t); @@ -676,11 +663,6 @@ static void FlowCountersInit(ThreadVars *t, FlowCounters *fc) static void FlowCountersUpdate( ThreadVars *th_v, const FlowManagerThreadData *ftd, const FlowTimeoutCounters *counters) { - StatsAddUI64(th_v, ftd->cnt.flow_mgr_cnt_clo, (uint64_t)counters->clo); - StatsAddUI64(th_v, ftd->cnt.flow_mgr_cnt_new, (uint64_t)counters->new); - StatsAddUI64(th_v, ftd->cnt.flow_mgr_cnt_est, (uint64_t)counters->est); - StatsAddUI64(th_v, ftd->cnt.flow_mgr_cnt_byp, (uint64_t)counters->byp); - StatsAddUI64(th_v, ftd->cnt.flow_mgr_flows_checked, (uint64_t)counters->flows_checked); StatsAddUI64(th_v, ftd->cnt.flow_mgr_flows_notimeout, (uint64_t)counters->flows_notimeout); @@ -849,7 +831,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data) } /* try to time out flows */ - FlowTimeoutCounters counters = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + FlowTimeoutCounters counters = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; if (emerg) { /* in emergency mode, do a full pass of the hash table */