get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45842,
    "url": "http://patches.dpdk.org/api/patches/45842/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1538483561-96182-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": "<1538483561-96182-2-git-send-email-jia.guo@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1538483561-96182-2-git-send-email-jia.guo@intel.com",
    "date": "2018-10-02T12:32:35",
    "name": "[v12,1/7] bus: add hot-unplug handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8bb5c64ac3520ea5036f777d40351a29d5f2d4f2",
    "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/project/dpdk/patch/1538483561-96182-2-git-send-email-jia.guo@intel.com/mbox/",
    "series": [
        {
            "id": 1635,
            "url": "http://patches.dpdk.org/api/series/1635/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1635",
            "date": "2018-10-02T12:32:35",
            "name": "hot-unplug failure handle mechanism",
            "version": 12,
            "mbox": "http://patches.dpdk.org/series/1635/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45842/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45842/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 EE2972C2B;\n\tTue,  2 Oct 2018 14:29:16 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 432862BD3\n\tfor <dev@dpdk.org>; Tue,  2 Oct 2018 14:29:15 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Oct 2018 05:29:14 -0700",
            "from jeffguo-s2600wt2.sh.intel.com (HELO localhost.localdomain)\n\t([10.67.110.10])\n\tby fmsmga005.fm.intel.com with ESMTP; 02 Oct 2018 05:28:59 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,331,1534834800\"; d=\"scan'208\";a=\"267734651\"",
        "From": "Jeff Guo <jia.guo@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,\n\tbernard.iremonger@intel.com, \n\tarybchenko@solarflare.com, wenzhuo.lu@intel.com,\n\tanatoly.burakov@intel.com, jerin.jacob@caviumnetworks.com",
        "Cc": "jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org,\n\tjia.guo@intel.com, helin.zhang@intel.com",
        "Date": "Tue,  2 Oct 2018 20:32:35 +0800",
        "Message-Id": "<1538483561-96182-2-git-send-email-jia.guo@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1538483561-96182-1-git-send-email-jia.guo@intel.com>",
        "References": "<1498711073-42917-1-git-send-email-jia.guo@intel.com>\n\t<1538483561-96182-1-git-send-email-jia.guo@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v12 1/7] bus: add hot-unplug handler",
        "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": "A hot-unplug failure and app crash can be caused, when a device is\nhot-unplugged but the application still try to access the device\nby reading or writing from the BARs, which is already invalid but\nstill not timely be unmap or released.\n\nThis patch introduces bus ops to handle hot-unplug failures. Each\nbus can implement its own case-dependent logic to handle the failures.\n\nSigned-off-by: Jeff Guo <jia.guo@intel.com>\n---\nv12->v11:\nno change.\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 b7b5b08..1bb53dc 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+ * Implement a specific hot-unplug handler, which is responsible for\n+ * handle the failure when device be hot-unplugged. When the event of\n+ * hot-unplug be detected, it could call this function to handle\n+ * the hot-unplug failure and avoid app crash.\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_hot_unplug_handler_t)(struct rte_device *dev);\n+\n+/**\n  * Bus scan policies\n  */\n enum rte_bus_scan_mode {\n@@ -212,6 +226,8 @@ struct rte_bus {\n \tstruct rte_bus_conf conf;    /**< Bus configuration */\n \trte_bus_get_iommu_class_t get_iommu_class; /**< Get iommu class */\n \trte_dev_iterate_t dev_iterate; /**< Device iterator. */\n+\trte_bus_hot_unplug_handler_t hot_unplug_handler;\n+\t\t\t\t/**< handle hot-unplug failure on the bus */\n };\n \n /**\n",
    "prefixes": [
        "v12",
        "1/7"
    ]
}