From: Oleksandr Stepanov -X (ostepano - SOFTSERVE INC at Cisco) Date: Tue, 21 Jan 2025 18:11:59 +0000 (+0000) Subject: Pull request #4579: main: acquire TSC time scale at the startup X-Git-Tag: 3.6.3.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45f24174476c517283bcbcc5246faa1ee1820bb5;p=thirdparty%2Fsnort3.git Pull request #4579: main: acquire TSC time scale at the startup Merge in SNORT/snort3 from ~OSTEPANO/snort3:tsc_clock_fix to master Squashed commit of the following: commit a81dca2f2738af9abb57fcaa69a1ea5508274594 Author: Oleksandr Stepanov Date: Mon Jan 20 10:49:01 2025 -0500 main: aquire TSC time scale at the startup --- diff --git a/src/main.cc b/src/main.cc index eb8a857e1..f4df0217e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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());