]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4579: main: acquire TSC time scale at the startup
authorOleksandr Stepanov -X (ostepano - SOFTSERVE INC at Cisco) <ostepano@cisco.com>
Tue, 21 Jan 2025 18:11:59 +0000 (18:11 +0000)
committerChris Sherwin (chsherwi) <chsherwi@cisco.com>
Tue, 21 Jan 2025 18:11:59 +0000 (18:11 +0000)
Merge in SNORT/snort3 from ~OSTEPANO/snort3:tsc_clock_fix to master

Squashed commit of the following:

commit a81dca2f2738af9abb57fcaa69a1ea5508274594
Author: Oleksandr Stepanov <ostepano@cisco.com>
Date:   Mon Jan 20 10:49:01 2025 -0500

    main: aquire TSC time scale at the startup

src/main.cc

index eb8a857e13a47b8cca86055df8559be1b027860f..f4df0217e620a5499e6e893c8846f801af625dc4 100644 (file)
@@ -1244,6 +1244,11 @@ 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());