get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48802,
    "url": "http://patches.dpdk.org/api/patches/48802/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1544773540-89825-2-git-send-email-jia.guo@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": "<1544773540-89825-2-git-send-email-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1544773540-89825-2-git-send-email-jia.guo@intel.com",
    "date": "2018-12-14T07:45:38",
    "name": "[1/3] eal: add --dev-hotplug option",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "2dc6ed73ca33fd18d92b0f110d2cd42c2b56b6d3",
    "submitter": {
        "id": 507,
        "url": "http://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@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/1544773540-89825-2-git-send-email-jia.guo@intel.com/mbox/",
    "series": [
        {
            "id": 2771,
            "url": "http://patches.dpdk.org/api/series/2771/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2771",
            "date": "2018-12-14T07:45:37",
            "name": "use a common eal device event for hot-unplug",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/2771/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/48802/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/48802/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 68A861B6F0;\n\tFri, 14 Dec 2018 08:41:34 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 543CE1B6DA\n\tfor <dev@dpdk.org>; Fri, 14 Dec 2018 08:41:32 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Dec 2018 23:41:31 -0800",
            "from jeffguo-s2600wt2.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.110.10])\n\tby orsmga006.jf.intel.com with ESMTP; 13 Dec 2018 23:41:28 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,352,1539673200\"; d=\"scan'208\";a=\"100641741\"",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "To": "bernard.iremonger@intel.com, wenzhuo.lu@intel.com, shahafs@mellanox.com, \n\tthomas@monjalon.net, matan@mellanox.com",
        "Cc": "ferruh.yigit@intel.com, konstantin.ananyev@intel.com, dev@dpdk.org,\n\tjia.guo@intel.com, stephen@networkplumber.org, gaetan.rivet@6wind.com,\n\tqi.z.zhang@intel.com, arybchenko@solarflare.com,\n\tbruce.richardson@intel.com, shaopeng.he@intel.com,\n\tanatoly.burakov@intel.com",
        "Date": "Fri, 14 Dec 2018 15:45:38 +0800",
        "Message-Id": "<1544773540-89825-2-git-send-email-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1544773540-89825-1-git-send-email-jia.guo@intel.com>",
        "References": "<1544773540-89825-1-git-send-email-jia.guo@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 1/3] eal: add --dev-hotplug option",
        "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": "This command-line option will enable hotplug event detecting and enable\nhotplug handling for device hotplug.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\n lib/librte_eal/bsdapp/eal/eal.c            | 16 ++++++++++++++++\n lib/librte_eal/common/eal_common_options.c |  5 +++++\n lib/librte_eal/common/eal_internal_cfg.h   |  1 +\n lib/librte_eal/common/eal_options.h        |  4 +++-\n lib/librte_eal/linuxapp/eal/eal.c          | 16 ++++++++++++++++\n 5 files changed, 41 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex b8152a7..b9c29e4 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -699,6 +699,22 @@ rte_eal_init(int argc, char **argv)\n #endif\n \t}\n \n+\tif (internal_config.dev_hotplug) {\n+\t\tret = rte_dev_hotplug_handle_enable();\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\"fail to enable hotplug handling.\");\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tret = rte_dev_event_monitor_start();\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\"fail to start device event monitoring.\");\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n \trte_srand(rte_rdtsc());\n \n \t/* in secondary processes, memory init may allocate additional fbarrays\ndiff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex e31eca5..70cb374 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -79,6 +79,7 @@ eal_long_options[] = {\n \t{OPT_VMWARE_TSC_MAP,    0, NULL, OPT_VMWARE_TSC_MAP_NUM   },\n \t{OPT_LEGACY_MEM,        0, NULL, OPT_LEGACY_MEM_NUM       },\n \t{OPT_SINGLE_FILE_SEGMENTS, 0, NULL, OPT_SINGLE_FILE_SEGMENTS_NUM},\n+\t{OPT_DEV_HOTPLUG,       0, NULL, OPT_DEV_HOTPLUG_NUM      },\n \t{0,                     0, NULL, 0                        }\n };\n \n@@ -1309,6 +1310,9 @@ eal_parse_common_option(int opt, const char *optarg,\n \t\t\treturn -1;\n \t\t}\n \t\tbreak;\n+\tcase OPT_DEV_HOTPLUG_NUM:\n+\t\tconf->dev_hotplug = 1;\n+\t\tbreak;\n \n \t/* don't know what to do, leave this to caller */\n \tdefault:\n@@ -1476,6 +1480,7 @@ eal_common_usage(void)\n \t       \"  -h, --help          This help\\n\"\n \t       \"  --\"OPT_IN_MEMORY\"   Operate entirely in memory. This will\\n\"\n \t       \"                      disable secondary process support\\n\"\n+\t       \"  --\"OPT_DEV_HOTPLUG\" Enable device hotplug\\n\"\n \t       \"\\nEAL options for DEBUG use only:\\n\"\n \t       \"  --\"OPT_HUGE_UNLINK\"       Unlink hugepage files after init\\n\"\n \t       \"  --\"OPT_NO_HUGE\"           Use malloc instead of hugetlbfs\\n\"\ndiff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h\nindex 737f17e..d160ee3 100644\n--- a/lib/librte_eal/common/eal_internal_cfg.h\n+++ b/lib/librte_eal/common/eal_internal_cfg.h\n@@ -73,6 +73,7 @@ struct internal_config {\n \tenum rte_iova_mode iova_mode ;    /**< Set IOVA mode on this system  */\n \tvolatile unsigned int init_complete;\n \t/**< indicates whether EAL has completed initialization */\n+\tvolatile unsigned dev_hotplug;    /**< true to enable device hotplug */\n };\n extern struct internal_config internal_config; /**< Global EAL configuration. */\n \ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex 5271f94..4d8a12e 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -65,7 +65,9 @@ enum {\n \tOPT_SINGLE_FILE_SEGMENTS_NUM,\n #define OPT_IOVA_MODE          \"iova-mode\"\n \tOPT_IOVA_MODE_NUM,\n-\tOPT_LONG_MAX_NUM\n+\tOPT_LONG_MAX_NUM,\n+#define OPT_DEV_HOTPLUG\t      \"dev-hotplug\"\n+\tOPT_DEV_HOTPLUG_NUM,\n };\n \n extern const char eal_short_options[];\ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex 361744d..8de7401 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -960,6 +960,22 @@ rte_eal_init(int argc, char **argv)\n #endif\n \t}\n \n+\tif (internal_config.dev_hotplug) {\n+\t\tret = rte_dev_hotplug_handle_enable();\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\"fail to enable hotplug handling.\");\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tret = rte_dev_event_monitor_start();\n+\t\tif (ret) {\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\"fail to start device event monitoring.\");\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n \trte_srand(rte_rdtsc());\n \n \tif (rte_eal_log_init(logid, internal_config.syslog_facility) < 0) {\n",
    "prefixes": [
        "1/3"
    ]
}