Show a patch.

GET /api/patches/41939/?format=api
Content-Type: application/json
Vary: Accept

    "id": 41939,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2018-06-29T10:24:23",
    "name": "[V4,1/9] bus: introduce hotplug failure handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2be970f77d1162874ee94972edf00e6592eb97d9",
    "submitter": {
        "id": 507,
        "url": "",
        "name": "Guo, Jia",
        "email": ""
    "delegate": null,
    "mbox": "",
    "series": [
            "id": 314,
            "url": "",
            "web_url": "",
            "date": "2018-06-29T10:24:22",
            "name": "hot plug failure handle mechanism",
            "version": 4,
            "mbox": ""
    "comments": "",
    "check": "fail",
    "checks": "",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.7.4",
        "List-Id": "DPDK patches and discussions <>",
        "Precedence": "list",
        "List-Help": "<>",
        "Date": "Fri, 29 Jun 2018 18:24:23 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "",
        "List-Unsubscribe": "<>,\n\t<>",
        "List-Subscribe": "<>,\n\t<>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "Cc": ",,,\n\,",
        "To": ",,\n\,,\n\,,,\n\,,,\n\,,",
        "Errors-To": "",
        "References": "<>",
        "Sender": "\"dev\" <>",
        "From": "Jeff Guo <>",
        "Return-Path": "<>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526367600\"; d=\"scan'208\";a=\"241324416\"",
        "List-Post": "<>",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id 569111B4F7;\n\tFri, 29 Jun 2018 12:26:57 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id 6743C1B4EF\n\tfor <>; Fri, 29 Jun 2018 12:26:55 +0200 (CEST)",
            "from ([])\n\tby with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 03:26:55 -0700",
            "from (HELO localhost.localdomain)\n\t([])\n\tby with ESMTP; 29 Jun 2018 03:26:51 -0700"
        "List-Archive": "<>",
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH V4 1/9] bus: introduce hotplug failure handler",
        "In-Reply-To": "<>",
        "Message-Id": "<>",
        "X-ExtLoop1": "1",
        "X-BeenThere": "",
        "X-Original-To": ""
    "content": "When a hardware device is removed physically or the software disables\nit, the hotplug occur. App need to call ether dev API to detach the device,\nto unplug the device at the bus level and make access to the device\ninvalid. But the removal of the device from the software lists is not going\nto be instantaneous, at this time if the data path still read/write the\ndevice, it will cause MMIO error and result of the app crash out. So a\nhotplug failure handle mechanism need to be used to guaranty app will not\ncrash out when hot unplug device.\n\nTo handle device hot plug failure is a bus-specific behavior, this patch\nintroduces a bus ops so that each kind of bus can implement its own logic.\n\nSigned-off-by: Jeff Guo <>\n---\nv4->v3:\nsplit patches to be small and clear.\n---\n lib/librte_eal/common/include/rte_bus.h | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex eb9eded..3642aeb 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -168,6 +168,19 @@ typedef int (*rte_bus_unplug_t)(struct rte_device *dev);\n typedef int (*rte_bus_parse_t)(const char *name, void *addr);\n \n /**\n+ * Implementation a specific hot plug handler, which is responsible\n+ * for handle the failure when hot remove the device, guaranty the system\n+ * would not crash in the case.\n+ * @param dev\n+ *\tPointer of the device structure.\n+ *\n+ * @return\n+ *\t0 on success.\n+ *\t!0 on error.\n+ */\n+typedef int (*rte_bus_hotplug_handler_t)(struct rte_device *dev);\n+\n+/**\n  * Bus scan policies\n  */\n enum rte_bus_scan_mode {\n@@ -211,6 +224,8 @@ struct rte_bus {\n \trte_bus_parse_t parse;       /**< Parse a device name */\n \tstruct rte_bus_conf conf;    /**< Bus configuration */\n \trte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */\n+\trte_bus_hotplug_handler_t hotplug_handler;\n+\t\t\t\t\t\t/**< handle hot plug on bus */\n };\n \n /**\n",
    "prefixes": [