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

Function check_power_freq_min

dpdk/app/test/test_power_cpufreq.c:405–430  ·  view source on GitHub ↗

Check rte_power_freq_min() */

Source from the content-addressed store, hash-verified

403
404/* Check rte_power_freq_min() */
405static int
406check_power_freq_min(void)
407{
408 int ret;
409
410 /* test with an invalid lcore id */
411 ret = rte_power_freq_min(TEST_POWER_LCORE_INVALID);
412 if (ret >= 0) {
413 printf("Unexpectedly scale down successfully the freq to min "
414 "on lcore %u\n", TEST_POWER_LCORE_INVALID);
415 return -1;
416 }
417 ret = rte_power_freq_min(TEST_POWER_LCORE_ID);
418 if (ret < 0) {
419 printf("Fail to scale down the freq to min on lcore %u\n",
420 TEST_POWER_LCORE_ID);
421 return -1;
422 }
423
424 /* Check the current frequency */
425 ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
426 if (ret < 0)
427 return -1;
428
429 return 0;
430}
431
432/* Check rte_power_turbo() */
433static int

Callers 1

test_power_cpufreqFunction · 0.85

Calls 2

check_cur_freqFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected