get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41445,
    "url": "http://patches.dpdk.org/api/patches/41445/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180625071745.16810-2-qi.z.zhang@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": "<20180625071745.16810-2-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180625071745.16810-2-qi.z.zhang@intel.com",
    "date": "2018-06-25T07:17:23",
    "name": "[v3,01/23] eal: introduce one device scan",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "90f6362700a3fbbf121ab2e7996e410a7f8bcdf0",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180625071745.16810-2-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 221,
            "url": "http://patches.dpdk.org/api/series/221/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=221",
            "date": "2018-06-25T07:17:22",
            "name": "enable hotplug on multi-process",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/221/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41445/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/41445/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 8006458FE;\n\tMon, 25 Jun 2018 09:17:19 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 4673F4CE4\n\tfor <dev@dpdk.org>; Mon, 25 Jun 2018 09:17:16 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jun 2018 00:17:15 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga001.fm.intel.com with ESMTP; 25 Jun 2018 00:17:13 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,269,1526367600\"; d=\"scan'208\";a=\"66973118\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com",
        "Cc": "konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, \n\tferruh.yigit@intel.com, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com, Qi Zhang <qi.z.zhang@intel.com>",
        "Date": "Mon, 25 Jun 2018 15:17:23 +0800",
        "Message-Id": "<20180625071745.16810-2-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180625071745.16810-1-qi.z.zhang@intel.com>",
        "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180625071745.16810-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 01/23] eal: introduce one device scan",
        "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": "When hot plug a new device, it is not necessary to scan everything\non the bus since the devname and devargs are already there. So new\nrte_bus ops \"scan_one\" is introduced, bus driver can implement this\nfunction to simplify the hotplug process.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n lib/librte_eal/common/eal_common_dev.c  | 17 +++++++++++++----\n lib/librte_eal/common/include/rte_bus.h | 16 ++++++++++++++++\n 2 files changed, 29 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 61cb3b162..1ad033536 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -147,11 +147,20 @@ int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn\n \tif (ret)\n \t\tgoto err_devarg;\n \n-\tret = bus->scan();\n-\tif (ret)\n-\t\tgoto err_devarg;\n+\t/**\n+\t * if bus support to scan specific device by devargs,\n+\t * we don't need to scan all devices on the bus.\n+\t */\n+\tif (bus->scan_one) {\n+\t\tdev = bus->scan_one(da);\n+\t} else {\n+\t\tret = bus->scan();\n+\t\tif (ret)\n+\t\t\tgoto err_devarg;\n+\n+\t\tdev = bus->find_device(NULL, cmp_detached_dev_name, devname);\n+\t}\n \n-\tdev = bus->find_device(NULL, cmp_detached_dev_name, devname);\n \tif (dev == NULL) {\n \t\tRTE_LOG(ERR, EAL, \"Cannot find unplugged device (%s)\\n\",\n \t\t\tdevname);\ndiff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex eb9eded4e..3269ef78b 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -84,6 +84,21 @@ enum rte_iova_mode {\n typedef int (*rte_bus_scan_t)(void);\n \n /**\n+ * Bus specific scan for one specific device attached on the bus.\n+ * For each bus object, the scan would be responsible for finding the specific\n+ * device and adding it to its private device list, and the device object will\n+ * be return also.\n+ *\n+ * @param devargs\n+ *\tDevice arguments be used to identify the device.\n+ *\n+ * @return\n+ *\t!NULL for successful scan\n+ *\tNULL for unsuccessful scan\n+ */\n+typedef struct rte_device *(*rte_bus_scan_one_t)(struct rte_devargs *devargs);\n+\n+/**\n  * Implementation specific probe function which is responsible for linking\n  * devices on that bus with applicable drivers.\n  *\n@@ -204,6 +219,7 @@ struct rte_bus {\n \tTAILQ_ENTRY(rte_bus) next;   /**< Next bus object in linked list */\n \tconst char *name;            /**< Name of the bus */\n \trte_bus_scan_t scan;         /**< Scan for devices attached to bus */\n+\trte_bus_scan_one_t scan_one; /**< Scan one device using devargs */\n \trte_bus_probe_t probe;       /**< Probe devices on bus */\n \trte_bus_find_device_t find_device; /**< Find a device on the bus */\n \trte_bus_plug_t plug;         /**< Probe single device for drivers */\n",
    "prefixes": [
        "v3",
        "01/23"
    ]
}