get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26010,
    "url": "https://patches.dpdk.org/api/patches/26010/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170629182206.1072-8-jblunck@infradead.org/",
    "project": {
        "id": 1,
        "url": "https://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": "<20170629182206.1072-8-jblunck@infradead.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170629182206.1072-8-jblunck@infradead.org",
    "date": "2017-06-29T18:21:58",
    "name": "[dpdk-dev,v7,07/15] bus: add bus iterator to find a device",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1b6993752058a16f639ab5f501a787900022eb7d",
    "submitter": {
        "id": 249,
        "url": "https://patches.dpdk.org/api/people/249/?format=api",
        "name": "Jan Blunck",
        "email": "jblunck@infradead.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170629182206.1072-8-jblunck@infradead.org/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/26010/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/26010/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C1CEB7CC5;\n\tThu, 29 Jun 2017 20:23:07 +0200 (CEST)",
            "from mail-wm0-f65.google.com (mail-wm0-f65.google.com\n\t[74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 657E85A98\n\tfor <dev@dpdk.org>; Thu, 29 Jun 2017 20:22:35 +0200 (CEST)",
            "by mail-wm0-f65.google.com with SMTP id u23so4075810wma.2\n\tfor <dev@dpdk.org>; Thu, 29 Jun 2017 11:22:35 -0700 (PDT)",
            "from weierstrass.local ([91.200.110.13])\n\tby smtp.gmail.com with ESMTPSA id\n\te28sm1446366ede.14.2017.06.29.11.22.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 29 Jun 2017 11:22:33 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=AH51ZlVp3YLX6FHMEMsyNBKcRrGh3XOF50RTO1izdOU=;\n\tb=CeDvgR3JeAPX0pywtO6Lcqk9BIhSt32adoH8ph+jDsSzCpzSEjvG/5RGPOG1pF2FlM\n\tt2Xksjh7XR2359wQafNYN0g/AkySC9JXsD1bbsUNvKHLNyv7FTshXMQyj2vz9UzrHwHv\n\tIDoQV6lK34agGvSiztefZOzFPyymXbHXowVJx69B19JWSC2V3iAleBq+vEKY5VLAb4Vv\n\tbN2OMp83u05wCNarRqqhNQfxJaCviz7omEDe2N9ro1VliRu25UaDTzt6LFi2+wW+tCwk\n\tGxegQAm/0nRLOssdS/aHaQXUoOi2YxLNARgvcJS0b+/J4P3UtU5XeElzHYUCnZ2FEini\n\thQNw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=AH51ZlVp3YLX6FHMEMsyNBKcRrGh3XOF50RTO1izdOU=;\n\tb=if1dmMp3UYZ2Mtbys0mrXMp0baUGDaVjFi6BFR2/6B3cM/h9v0DhbxvPdU9BFtjOgh\n\tR99huxA936niPl8udZDlbH7+V51hMxYvg0jMdVB1GwbXd0H+h0iO+6zpkB/bpcjec5ie\n\tmJpl3GBYBZ4Kp5eoOW50vhjbdJ17V5CZ8gI7+94LnYA7lJt+pM1p6AL1HkAbARNyyHkt\n\tuo2tXoA+1IXWJ8GqhfsoUh7FmneGSymRKTVM5dYu5i23XLs2lMGrJniHGQwgj5hZIbGn\n\t3ULdEHLD8TwfwuA3Rq+GtOUhar9NNwymO+ISOoJDLuykoxJD8BjeroDfDEOxrKgP97R6\n\tMRfA==",
        "X-Gm-Message-State": "AKS2vOz4ggZ4wxgq6PLII74KQxmmUvgMbe+OycrW+y01OQfVfBd2/3L2\n\twHKA49eF4O4qpUqV",
        "X-Received": "by 10.80.167.65 with SMTP id h59mr2699636edc.124.1498760554904; \n\tThu, 29 Jun 2017 11:22:34 -0700 (PDT)",
        "From": "Jan Blunck <jblunck@infradead.org>",
        "To": "dev@dpdk.org",
        "Cc": "gaetan.rivet@6wind.com,\n\tshreyansh.jain@nxp.com",
        "Date": "Thu, 29 Jun 2017 20:21:58 +0200",
        "Message-Id": "<20170629182206.1072-8-jblunck@infradead.org>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170629182206.1072-1-jblunck@infradead.org>",
        "References": "<cover.1498577192.git.gaetan.rivet@6wind.com>\n\t<20170629182206.1072-1-jblunck@infradead.org>",
        "Subject": "[dpdk-dev] [PATCH v7 07/15] bus: add bus iterator to find a device",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Jan Blunck <jblunck@infradead.org>\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  1 +\n lib/librte_eal/common/eal_common_bus.c          | 15 ++++++++++++++\n lib/librte_eal/common/include/rte_bus.h         | 26 +++++++++++++++++++++++++\n lib/librte_eal/linuxapp/eal/rte_eal_version.map |  1 +\n 4 files changed, 43 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map\nindex f1a0765..21640d6 100644\n--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map\n+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map\n@@ -164,6 +164,7 @@ DPDK_17.05 {\n \n \trte_bus_find;\n \trte_bus_find_by_device;\n+\trte_bus_find_device;\n \trte_cpu_is_supported;\n \trte_log_dump;\n \trte_log_register;\ndiff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c\nindex 276cce6..61aa947 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -187,3 +187,18 @@ rte_bus_find_by_device(const struct rte_device *dev)\n {\n \treturn rte_bus_find(NULL, bus_find_device, (const void *)dev);\n }\n+\n+struct rte_device *\n+rte_bus_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,\n+\t\t    const void *data)\n+{\n+\tstruct rte_bus *bus;\n+\tstruct rte_device *dev = NULL;\n+\n+\tTAILQ_FOREACH(bus, &rte_bus_list, next) {\n+\t\tdev = bus->find_device(start, cmp, data);\n+\t\tif (dev)\n+\t\t\tbreak;\n+\t}\n+\treturn dev;\n+}\ndiff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex f8b3215..fea0f39 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -210,6 +210,32 @@ struct rte_bus *rte_bus_find(const struct rte_bus *start, rte_bus_cmp_t cmp,\n \t\t\t     const void *data);\n \n /**\n+ * Bus iterator to find a particular device.\n+ *\n+ * This function searches each registered bus to find a device that matches\n+ * the data passed as parameter.\n+ *\n+ * If the comparison function returns zero this function will stop iterating\n+ * over any more buses and devices. To continue a search the device of\n+ * a previous search can be passed via the start parameter.\n+ *\n+ * @param start\n+ *\tStarting point for the iteration.\n+ *\n+ * @param cmp\n+ *\tComparison function.\n+ *\n+ * @param data\n+ *\tData to pass to comparison function.\n+ *\n+ * @return\n+ *\tA pointer to a rte_bus structure or NULL in case no device matches.\n+ */\n+struct rte_device *rte_bus_find_device(const struct rte_device *start,\n+\t\t\t\t       rte_dev_cmp_t cmp,\n+\t\t\t\t       const void *data);\n+\n+/**\n  * Find the registered bus for a particular device.\n  */\n struct rte_bus *rte_bus_find_by_device(const struct rte_device *dev);\ndiff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\nindex 6f77222..e0a056d 100644\n--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n@@ -168,6 +168,7 @@ DPDK_17.05 {\n \n \trte_bus_find;\n \trte_bus_find_by_device;\n+\trte_bus_find_device;\n \trte_cpu_is_supported;\n \trte_intr_free_epoll_fd;\n \trte_log_dump;\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "07/15"
    ]
}