Show a patch.

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

{
    "id": 42597,
    "url": "http://patches.dpdk.org/api/patches/42597/",
    "web_url": "http://patches.dpdk.org/patch/42597/",
    "project": {
        "id": 1,
        "url": "http://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": "<1531116091-18030-2-git-send-email-jia.guo@intel.com>",
    "date": "2018-07-09T06:01:25",
    "name": "[v6,1/7] bus: add hotplug failure handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0c91b861d9a847d62cbe28c2fc76a08d9dfb30ba",
    "submitter": {
        "id": 507,
        "url": "http://patches.dpdk.org/api/people/507/",
        "name": "Jeff Guo",
        "email": "jia.guo@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/42597/mbox/",
    "series": [
        {
            "id": 468,
            "url": "http://patches.dpdk.org/api/series/468/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=468",
            "date": "2018-07-09T06:01:24",
            "name": "hotplug failure handle mechanism",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/468/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/42597/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/42597/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Mailer": "git-send-email 2.7.4",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AE8D41B056;\n\tMon,  9 Jul 2018 08:03:57 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id C31C87CE7\n\tfor <dev@dpdk.org>; Mon,  9 Jul 2018 08:03:55 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jul 2018 23:03:55 -0700",
            "from jeffguo-z170x-ud5.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.104.10])\n\tby orsmga008.jf.intel.com with ESMTP; 08 Jul 2018 23:03:52 -0700"
        ],
        "References": "<1531116091-18030-1-git-send-email-jia.guo@intel.com>",
        "X-Amp-File-Uploaded": "False",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1531116091-18030-2-git-send-email-jia.guo@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,329,1526367600\"; d=\"scan'208\";a=\"55386227\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": "<1531116091-18030-1-git-send-email-jia.guo@intel.com>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "stephen@networkplumber.org, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com,\n\tgaetan.rivet@6wind.com, jingjing.wu@intel.com, thomas@monjalon.net,\n\tmotih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com,\n\tqi.z.zhang@intel.com, shaopeng.he@intel.com,\n\tbernard.iremonger@intel.com, arybchenko@solarflare.com",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Mon,  9 Jul 2018 14:01:25 +0800",
        "Cc": "jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org,\n\tjia.guo@intel.com, helin.zhang@intel.com",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v6 1/7] bus: add hotplug failure handler"
    },
    "content": "When device be hotplug out, if app still continue to access device by mmio,\nit will cause of memory failure and result the system crash.\n\nThis patch introduces a bus ops to handle device hotplug failure, it is a\nbus specific behavior, so each kind of bus can implement its own logic case\nby case.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\nAcked-by: Shaopeng He <shaopeng.he@intel.com>\n---\nv6->v5:\nrefine some description of bus ops\n---\n lib/librte_eal/common/include/rte_bus.h | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex eb9eded..e3a55a8 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,20 @@ 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 hotplug failure handler, which is responsible\n+ * for handle the failure when the device be hotplug out from the bus. When\n+ * hotplug removal event be detected, it could call this function to handle\n+ * failure and guaranty the system 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_failure_handler_t)(struct rte_device *dev);\n+\n+/**\n  * Bus scan policies\n  */\n enum rte_bus_scan_mode {\n@@ -211,6 +225,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_failure_handler_t hotplug_failure_handler;\n+\t\t\t\t\t/**< handle hotplug failure on bus */\n };\n \n /**\n",
    "prefixes": [
        "v6",
        "1/7"
    ]
}