get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 37845,
    "url": "http://patches.dpdk.org/api/patches/37845/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/4c54df03eba2c16e9fd06112931067cf0500263f.1523404469.git.gaetan.rivet@6wind.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": "<4c54df03eba2c16e9fd06112931067cf0500263f.1523404469.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/4c54df03eba2c16e9fd06112931067cf0500263f.1523404469.git.gaetan.rivet@6wind.com",
    "date": "2018-04-11T00:04:15",
    "name": "[dpdk-dev,v5,14/21] bus/pci: add device matching field id",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "22f49af70068189be1ea98a838d9658dbec0f32e",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/4c54df03eba2c16e9fd06112931067cf0500263f.1523404469.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/37845/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/37845/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 DBC101BB42;\n\tWed, 11 Apr 2018 02:05:25 +0200 (CEST)",
            "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 005A91BAE0\n\tfor <dev@dpdk.org>; Wed, 11 Apr 2018 02:04:58 +0200 (CEST)",
            "by mail-wm0-f68.google.com with SMTP id t67so622438wmt.0\n\tfor <dev@dpdk.org>; Tue, 10 Apr 2018 17:04:58 -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.57\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 10 Apr 2018 17:04:57 -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=92WXlTV7tP9Bcqf0JD/O5rkTSJreSbNwQkGAXS0FzL4=;\n\tb=E9ajR0YPXciWREkMwjJdL9EGjXZAlFvAN7PVeMJiEcgVGNr+ULK1IxL+qf4xsOzila\n\tXftBAeMaIPQzGc4ZR6k8PNvn4M7Pw+yttLZG3XxuZPtUeNDsw5z+PFOx1xb1GoSgA61J\n\tXDHm2Bp8reEILtFbpzzkF4dPmE6vYQU8cWmEYwTb09dHvdS8T0EiTMQGJ/UcnLblvcLs\n\tTX2Z3C/p8PAwqDs8/8zpM5f5NUppwJWvrJRd0STx2ZM3NCNRG+OqgJX4xJjkyJK2vuh+\n\tLwancCFkI6Q42iu/77Q1wPw84kGhKiXEmMnWdhL0PDURuBCKPpIcp3+kJL27r1Stgqyi\n\tkuzQ==",
        "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=92WXlTV7tP9Bcqf0JD/O5rkTSJreSbNwQkGAXS0FzL4=;\n\tb=TAXR5XN9sLbixf56H/APvfXkn4u1BDheowZgKBgTVHviiu6foCXR7grLs1G8WnPb4I\n\t5NoNiA77HwTbaKxHh1g6Tyrq9roIR8OlMxlEjFIMdQ+xsjW6R5Y56LSJYutIX0pmT+8v\n\tHf7VuwtdLRHTZIXVYciHGI9xq3U2K8e9VWRQBp79/fDs8AG+QMgwC1dezXVTi/7uFZd8\n\tMRSNxMGB96hsi0QL3KrCbNfLbXp2yS8ZceFZUW8trKbTBdlwDMGfsSRHTEQTWS2lb3tn\n\t25X4fEgsrItGlFrn70RL69mKv+EsWI7yJu2q/nKiEKuQRJ9V8AJAR96mQ+6n/XWLqJKn\n\tOYow==",
        "X-Gm-Message-State": "ALQs6tAa4TlwJN4lb8pU795tv0HJso0cPQnbeM6q1tiu5DZAiewwuxim\n\tTgj+AWGo5wPWky38LDdxQF1fwZlg",
        "X-Google-Smtp-Source": "AIpwx4/TI6WTj+sRz2pnI2Ugor7X2EXxy0Ik9RGo+80cj4KkhTO0ZGDy4At9W0Whx/g9KoWS/LpFbA==",
        "X-Received": "by 10.28.14.9 with SMTP id 9mr862641wmo.127.1523405098342;\n\tTue, 10 Apr 2018 17:04:58 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Wed, 11 Apr 2018 02:04:15 +0200",
        "Message-Id": "<4c54df03eba2c16e9fd06112931067cf0500263f.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 14/21] bus/pci: add device matching field id",
        "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": "The PCI bus can now parse a matching field \"id\" as follows:\n\n   \"bus=pci,id=0000:00:00.0\"\n\n           or\n\n   \"bus=pci,id=00:00.0\"\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n drivers/bus/pci/pci_common.c | 28 ++++++++++++++++++++++++++--\n 1 file changed, 26 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex bd9ecddc6..3666e4caa 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -499,21 +499,45 @@ pci_unplug(struct rte_device *dev)\n }\n \n enum pci_params {\n+\tRTE_PCI_PARAMS_ID,\n \tRTE_PCI_PARAMS_MAX,\n };\n \n static const char * const pci_params_keys[] = {\n+\t[RTE_PCI_PARAMS_ID] = \"id\",\n \t[RTE_PCI_PARAMS_MAX] = NULL,\n };\n \n static int\n+pci_addr_kv_cmp(const char *key __rte_unused,\n+\t\tconst char *value,\n+\t\tvoid *_addr2)\n+{\n+\tstruct rte_pci_addr _addr1;\n+\tstruct rte_pci_addr *addr1 = &_addr1;\n+\tstruct rte_pci_addr *addr2 = _addr2;\n+\n+\tif (rte_pci_addr_parse(value, addr1))\n+\t\treturn -1;\n+\treturn rte_pci_addr_cmp(addr1, addr2);\n+}\n+\n+static int\n pci_dev_match(const struct rte_device *dev,\n \t      const void *_kvlist)\n {\n \tconst struct rte_kvargs *kvlist = _kvlist;\n+\tconst struct rte_pci_device *pdev;\n \n-\t(void) dev;\n-\t(void) kvlist;\n+\tif (kvlist == NULL)\n+\t\t/* Empty string matches everything. */\n+\t\treturn 0;\n+\tpdev = RTE_DEV_TO_PCI_CONST(dev);\n+\t/* if any field does not match. */\n+\tif (rte_kvargs_process(kvlist, \"id\",\n+\t\t\t       &pci_addr_kv_cmp,\n+\t\t\t       (void *)(intptr_t)&pdev->addr))\n+\t\treturn 1;\n \treturn 0;\n }\n \n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "14/21"
    ]
}