get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 37843,
    "url": "https://patches.dpdk.org/api/patches/37843/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/7f268a74f810f50e4451c1f0dbea656baa861e4c.1523404469.git.gaetan.rivet@6wind.com/",
    "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": "<7f268a74f810f50e4451c1f0dbea656baa861e4c.1523404469.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/7f268a74f810f50e4451c1f0dbea656baa861e4c.1523404469.git.gaetan.rivet@6wind.com",
    "date": "2018-04-11T00:04:13",
    "name": "[dpdk-dev,v5,12/21] bus/pci: fix find device implementation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fd1606b9df6abb3077aed58a23a193b7396103f6",
    "submitter": {
        "id": 269,
        "url": "https://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/7f268a74f810f50e4451c1f0dbea656baa861e4c.1523404469.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/37843/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/37843/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 9E7A31BB3A;\n\tWed, 11 Apr 2018 02:05:20 +0200 (CEST)",
            "from mail-wr0-f194.google.com (mail-wr0-f194.google.com\n\t[209.85.128.194]) by dpdk.org (Postfix) with ESMTP id C88721BAD8\n\tfor <dev@dpdk.org>; Wed, 11 Apr 2018 02:04:56 +0200 (CEST)",
            "by mail-wr0-f194.google.com with SMTP id u46so30145wrc.11\n\tfor <dev@dpdk.org>; Tue, 10 Apr 2018 17:04:56 -0700 (PDT)",
            "from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\t39sm7626563wry.89.2018.04.10.17.04.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 10 Apr 2018 17:04:55 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:in-reply-to:references;\n\tbh=/eyQ2v0oXHedW7lyFQR0H1RCpUBqJoevhVBtnUxXgNY=;\n\tb=hHJ8sn4V93fsnIoLNZ5mLkzH09KvRw5mj9tfIPqJJKNtx7QoH78KjXm6Ks+gGByJFk\n\tspEfIF+hyoRl+WoYu03CHvIpxJJNbVNxfjDw9tBxiDaH1OXLUZzEaaJB4284hHBkeka7\n\tgLy7xQ5thRnGwmJyc/9b0oT+uTGV1mhL1m27XLdgCUCH/+N1Ee6D5qCsEAkyRuRUbFFs\n\tot7rYAQwuzKP37jmvQrFrjTQIDDwWViyJhgU6U9r4S+vHC0pI5aAgOZ5OBz9SIid3/Jq\n\tISsRG24h/VuI711Jmp0M3b70jJ/Fl+EqBoNeEmX0Hyc8ju/XcrsqquWBRdCLMTg3TK0/\n\tNxnw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:in-reply-to:references;\n\tbh=/eyQ2v0oXHedW7lyFQR0H1RCpUBqJoevhVBtnUxXgNY=;\n\tb=PS5x/kTCkxQDmTFrIQUd0KI4WLjYA6ekA5IJKN8hZUgVi9tLfplPm9qoV7Zg0HBpR6\n\tZrF/j/G9GU51hjctD60S165tzlgc+C4q564dyYtflyPL0Fc2DIINiyZH8bCu8VP2Hos1\n\tHf4HMxRoqzbovTN3fCIe3WmPiGRH6u/DhD07cxGpKjX+caDmWEKjr/ers3bA0TaLeExj\n\tgyk1fx76U6aDZfl0M/85OYrYEytmpuGV7N1N1fiUD17uLoLn3BEL7xjA8M+YmEOZdSAB\n\tQzpyfh7wbBjKzui5muWkJi0r9EgHMQVJxEbULkBkROgMkMxpDuEJPZRs+bLeZz1k5qt0\n\t7O6A==",
        "X-Gm-Message-State": "ALQs6tD0lD1M0g1Vvj8SVFf09KjYgXTA54M4vseKjuOcRq5A/Z4dMfDz\n\ti9hiQMC0UJ8IxQQK3EsYbVom0cyI",
        "X-Google-Smtp-Source": "AIpwx4/ELMBaRjpshBnydgXZGmq/vZImd3fQjet1jayi/RdJLx73X79oNjuaxLqmM8PPSjHbmXlVqA==",
        "X-Received": "by 10.223.138.138 with SMTP id y10mr1606199wry.44.1523405096114; \n\tTue, 10 Apr 2018 17:04:56 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>,\n\tstable@dpdk.org",
        "Date": "Wed, 11 Apr 2018 02:04:13 +0200",
        "Message-Id": "<7f268a74f810f50e4451c1f0dbea656baa861e4c.1523404469.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": [
            "<cover.1523404469.git.gaetan.rivet@6wind.com>",
            "<cover.1523404469.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1522358419.git.gaetan.rivet@6wind.com>\n\t<cover.1523404469.git.gaetan.rivet@6wind.com>",
            "<cover.1523404469.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v5 12/21] bus/pci: fix find device implementation",
        "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://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": "<https://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": "If start is set, and a device before it matches the data\npassed for comparison, then this first device is returned.\n\nThis induces potentially infinite loops.\n\nFixes: c7fe1eea8a74 (\"bus: simplify finding starting point\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n drivers/bus/pci/pci_common.c  | 21 ++++++++++++---------\n drivers/bus/pci/rte_bus_pci.h |  3 +++\n 2 files changed, 15 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex 2a00f365a..2c45f8151 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -459,17 +459,20 @@ static struct rte_device *\n pci_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,\n \t\tconst void *data)\n {\n-\tstruct rte_pci_device *dev;\n+\tconst struct rte_pci_device *pstart;\n+\tstruct rte_pci_device *pdev;\n \n-\tFOREACH_DEVICE_ON_PCIBUS(dev) {\n-\t\tif (start && &dev->device == start) {\n-\t\t\tstart = NULL; /* starting point found */\n-\t\t\tcontinue;\n-\t\t}\n-\t\tif (cmp(&dev->device, data) == 0)\n-\t\t\treturn &dev->device;\n+\tif (start != NULL) {\n+\t\tpstart = RTE_DEV_TO_PCI_CONST(start);\n+\t\tpdev = TAILQ_NEXT(pstart, next);\n+\t} else {\n+\t\tpdev = TAILQ_FIRST(&rte_pci_bus.device_list);\n+\t}\n+\twhile (pdev != NULL) {\n+\t\tif (cmp(&pdev->device, data) == 0)\n+\t\t\treturn &pdev->device;\n+\t\tpdev = TAILQ_NEXT(pdev, next);\n \t}\n-\n \treturn NULL;\n }\n \ndiff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h\nindex 357afb912..458e6d076 100644\n--- a/drivers/bus/pci/rte_bus_pci.h\n+++ b/drivers/bus/pci/rte_bus_pci.h\n@@ -74,6 +74,9 @@ struct rte_pci_device {\n  */\n #define RTE_DEV_TO_PCI(ptr) container_of(ptr, struct rte_pci_device, device)\n \n+#define RTE_DEV_TO_PCI_CONST(ptr) \\\n+\tcontainer_of(ptr, const struct rte_pci_device, device)\n+\n #define RTE_ETH_DEV_TO_PCI(eth_dev)\tRTE_DEV_TO_PCI((eth_dev)->device)\n \n /** Any PCI device identifier (vendor, device, ...) */\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "12/21"
    ]
}