get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26000,
    "url": "https://patches.dpdk.org/api/patches/26000/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170629182206.1072-2-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-2-jblunck@infradead.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170629182206.1072-2-jblunck@infradead.org",
    "date": "2017-06-29T18:21:52",
    "name": "[dpdk-dev,v7,01/15] bus: add bus iterator to find a bus",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e9689a388159c6c7faae84a36b197357e58f0340",
    "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-2-jblunck@infradead.org/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/26000/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/26000/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 4221B568A;\n\tThu, 29 Jun 2017 20:22:33 +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 7950F2BE1\n\tfor <dev@dpdk.org>; Thu, 29 Jun 2017 20:22:27 +0200 (CEST)",
            "by mail-wm0-f65.google.com with SMTP id p204so4072189wmg.1\n\tfor <dev@dpdk.org>; Thu, 29 Jun 2017 11:22:27 -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.25\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 29 Jun 2017 11:22:25 -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=Jxiu7r182sPr/ThENemV7TEZ6lFCcQDuytHDqEYAPb0=;\n\tb=Yj/VPhaUMQEwKOvuBj2zmqnKTSv8CTcxa9C08K5wjKayYqz0HHxcgBM21IsY3Sd2AO\n\tWvLFlAOMFtuWyiM/n5gIcFwkQG+25RWNA/YcglrZEKVEHpjN95jG5Ryi5l4tlM8/JQHE\n\tnohMODnfjpRLJyDwK33cO6rkUKQtH7S8Ow896BazWdbOi6J9s1HOEFtpYYm+pZAtYjWa\n\t/yf+SD/6ZrmPuNmDq1zxnjbp3SxyCGtUwrMGXHzInKsa0kvLxsYnAPu9mWu2UyjwO4ar\n\t5R2/lK4AsvGKqpCK1bsswQpJdtWuSQgY9x4VETxXQwYd3SX9TgRNMaNvmFQn1V4b68mN\n\t+wKg==",
        "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=Jxiu7r182sPr/ThENemV7TEZ6lFCcQDuytHDqEYAPb0=;\n\tb=Z9bG7u2yK09KTXsZZZKIoNTI7mTD4q+7Y6UOQUiIiECNiCcK8u5GY+v4Qi5mreqOKg\n\t5fSm0TngFMJGRv39M/M35ONKzt0DVePrPNeSXxv/3Oo8PEi4RA2twwmaF/yHwdI4vMvR\n\tCpd+ljkOeiB3K2MtgwaC15Z9K2pQEDRZUFU9F8ZhOlqcvbJoU/siQ+HSLLO46+wcAYeX\n\toUaatH8lS79hVy3WH9gGJvYK+N30dcsu+FX+ggajPBEN8rKYpIhdAOfMerJmfZOAHmBh\n\tiwprgM3a/YbnCX+YuIXqod77NiieWkHK5+kmwL2Ypk21Rdl+LISuwtN0mezBWcc1A7lk\n\tjxsw==",
        "X-Gm-Message-State": "AKS2vOz5tnLNjVF/ntpGCmy3FnR2/dobbUHbEUHIfSkJLK+R06tfBGqD\n\tV3KNFdD1YQs8gp3o",
        "X-Received": "by 10.80.170.23 with SMTP id o23mr2667235edc.164.1498760546946; \n\tThu, 29 Jun 2017 11:22:26 -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:52 +0200",
        "Message-Id": "<20170629182206.1072-2-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 01/15] bus: add bus iterator to find a bus",
        "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": "This helper allows to iterate over all registered buses and find one\nmatching data used as parameter.\n\nSigned-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          | 19 +++++++++++\n lib/librte_eal/common/include/rte_bus.h         | 42 +++++++++++++++++++++++++\n lib/librte_eal/linuxapp/eal/rte_eal_version.map |  1 +\n 4 files changed, 63 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 2e48a73..ed09ab2 100644\n--- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map\n+++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map\n@@ -162,6 +162,7 @@ DPDK_17.02 {\n DPDK_17.05 {\n \tglobal:\n \n+\trte_bus_find;\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 8f9baf8..3094daa 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -145,3 +145,22 @@ rte_bus_dump(FILE *f)\n \t\t}\n \t}\n }\n+\n+struct rte_bus *\n+rte_bus_find(const struct rte_bus *start, rte_bus_cmp_t cmp,\n+\t     const void *data)\n+{\n+\tstruct rte_bus *bus = NULL;\n+\tbool start_found = !start;\n+\n+\tTAILQ_FOREACH(bus, &rte_bus_list, next) {\n+\t\tif (!start_found) {\n+\t\t\tif (bus == start)\n+\t\t\t\tstart_found = 1;\n+\t\t\tcontinue;\n+\t\t}\n+\t\tif (cmp(bus, data) == 0)\n+\t\t\tbreak;\n+\t}\n+\treturn bus;\n+}\ndiff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h\nindex 5f47b82..c52b65b 100644\n--- a/lib/librte_eal/common/include/rte_bus.h\n+++ b/lib/librte_eal/common/include/rte_bus.h\n@@ -141,6 +141,48 @@ int rte_bus_probe(void);\n void rte_bus_dump(FILE *f);\n \n /**\n+ * Bus comparison function.\n+ *\n+ * @param bus\n+ *\tBus under test.\n+ *\n+ * @param data\n+ *\tData to compare against.\n+ *\n+ * @return\n+ *\t0 if the bus matches the data.\n+ *\t!0 if the bus does not match.\n+ *\t<0 if ordering is possible and the bus is lower than the data.\n+ *\t>0 if ordering is possible and the bus is greater than the data.\n+ */\n+typedef int (*rte_bus_cmp_t)(const struct rte_bus *bus, const void *data);\n+\n+/**\n+ * Bus iterator to find a particular bus.\n+ *\n+ * This function compares each registered bus to find one 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. To continue a search the bus of a previous search can\n+ * 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+ *\t Data to pass to comparison function.\n+ *\n+ * @return\n+ *\t A pointer to a rte_bus structure or NULL in case no bus matches\n+ */\n+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  * Helper for Bus registration.\n  * The constructor has higher priority than PMD constructors.\n  */\ndiff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\nindex 670bab3..6efa517 100644\n--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map\n@@ -166,6 +166,7 @@ DPDK_17.02 {\n DPDK_17.05 {\n \tglobal:\n \n+\trte_bus_find;\n \trte_cpu_is_supported;\n \trte_intr_free_epoll_fd;\n \trte_log_dump;\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "01/15"
    ]
}