Currently, l3fwd-power will attempt to run even if the power env
is set to KVM, which is not supported. Fix this by preventing the
app from initializing unless the env is set to one of the supported
modes.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
static int
init_power_library(void)
{
+ enum power_management_env env;
unsigned int lcore_id;
int ret = 0;
lcore_id);
return ret;
}
+ /* we're not supporting the VM channel mode */
+ env = rte_power_get_env();
+ if (env != PM_ENV_ACPI_CPUFREQ &&
+ env != PM_ENV_PSTATE_CPUFREQ) {
+ RTE_LOG(ERR, POWER,
+ "Only ACPI and PSTATE mode are supported\n");
+ return -1;
+ }
}
return ret;
}