get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/1449/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 1449,
    "url": "https://patches.dpdk.org/api/patches/1449/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416591732-3735-6-git-send-email-pablo.de.lara.guarch@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1416591732-3735-6-git-send-email-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1416591732-3735-6-git-send-email-pablo.de.lara.guarch@intel.com",
    "date": "2014-11-21T17:42:07",
    "name": "[dpdk-dev,v5,05/10] VM Power Management CLI(Guest).",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8faaf72f243e7240e0c4e49b219679fc30597f46",
    "submitter": {
        "id": 9,
        "url": "https://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416591732-3735-6-git-send-email-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1449/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1449/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 1D3AD7F7D;\n\tFri, 21 Nov 2014 18:40:59 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id A60967F6D\n\tfor <dev@dpdk.org>; Fri, 21 Nov 2014 18:40:51 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga101.fm.intel.com with ESMTP; 21 Nov 2014 09:51:25 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga002.fm.intel.com with ESMTP; 21 Nov 2014 09:42:17 -0800",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tsALHgGRi001853; Fri, 21 Nov 2014 17:42:16 GMT",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id sALHgGnN012225;\n\tFri, 21 Nov 2014 17:42:16 GMT",
            "(from pdelarax@localhost)\n\tby sivswdev02.ir.intel.com with  id sALHgG50012221;\n\tFri, 21 Nov 2014 17:42:16 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,432,1413270000\"; d=\"scan'208\";a=\"636019690\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 21 Nov 2014 17:42:07 +0000",
        "Message-Id": "<1416591732-3735-6-git-send-email-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1416591732-3735-1-git-send-email-pablo.de.lara.guarch@intel.com>",
        "References": "<1413142571-23069-1-git-send-email-alan.carew@intel.com>\n\t<1416591732-3735-1-git-send-email-pablo.de.lara.guarch@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 05/10] VM Power Management CLI(Guest).",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Alan Carew <alan.carew@intel.com>\n\nProvides a small sample application(guest_vm_power_mgr) to run on a VM.\nThe application is run by providing a core mask(-c) and number of memory\nchannels(-n). The core mask corresponds to the number of lcore channels to\nattempt to open. A maximum of 64 channels per VM is allowed. The channels must\nbe monitored by the host.\nAfter successful initialisation a CPU frequency command can be sent to the host\nusing:\nset_cpu_freq <lcore_num> <up|down|min|max>.\n\nSigned-off-by: Alan Carew <alan.carew@intel.com>\nSigned-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n examples/vm_power_manager/guest_cli/Makefile       |   56 +++++++\n examples/vm_power_manager/guest_cli/main.c         |   87 +++++++++++\n examples/vm_power_manager/guest_cli/main.h         |   52 +++++++\n .../guest_cli/vm_power_cli_guest.c                 |  155 ++++++++++++++++++++\n .../guest_cli/vm_power_cli_guest.h                 |   55 +++++++\n 5 files changed, 405 insertions(+), 0 deletions(-)\n create mode 100644 examples/vm_power_manager/guest_cli/Makefile\n create mode 100644 examples/vm_power_manager/guest_cli/main.c\n create mode 100644 examples/vm_power_manager/guest_cli/main.h\n create mode 100644 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c\n create mode 100644 examples/vm_power_manager/guest_cli/vm_power_cli_guest.h",
    "diff": "diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile\nnew file mode 100644\nindex 0000000..0efb8b2\n--- /dev/null\n+++ b/examples/vm_power_manager/guest_cli/Makefile\n@@ -0,0 +1,56 @@\n+#   BSD LICENSE\n+#\n+#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+#   All rights reserved.\n+#\n+#   Redistribution and use in source and binary forms, with or without\n+#   modification, are permitted provided that the following conditions\n+#   are met:\n+#\n+#     * Redistributions of source code must retain the above copyright\n+#       notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above copyright\n+#       notice, this list of conditions and the following disclaimer in\n+#       the documentation and/or other materials provided with the\n+#       distribution.\n+#     * Neither the name of Intel Corporation nor the names of its\n+#       contributors may be used to endorse or promote products derived\n+#       from this software without specific prior written permission.\n+#\n+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+#   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+ifeq ($(RTE_SDK),)\n+$(error \"Please define RTE_SDK environment variable\")\n+endif\n+\n+# Default target, can be overriden by command line or environment\n+RTE_TARGET ?= x86_64-native-linuxapp-gcc\n+\n+include $(RTE_SDK)/mk/rte.vars.mk\n+\n+# binary name\n+APP = guest_vm_power_mgr\n+\n+# all source are stored in SRCS-y\n+SRCS-y := main.c vm_power_cli_guest.c\n+\n+CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/\n+CFLAGS += $(WERROR_FLAGS)\n+\n+# workaround for a gcc bug with noreturn attribute\n+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603\n+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)\n+CFLAGS_main.o += -Wno-return-type\n+endif\n+\n+include $(RTE_SDK)/mk/rte.extapp.mk\ndiff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c\nnew file mode 100644\nindex 0000000..1e4767a\n--- /dev/null\n+++ b/examples/vm_power_manager/guest_cli/main.c\n@@ -0,0 +1,87 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+/*\n+#include <stdio.h>\n+#include <string.h>\n+#include <stdint.h>\n+#include <errno.h>\n+#include <sys/epoll.h>\n+#include <fcntl.h>\n+#include <unistd.h>\n+#include <stdlib.h>\n+#include <unistd.h>\n+#include <errno.h>\n+*/\n+#include <signal.h>\n+\n+#include <rte_lcore.h>\n+#include <rte_power.h>\n+#include <rte_debug.h>\n+#include <rte_config.h>\n+\n+#include \"vm_power_cli_guest.h\"\n+#include \"main.h\"\n+\n+static void\n+sig_handler(int signo)\n+{\n+\tprintf(\"Received signal %d, exiting...\\n\", signo);\n+\tunsigned lcore_id;\n+\n+\tRTE_LCORE_FOREACH(lcore_id) {\n+\t\trte_power_exit(lcore_id);\n+\t}\n+\n+}\n+\n+int\n+MAIN(int argc, char **argv)\n+{\n+\tint ret;\n+\tunsigned lcore_id;\n+\tret = rte_eal_init(argc, argv);\n+\tif (ret < 0)\n+\t\trte_panic(\"Cannot init EAL\\n\");\n+\n+\tsignal(SIGINT, sig_handler);\n+\tsignal(SIGTERM, sig_handler);\n+\n+\trte_power_set_env(PM_ENV_KVM_VM);\n+\tRTE_LCORE_FOREACH(lcore_id) {\n+\t\trte_power_init(lcore_id);\n+\t}\n+\trun_cli(NULL);\n+\n+\treturn 0;\n+}\ndiff --git a/examples/vm_power_manager/guest_cli/main.h b/examples/vm_power_manager/guest_cli/main.h\nnew file mode 100644\nindex 0000000..7b4c3da\n--- /dev/null\n+++ b/examples/vm_power_manager/guest_cli/main.h\n@@ -0,0 +1,52 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef _MAIN_H_\n+#define _MAIN_H_\n+\n+#ifdef RTE_EXEC_ENV_BAREMETAL\n+#define MAIN _main\n+#else\n+#define MAIN main\n+#endif\n+\n+int MAIN(int argc, char **argv);\n+\n+#endif /* _MAIN_H_ */\n+\n+#ifndef MAIN_H_\n+#define MAIN_H_\n+\n+\n+\n+#endif /* MAIN_H_ */\ndiff --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\nnew file mode 100644\nindex 0000000..7c4af4a\n--- /dev/null\n+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c\n@@ -0,0 +1,155 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+\n+#include <stdint.h>\n+#include <string.h>\n+#include <stdio.h>\n+#include <termios.h>\n+\n+#include <cmdline_rdline.h>\n+#include <cmdline_parse.h>\n+#include <cmdline_parse_string.h>\n+#include <cmdline_parse_num.h>\n+#include <cmdline_socket.h>\n+#include <cmdline.h>\n+#include <rte_config.h>\n+#include <rte_log.h>\n+#include <rte_lcore.h>\n+\n+#include <rte_power.h>\n+\n+#include \"vm_power_cli_guest.h\"\n+\n+\n+#define CHANNEL_PATH \"/dev/virtio-ports/virtio.serial.port.poweragent\"\n+\n+\n+#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1\n+\n+struct cmd_quit_result {\n+\tcmdline_fixed_string_t quit;\n+};\n+\n+static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,\n+\t\t\t\t__attribute__((unused)) struct cmdline *cl,\n+\t\t\t    __attribute__((unused)) void *data)\n+{\n+\tunsigned lcore_id;\n+\n+\tRTE_LCORE_FOREACH(lcore_id) {\n+\t\trte_power_exit(lcore_id);\n+\t}\n+\tcmdline_quit(cl);\n+}\n+\n+cmdline_parse_token_string_t cmd_quit_quit =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_quit_result, quit, \"quit\");\n+\n+cmdline_parse_inst_t cmd_quit = {\n+\t.f = cmd_quit_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"close the application\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_quit_quit,\n+\t\tNULL,\n+\t},\n+};\n+\n+/* *** VM operations *** */\n+\n+struct cmd_set_cpu_freq_result {\n+\tcmdline_fixed_string_t set_cpu_freq;\n+\tuint8_t lcore_id;\n+\tcmdline_fixed_string_t cmd;\n+};\n+\n+static void\n+cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,\n+\t\t       __attribute__((unused)) void *data)\n+{\n+\tint ret = -1;\n+\tstruct cmd_set_cpu_freq_result *res = parsed_result;\n+\n+\tif (!strcmp(res->cmd , \"up\"))\n+\t\tret = rte_power_freq_up(res->lcore_id);\n+\telse if (!strcmp(res->cmd , \"down\"))\n+\t\tret = rte_power_freq_down(res->lcore_id);\n+\telse if (!strcmp(res->cmd , \"min\"))\n+\t\tret = rte_power_freq_min(res->lcore_id);\n+\telse if (!strcmp(res->cmd , \"max\"))\n+\t\tret = rte_power_freq_max(res->lcore_id);\n+\tif (ret != 1)\n+\t\tcmdline_printf(cl, \"Error sending message: %s\\n\", strerror(ret));\n+}\n+\n+cmdline_parse_token_string_t cmd_set_cpu_freq =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,\n+\t\t\tset_cpu_freq, \"set_cpu_freq\");\n+cmdline_parse_token_string_t cmd_set_cpu_freq_core_num =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result,\n+\t\t\tlcore_id, UINT8);\n+cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result,\n+\t\t\tcmd, \"up#down#min#max\");\n+\n+cmdline_parse_inst_t cmd_set_cpu_freq_set = {\n+\t.f = cmd_set_cpu_freq_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set_cpu_freq <core_num> <up|down|min|max>, Set the current \"\n+\t\t\t\"frequency for the specified core by scaling up/down/min/max\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_cpu_freq,\n+\t\t(void *)&cmd_set_cpu_freq_core_num,\n+\t\t(void *)&cmd_set_cpu_freq_cmd_cmd,\n+\t\tNULL,\n+\t},\n+};\n+\n+cmdline_parse_ctx_t main_ctx[] = {\n+\t\t(cmdline_parse_inst_t *)&cmd_quit,\n+\t\t(cmdline_parse_inst_t *)&cmd_set_cpu_freq_set,\n+\t\tNULL,\n+};\n+\n+void\n+run_cli(__attribute__((unused)) void *arg)\n+{\n+\tstruct cmdline *cl;\n+\tcl = cmdline_stdin_new(main_ctx, \"vmpower(guest)> \");\n+\tif (cl == NULL)\n+\t\treturn;\n+\n+\tcmdline_interact(cl);\n+\tcmdline_stdin_exit(cl);\n+}\ndiff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h\nnew file mode 100644\nindex 0000000..0c4bdd5\n--- /dev/null\n+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h\n@@ -0,0 +1,55 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#ifndef VM_POWER_CLI_H_\n+#define VM_POWER_CLI_H_\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include \"channel_commands.h\"\n+\n+int guest_channel_host_connect(unsigned lcore_id);\n+\n+int guest_channel_send_msg(struct channel_packet *pkt, unsigned lcore_id);\n+\n+void guest_channel_host_disconnect(unsigned lcore_id);\n+\n+void run_cli(__attribute__((unused)) void *arg);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* VM_POWER_CLI_H_ */\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "05/10"
    ]
}