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

Function check_scale

dpdk/lib/power/rte_power_pmd_mgmt.c:417–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417static int
418check_scale(unsigned int lcore)
419{
420 enum power_management_env env;
421
422 /* only PSTATE, AMD-PSTATE, ACPI and CPPC modes are supported */
423 if (!rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ) &&
424 !rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ) &&
425 !rte_power_check_env_supported(PM_ENV_AMD_PSTATE_CPUFREQ) &&
426 !rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) {
427 RTE_LOG(DEBUG, POWER, "Only ACPI, PSTATE, AMD-PSTATE, or CPPC modes are supported\n");
428 return -ENOTSUP;
429 }
430 /* ensure we could initialize the power library */
431 if (rte_power_init(lcore))
432 return -EINVAL;
433
434 /* ensure we initialized the correct env */
435 env = rte_power_get_env();
436 if (env != PM_ENV_ACPI_CPUFREQ && env != PM_ENV_PSTATE_CPUFREQ &&
437 env != PM_ENV_AMD_PSTATE_CPUFREQ && env != PM_ENV_CPPC_CPUFREQ) {
438 RTE_LOG(DEBUG, POWER, "Unable to initialize ACPI, PSTATE, AMD-PSTATE, or CPPC modes\n");
439 return -ENOTSUP;
440 }
441
442 /* we're done */
443 return 0;
444}
445
446static int
447check_monitor(struct pmd_core_cfg *cfg, const union queue *qdata)

Callers 1

Calls 3

rte_power_initFunction · 0.85
rte_power_get_envFunction · 0.85

Tested by

no test coverage detected