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

Function check_power_freq_max

dpdk/app/test/test_power_cpufreq.c:377–402  ·  view source on GitHub ↗

Check rte_power_freq_max() */

Source from the content-addressed store, hash-verified

375
376/* Check rte_power_freq_max() */
377static int
378check_power_freq_max(void)
379{
380 int ret;
381
382 /* test with an invalid lcore id */
383 ret = rte_power_freq_max(TEST_POWER_LCORE_INVALID);
384 if (ret >= 0) {
385 printf("Unexpectedly scale up successfully the freq to max on "
386 "lcore %u\n", TEST_POWER_LCORE_INVALID);
387 return -1;
388 }
389 ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
390 if (ret < 0) {
391 printf("Fail to scale up the freq to max on lcore %u\n",
392 TEST_POWER_LCORE_ID);
393 return -1;
394 }
395
396 /* Check the current frequency */
397 ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
398 if (ret < 0)
399 return -1;
400
401 return 0;
402}
403
404/* Check rte_power_freq_min() */
405static int

Callers 1

test_power_cpufreqFunction · 0.85

Calls 2

check_cur_freqFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected