Show a patch.

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

{
    "id": 448,
    "url": "https://patches.dpdk.org/api/patches/448/",
    "web_url": "https://patches.dpdk.org/patch/448/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1411410879-28872-11-git-send-email-alan.carew@intel.com>",
    "date": "2014-09-22T18:34:39",
    "name": "[dpdk-dev,10/10] VM Power Management CLI(Guest).",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2de96d40de8c6bea625fada0c2a787706e3ed0ce",
    "submitter": {
        "id": 72,
        "url": "https://patches.dpdk.org/api/people/72/",
        "name": "Alan Carew",
        "email": "alan.carew@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/patch/448/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/448/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/448/checks/",
    "tags": {},
    "headers": {
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailman-Version": "2.1.15",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-ExtLoop1": "1",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH 10/10] VM Power Management CLI(Guest).",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Precedence": "list",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "From": "Alan Carew <alan.carew@intel.com>",
        "Message-Id": "<1411410879-28872-11-git-send-email-alan.carew@intel.com>",
        "Date": "Mon, 22 Sep 2014 19:34:39 +0100",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,573,1406617200\"; d=\"scan'208\";a=\"606714624\"",
        "To": "dev@dpdk.org",
        "References": "<1411410879-28872-1-git-send-email-alan.carew@intel.com>",
        "In-Reply-To": "<1411410879-28872-1-git-send-email-alan.carew@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id F2E76B3AE;\n\tMon, 22 Sep 2014 20:29:54 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 656D7333\n\tfor <dev@dpdk.org>; Mon, 22 Sep 2014 20:29:41 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 22 Sep 2014 11:35:36 -0700",
            "from sie-lab-212-143.ir.intel.com (HELO\n\tsilpixa00385294.ir.intel.com) ([10.237.212.143])\n\tby orsmga002.jf.intel.com with ESMTP; 22 Sep 2014 11:35:34 -0700"
        ],
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Provides 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>\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(+)\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..c380c77\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-default-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_vm/\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..2715778\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+\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_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..e374af6\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 != 0)\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",
        "10/10"
    ]
}