Show a patch.

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

{
    "id": 41941,
    "url": "http://patches.dpdk.org/api/patches/41941/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41941/",
    "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"
    },
    "msgid": "<1530267871-7161-4-git-send-email-jia.guo@intel.com>",
    "date": "2018-06-29T10:24:25",
    "name": "[V4,3/9] bus: introduce sigbus handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "f9ae231007b9bf8630d7d16e85146c6ea53473b5",
    "submitter": {
        "id": 507,
        "url": "http://patches.dpdk.org/api/people/507/?format=api",
        "name": "Guo, Jia",
        "email": "jia.guo@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/patch/41941/mbox/",
    "series": [
        {
            "id": 314,
            "url": "http://patches.dpdk.org/api/series/314/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=314",
            "date": "2018-06-29T10:24:22",
            "name": "hot plug failure handle mechanism",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/314/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41941/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41941/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.7.4",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Date": "Fri, 29 Jun 2018 18:24:25 +0800",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "Cc": "jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org,\n\tjia.guo@intel.com, helin.zhang@intel.com",
        "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, bernard.iremonger@intel.com",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<1530267871-7161-1-git-send-email-jia.guo@intel.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Jeff Guo <jia.guo@intel.com>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526367600\"; d=\"scan'208\";a=\"241324424\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E69FE1B503;\n\tFri, 29 Jun 2018 12:27:03 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 1B6751B503\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 12:27:00 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 03:27:00 -0700",
            "from jeffguo-z170x-ud5.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.104.10])\n\tby fmsmga005.fm.intel.com with ESMTP; 29 Jun 2018 03:26:57 -0700"
        ],
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH V4 3/9] bus: introduce sigbus handler",
        "In-Reply-To": "<1530267871-7161-1-git-send-email-jia.guo@intel.com>",
        "Message-Id": "<1530267871-7161-4-git-send-email-jia.guo@intel.com>",
        "X-ExtLoop1": "1",
        "X-BeenThere": "dev@dpdk.org",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "When device be hotplug, if data path still read/write device, the sigbus\nerror will occur, this error need to be handled. So a handler need to be\nhere to capture the signal and handle it correspondingly.\n\nTo handle sigbus error is a bus-specific behavior, this patch introduces\na bus ops so that each kind of bus can implement its own logic.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv4->v3:\nsplit patches to be small and clear.\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 3642aeb..231bd3d 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -181,6 +181,20 @@ typedef int (*rte_bus_parse_t)(const char *name, void *addr);\n typedef int (*rte_bus_hotplug_handler_t)(struct rte_device *dev);\n \n /**\n+ * Implementation a specific sigbus handler, which is responsible\n+ * for handle the sigbus error which is original memory error, or specific\n+ * memory error that caused of hot unplug.\n+ * @param failure_addr\n+ *\tPointer of the fault address of the sigbus error.\n+ *\n+ * @return\n+ *\t0 for success handle the sigbus.\n+ *\t1 for no handle the sigbus.\n+ *\t-1 for failed to handle the sigbus\n+ */\n+typedef int (*rte_bus_sigbus_handler_t)(const void *failure_addr);\n+\n+/**\n  * Bus scan policies\n  */\n enum rte_bus_scan_mode {\n@@ -226,6 +240,8 @@ struct rte_bus {\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+\trte_bus_sigbus_handler_t sigbus_handler; /**< handle sigbus error */\n+\n };\n \n /**\n",
    "prefixes": [
        "V4",
        "3/9"
    ]
}