]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4588: main: move tsc clock scale init to Snort::setup
authorOleksandr Stepanov -X (ostepano - SOFTSERVE INC at Cisco) <ostepano@cisco.com>
Wed, 29 Jan 2025 19:43:27 +0000 (19:43 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Wed, 29 Jan 2025 19:43:27 +0000 (19:43 +0000)
Merge in SNORT/snort3 from ~OSTEPANO/snort3:perf_fix to master

Squashed commit of the following:

commit 8f69882b0b0abb840aa005ec07d28fca9c8b238b
Author: Oleksandr Stepanov <ostepano@cisco.com>
Date:   Wed Jan 29 05:26:44 2025 -0500

    main: move tsc clock scale init to Snort::setup

src/main.cc
src/main/snort.cc

index f4df0217e620a5499e6e893c8846f801af625dc4..eb8a857e13a47b8cca86055df8559be1b027860f 100644 (file)
@@ -1244,11 +1244,6 @@ static void snort_main()
     ControlMgmt::socket_init(SnortConfig::get_conf());
 #endif
 
-#ifdef USE_TSC_CLOCK
-    // Call clock_scale once to determine internal ticks to time scale
-    clock_scale();
-#endif
-
     SnortConfig::get_conf()->thread_config->implement_thread_affinity(
         STHREAD_TYPE_MAIN, get_instance_id());
 
index a7b989107d43aee19c8e6a0016db3a043534ad15..4033c5c50d099a2643f9b7073cd7995684aa8b54 100644 (file)
@@ -429,6 +429,11 @@ void Snort::setup(int argc, char* argv[])
     ((HostTrackerModule*)ModuleManager::get_module(HOST_TRACKER_NAME))->init_data();
     host_cache.print_config();
 
+#ifdef USE_TSC_CLOCK
+    // Call clock_scale once to determine internal ticks to time scale
+    clock_scale();
+#endif
+
     TimeStart();
 }