Check rte_power_freq_min() */
| 403 | |
| 404 | /* Check rte_power_freq_min() */ |
| 405 | static int |
| 406 | check_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() */ |
| 433 | static int |
no test coverage detected