get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 42053,
    "url": "http://patches.dpdk.org/api/patches/42053/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180702054450.29269-19-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20180702054450.29269-19-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180702054450.29269-19-qi.z.zhang@intel.com",
    "date": "2018-07-02T05:44:49",
    "name": "[v8,18/19] examples/multi_process: add hotplug sample",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c613d8a3bf0b5901504c1f55b96859bff4a6ed96",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180702054450.29269-19-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 344,
            "url": "http://patches.dpdk.org/api/series/344/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=344",
            "date": "2018-07-02T05:44:31",
            "name": "enable hotplug on multi-process",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/344/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42053/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/42053/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 394BB7CD2;\n\tMon,  2 Jul 2018 07:45:14 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id CF9DE3798\n\tfor <dev@dpdk.org>; Mon,  2 Jul 2018 07:45:06 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2018 22:45:03 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga007.jf.intel.com with ESMTP; 01 Jul 2018 22:44:49 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,298,1526367600\"; d=\"scan'208\";a=\"53379086\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com",
        "Cc": "konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, \n\tferruh.yigit@intel.com, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com, Qi Zhang <qi.z.zhang@intel.com>",
        "Date": "Mon,  2 Jul 2018 13:44:49 +0800",
        "Message-Id": "<20180702054450.29269-19-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180702054450.29269-1-qi.z.zhang@intel.com>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180702054450.29269-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 18/19] examples/multi_process: add hotplug\n\tsample",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The sample code demonstrate device (ethdev only) management\nat multi-process envrionment. User can attach/detach a device\non primary process and see it is synced on secondary process\nautomatically, also user can lock a device to prevent it be\ndetached or unlock it to go back to default behaviour.\n\nHow to start?\n./hotplug_mp --proc-type=auto\n\nCommand Line Example:\n\n>help\n>list\n\n/* attach a af_packet vdev */\n>attach net_af_packet,iface=eth0\n\n/* detach port 0 */\n>detach 0\n\n/* attach a private af_packet vdev (secondary process only)*/\n>attachp net_af_packet,iface=eth0\n\n/* detach a private device (secondary process only) */\n>detachp 0\n\n/* lock port 0 */\n>lock 0\n\n/* unlock port 0 */\n>unlock 0\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n examples/multi_process/Makefile              |   1 +\n examples/multi_process/hotplug_mp/Makefile   |  23 ++\n examples/multi_process/hotplug_mp/commands.c | 356 +++++++++++++++++++++++++++\n examples/multi_process/hotplug_mp/commands.h |  10 +\n examples/multi_process/hotplug_mp/main.c     |  41 +++\n 5 files changed, 431 insertions(+)\n create mode 100644 examples/multi_process/hotplug_mp/Makefile\n create mode 100644 examples/multi_process/hotplug_mp/commands.c\n create mode 100644 examples/multi_process/hotplug_mp/commands.h\n create mode 100644 examples/multi_process/hotplug_mp/main.c",
    "diff": "diff --git a/examples/multi_process/Makefile b/examples/multi_process/Makefile\nindex a6708b7e4..b76b02fcb 100644\n--- a/examples/multi_process/Makefile\n+++ b/examples/multi_process/Makefile\n@@ -13,5 +13,6 @@ include $(RTE_SDK)/mk/rte.vars.mk\n DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += client_server_mp\n DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += simple_mp\n DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += symmetric_mp\n+DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += hotplug_mp\n \n include $(RTE_SDK)/mk/rte.extsubdir.mk\ndiff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile\nnew file mode 100644\nindex 000000000..c09a57bfa\n--- /dev/null\n+++ b/examples/multi_process/hotplug_mp/Makefile\n@@ -0,0 +1,23 @@\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2010-2014 Intel Corporation\n+\n+ifeq ($(RTE_SDK),)\n+$(error \"Please define RTE_SDK environment variable\")\n+endif\n+\n+# Default target, can be overridden 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 = hotplug_mp\n+\n+# all source are stored in SRCS-y\n+SRCS-y := main.c commands.c\n+\n+CFLAGS += -O3\n+CFLAGS += $(WERROR_FLAGS)\n+CFLAGS += -DALLOW_EXPERIMENTAL_API\n+\n+include $(RTE_SDK)/mk/rte.extapp.mk\ndiff --git a/examples/multi_process/hotplug_mp/commands.c b/examples/multi_process/hotplug_mp/commands.c\nnew file mode 100644\nindex 000000000..31f9e2e15\n--- /dev/null\n+++ b/examples/multi_process/hotplug_mp/commands.c\n@@ -0,0 +1,356 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation.\n+ */\n+\n+#include <cmdline_rdline.h>\n+#include <cmdline_parse.h>\n+#include <cmdline_parse_ipaddr.h>\n+#include <cmdline_parse_num.h>\n+#include <cmdline_parse_string.h>\n+#include <cmdline.h>\n+#include <rte_ethdev.h>\n+\n+/**********************************************************/\n+\n+struct cmd_help_result {\n+\tcmdline_fixed_string_t help;\n+};\n+\n+static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,\n+\t\t\t    struct cmdline *cl,\n+\t\t\t    __attribute__((unused)) void *data)\n+{\n+\tcmdline_printf(cl,\n+\t\t       \"commands:\\n\"\n+\t\t       \"- attach <devargs>\\n\"\n+\t\t       \"- detach <port_id>\\n\"\n+\t\t       \"- attachp <devargs>\\n\"\n+\t\t       \"- detachp <port_id>\\n\"\n+\t\t       \"- lock <port_id>\\n\"\n+\t\t       \"- unlock <port_id>\\n\"\n+\t\t       \"- list\\n\\n\");\n+}\n+\n+cmdline_parse_token_string_t cmd_help_help =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_help_result, help, \"help\");\n+\n+cmdline_parse_inst_t cmd_help = {\n+\t.f = cmd_help_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"show help\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_help_help,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\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    struct cmdline *cl,\n+\t\t\t    __attribute__((unused)) void *data)\n+{\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 = \"quit\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_quit_quit,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_list_result {\n+\tcmdline_fixed_string_t list;\n+};\n+\n+static void cmd_list_parsed(__attribute__((unused)) void *parsed_result,\n+\t\t\t    struct cmdline *cl,\n+\t\t\t    __attribute__((unused)) void *data)\n+{\n+\tuint16_t port_id;\n+\tchar dev_name[RTE_DEV_NAME_MAX_LEN];\n+\n+\tcmdline_printf(cl, \"list all etherdev\\n\");\n+\n+\tRTE_ETH_FOREACH_DEV(port_id) {\n+\t\trte_eth_dev_get_name_by_port(port_id, dev_name);\n+\t\tif (strlen(dev_name) > 0)\n+\t\t\tcmdline_printf(cl, \"%d\\t%s\\n\", port_id, dev_name);\n+\t\telse\n+\t\t\tprintf(\"empty dev_name is not expected!\\n\");\n+\t}\n+}\n+\n+cmdline_parse_token_string_t cmd_list_list =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_list_result, list, \"list\");\n+\n+cmdline_parse_inst_t cmd_list = {\n+\t.f = cmd_list_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"list all devices\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_list_list,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_attach_result {\n+\tcmdline_fixed_string_t attach;\n+\tcmdline_fixed_string_t device;\n+};\n+\n+static void cmd_dev_attach_parsed(void *parsed_result,\n+\t\t\t\t  struct cmdline *cl,\n+\t\t\t\t  __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_attach_result *res = parsed_result;\n+\tuint16_t port_id;\n+\n+\tif (!rte_eth_dev_attach(res->device, &port_id))\n+\t\tcmdline_printf(cl, \"attached device %s at port %d\\n\",\n+\t\t\tres->device, port_id);\n+\telse\n+\t\tcmdline_printf(cl, \"failed to attached device %s\\n\",\n+\t\t\tres->device);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_attach_attach =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_attach_result, attach,\n+\t\t\t\t \"attach\");\n+cmdline_parse_token_string_t cmd_dev_attach_device =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_attach_result, device, NULL);\n+\n+cmdline_parse_inst_t cmd_attach_device = {\n+\t.f = cmd_dev_attach_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"attach a device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_attach_attach,\n+\t\t(void *)&cmd_dev_attach_device,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_attachp_result {\n+\tcmdline_fixed_string_t attachp;\n+\tcmdline_fixed_string_t device;\n+};\n+\n+static void cmd_dev_attachp_parsed(void *parsed_result,\n+\t\t\t\t   struct cmdline *cl,\n+\t\t\t\t   __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_attachp_result *res = parsed_result;\n+\tuint16_t port_id;\n+\n+\tif (!rte_eth_dev_attach_private(res->device, &port_id))\n+\t\tcmdline_printf(cl, \"attached prviate device %s at port %d\\n\",\n+\t\t\tres->device, port_id);\n+\telse\n+\t\tcmdline_printf(cl, \"failed to attached private device %s\\n\",\n+\t\t\tres->device);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_attachp_attachp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_attachp_result, attachp,\n+\t\t\t\t \"attachp\");\n+cmdline_parse_token_string_t cmd_dev_attachp_device =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_attachp_result, device, NULL);\n+\n+cmdline_parse_inst_t cmd_attachp_device = {\n+\t.f = cmd_dev_attachp_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"attach a private device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_attachp_attachp,\n+\t\t(void *)&cmd_dev_attachp_device,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_detach_result {\n+\tcmdline_fixed_string_t detach;\n+\tuint16_t port_id;\n+};\n+\n+static void cmd_dev_detach_parsed(void *parsed_result,\n+\t\t\t\t   struct cmdline *cl,\n+\t\t\t\t   __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_detach_result *res = parsed_result;\n+\tuint16_t port_id = res->port_id;\n+\tchar dev_name[RTE_DEV_NAME_MAX_LEN];\n+\n+\tprintf(\"detaching...\\n\");\n+\tif (!rte_eth_dev_detach(port_id, dev_name))\n+\t\tcmdline_printf(cl, \"detached device at port %d\\n\",\n+\t\t\tport_id);\n+\telse\n+\t\tcmdline_printf(cl, \"failed to dettached at port %d\\n\",\n+\t\t\tport_id);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_detach_detach =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_detach_result, detach,\n+\t\t\t\t \"detach\");\n+cmdline_parse_token_num_t cmd_dev_detach_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_dev_detach_result, port_id, UINT16);\n+\n+cmdline_parse_inst_t cmd_detach_device = {\n+\t.f = cmd_dev_detach_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"detach a device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_detach_detach,\n+\t\t(void *)&cmd_dev_detach_port_id,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_detachp_result {\n+\tcmdline_fixed_string_t detachp;\n+\tuint16_t port_id;\n+};\n+\n+static void cmd_dev_detachp_parsed(void *parsed_result,\n+\t\t\t\t   struct cmdline *cl,\n+\t\t\t\t   __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_detachp_result *res = parsed_result;\n+\tuint16_t port_id = res->port_id;\n+\tchar dev_name[RTE_DEV_NAME_MAX_LEN];\n+\n+\tprintf(\"detaching...\\n\");\n+\tif (!rte_eth_dev_detach_private(port_id, dev_name))\n+\t\tcmdline_printf(cl, \"detached private device at port %d\\n\",\n+\t\t\tport_id);\n+\telse\n+\t\tcmdline_printf(cl, \"failed to detach private device at port %d\\n\",\n+\t\t\tport_id);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_detachp_detachp =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_detachp_result, detachp,\n+\t\t\t\t \"detachp\");\n+cmdline_parse_token_num_t cmd_dev_detachp_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_dev_detachp_result, port_id, UINT16);\n+\n+cmdline_parse_inst_t cmd_detachp_device = {\n+\t.f = cmd_dev_detachp_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"detach a private device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_detachp_detachp,\n+\t\t(void *)&cmd_dev_detachp_port_id,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_lock_result {\n+\tcmdline_fixed_string_t lock;\n+\tuint16_t port_id;\n+};\n+\n+static void cmd_dev_lock_parsed(void *parsed_result,\n+\t\t\t\tstruct cmdline *cl,\n+\t\t\t\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_lock_result *res = parsed_result;\n+\tuint16_t port_id = res->port_id;\n+\tint ret = 0;\n+\n+\tret = rte_eth_dev_lock(res->port_id);\n+\tcmdline_printf(cl, \"lock port %d, ret = %d\\n\", port_id, ret);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_lock_lock =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_lock_result, lock, \"lock\");\n+cmdline_parse_token_num_t cmd_dev_lock_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_dev_lock_result, port_id, UINT16);\n+\n+cmdline_parse_inst_t cmd_lock_device = {\n+\t.f = cmd_dev_lock_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"lock a device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_lock_lock,\n+\t\t(void *)&cmd_dev_lock_port_id,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+\n+struct cmd_dev_unlock_result {\n+\tcmdline_fixed_string_t unlock;\n+\tuint16_t port_id;\n+};\n+\n+static void cmd_dev_unlock_parsed(void *parsed_result,\n+\t\t\t\t  struct cmdline *cl,\n+\t\t\t\t  __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_dev_unlock_result *res = parsed_result;\n+\tuint16_t port_id = res->port_id;\n+\tint ret = 0;\n+\n+\tret = rte_eth_dev_unlock(res->port_id);\n+\tcmdline_printf(cl, \"unlock port %d, ret = %d\\n\", port_id, ret);\n+}\n+\n+cmdline_parse_token_string_t cmd_dev_unlock_unlock =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_dev_unlock_result, unlock,\n+\t\t\t\t \"unlock\");\n+cmdline_parse_token_num_t cmd_dev_unlock_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_dev_unlock_result, port_id, UINT16);\n+\n+cmdline_parse_inst_t cmd_unlock_device = {\n+\t.f = cmd_dev_unlock_parsed,  /* function to call */\n+\t.data = NULL,      /* 2nd arg of func */\n+\t.help_str = \"unlock a device\",\n+\t.tokens = {        /* token list, NULL terminated */\n+\t\t(void *)&cmd_dev_unlock_unlock,\n+\t\t(void *)&cmd_dev_unlock_port_id,\n+\t\tNULL,\n+\t},\n+};\n+\n+/**********************************************************/\n+/**********************************************************/\n+/****** CONTEXT (list of instruction) */\n+\n+cmdline_parse_ctx_t main_ctx[] = {\n+\t(cmdline_parse_inst_t *)&cmd_help,\n+\t(cmdline_parse_inst_t *)&cmd_quit,\n+\t(cmdline_parse_inst_t *)&cmd_list,\n+\t(cmdline_parse_inst_t *)&cmd_attach_device,\n+\t(cmdline_parse_inst_t *)&cmd_detach_device,\n+\t(cmdline_parse_inst_t *)&cmd_attachp_device,\n+\t(cmdline_parse_inst_t *)&cmd_detachp_device,\n+\t(cmdline_parse_inst_t *)&cmd_lock_device,\n+\t(cmdline_parse_inst_t *)&cmd_unlock_device,\n+\tNULL,\n+};\ndiff --git a/examples/multi_process/hotplug_mp/commands.h b/examples/multi_process/hotplug_mp/commands.h\nnew file mode 100644\nindex 000000000..afcf177db\n--- /dev/null\n+++ b/examples/multi_process/hotplug_mp/commands.h\n@@ -0,0 +1,10 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#ifndef _COMMANDS_H_\n+#define _COMMANDS_H_\n+\n+extern cmdline_parse_ctx_t main_ctx[];\n+\n+#endif /* _COMMANDS_H_ */\ndiff --git a/examples/multi_process/hotplug_mp/main.c b/examples/multi_process/hotplug_mp/main.c\nnew file mode 100644\nindex 000000000..d66858078\n--- /dev/null\n+++ b/examples/multi_process/hotplug_mp/main.c\n@@ -0,0 +1,41 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2018 Intel Corporation\n+ */\n+\n+#include <stdio.h>\n+#include <string.h>\n+#include <stdint.h>\n+#include <errno.h>\n+#include <termios.h>\n+#include <sys/queue.h>\n+\n+#include <cmdline_rdline.h>\n+#include <cmdline_parse.h>\n+#include <cmdline_socket.h>\n+#include <cmdline.h>\n+\n+#include <rte_memory.h>\n+#include <rte_eal.h>\n+#include <rte_debug.h>\n+\n+#include \"commands.h\"\n+\n+int main(int argc, char **argv)\n+{\n+\tint ret;\n+\tstruct cmdline *cl;\n+\n+\tret = rte_eal_init(argc, argv);\n+\tif (ret < 0)\n+\t\trte_panic(\"Cannot init EAL\\n\");\n+\n+\tcl = cmdline_stdin_new(main_ctx, \"example> \");\n+\tif (cl == NULL)\n+\t\trte_panic(\"Cannot create cmdline instance\\n\");\n+\tcmdline_interact(cl);\n+\tcmdline_stdin_exit(cl);\n+\n+\trte_eal_cleanup();\n+\n+\treturn 0;\n+}\n",
    "prefixes": [
        "v8",
        "18/19"
    ]
}