summaryrefslogtreecommitdiff
path: root/examples/vm_power_manager
diff options
context:
space:
mode:
authorDavid Hunt <david.hunt@intel.com>2017-09-13 11:44:18 +0100
committerThomas Monjalon <thomas@monjalon.net>2017-09-22 16:35:13 +0200
commitd191f0853378f61329afa421283b7dfaed896962 (patch)
tree1d1b71834c48813e414aa6edc26ddf3bd1cfc87f /examples/vm_power_manager
parent567997b977c29345a1ecb3ab17496b1d4e79ed57 (diff)
downloaddpdk-d191f0853378f61329afa421283b7dfaed896962.zip
dpdk-d191f0853378f61329afa421283b7dfaed896962.tar.gz
dpdk-d191f0853378f61329afa421283b7dfaed896962.tar.xz
examples/vm_power_manager: add per-core turbo CLI
Add extra commands to guest cli to allow enable/disable of per-core turbo. Includes messages to vm_power_mgr in host. Signed-off-by: David Hunt <david.hunt@intel.com>
Diffstat (limited to 'examples/vm_power_manager')
-rw-r--r--examples/vm_power_manager/guest_cli/vm_power_cli_guest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 7931135..4e982bd 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -108,6 +108,10 @@ cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,
ret = rte_power_freq_min(res->lcore_id);
else if (!strcmp(res->cmd , "max"))
ret = rte_power_freq_max(res->lcore_id);
+ else if (!strcmp(res->cmd, "enable_turbo"))
+ ret = rte_power_freq_enable_turbo(res->lcore_id);
+ else if (!strcmp(res->cmd, "disable_turbo"))
+ ret = rte_power_freq_disable_turbo(res->lcore_id);
if (ret != 1)
cmdline_printf(cl, "Error sending message: %s\n", strerror(ret));
}
@@ -120,7 +124,7 @@ cmdline_parse_token_string_t cmd_set_cpu_freq_core_num =
lcore_id, UINT8);
cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =
TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,
- cmd, "up#down#min#max");
+ cmd, "up#down#min#max#enable_turbo#disable_turbo");
cmdline_parse_inst_t cmd_set_cpu_freq_set = {
.f = cmd_set_cpu_freq_parsed,