MCPcopy Create free account
hub / github.com/F-Stack/f-stack / set_tsc_freq

Function set_tsc_freq

dpdk/lib/eal/common/eal_common_timer.c:51–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void
52set_tsc_freq(void)
53{
54 struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;
55 uint64_t freq;
56
57 if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
58 /*
59 * Just use the primary process calculated TSC rate in any
60 * secondary process. It avoids any unnecessary overhead on
61 * systems where arch-specific frequency detection is not
62 * available.
63 */
64 eal_tsc_resolution_hz = mcfg->tsc_hz;
65 return;
66 }
67
68 freq = get_tsc_freq_arch();
69 if (!freq)
70 freq = get_tsc_freq();
71 if (!freq)
72 freq = estimate_tsc_freq();
73
74 RTE_LOG(DEBUG, EAL, "TSC frequency is ~%" PRIu64 " KHz\n", freq / 1000);
75 eal_tsc_resolution_hz = freq;
76 mcfg->tsc_hz = freq;
77}
78
79void rte_delay_us_callback_register(void (*userfunc)(unsigned int))
80{

Callers 3

rte_eal_timer_initFunction · 0.85
rte_eal_timer_initFunction · 0.85
rte_eal_timer_initFunction · 0.85

Calls 5

rte_eal_process_typeFunction · 0.85
estimate_tsc_freqFunction · 0.85
get_tsc_freq_archFunction · 0.50
get_tsc_freqFunction · 0.50

Tested by

no test coverage detected