Check rte_power_freq_max() */
| 375 | |
| 376 | /* Check rte_power_freq_max() */ |
| 377 | static int |
| 378 | check_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() */ |
| 405 | static int |
no test coverage detected