get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26591,
    "url": "http://patches.dpdk.org/api/patches/26591/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1749d93aa8ee84c30fc698fe9f5d33c46ca18e53.1499385282.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": "<1749d93aa8ee84c30fc698fe9f5d33c46ca18e53.1499385282.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1749d93aa8ee84c30fc698fe9f5d33c46ca18e53.1499385282.git.gaetan.rivet@6wind.com",
    "date": "2017-07-07T00:09:12",
    "name": "[dpdk-dev,v6,05/22] pci: use given name as generic name",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6b6d19e325ca2b07fbd0a064a992085c8dadc331",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1749d93aa8ee84c30fc698fe9f5d33c46ca18e53.1499385282.git.gaetan.rivet@6wind.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/26591/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/26591/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 4A50B7CB1;\n\tFri,  7 Jul 2017 02:10:15 +0200 (CEST)",
            "from mail-wr0-f180.google.com (mail-wr0-f180.google.com\n\t[209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 78DFB532C\n\tfor <dev@dpdk.org>; Fri,  7 Jul 2017 02:10:01 +0200 (CEST)",
            "by mail-wr0-f180.google.com with SMTP id k67so24224011wrc.2\n\tfor <dev@dpdk.org>; Thu, 06 Jul 2017 17:10:01 -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\tf45sm2391166wrf.2.2017.07.06.17.09.59\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 06 Jul 2017 17:09:59 -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=F4qOuNBwTxMwcEufGvo52z2PKIpfp4iF3J0N+o63+pk=;\n\tb=sXd4VY5dquhzaUT3Ca3ag1S7E6k/LsDFJTBeGwku9UjsXx/GlceDLo6uzqtyk27nwq\n\t35JXuDUcxcc5fNUAJb2T6v0xSdlFGoierU/ofbdzzXQt2OGCBP/XJXiy8R54Fh8YGGyZ\n\tUfkafYPGrbR1HVjUAAGE95sJQhcGj4eSy7qXPTviupWEMpJHjScFiAScQvjodao+XU/t\n\t+Wdw8C9Kq1/6gD16cTUTW6QLwsfyOYvIWYEhwgDcIlJMisPjL2nH3PnT1vzNbtZcHVl5\n\tNIWZWSeXbTaX13wUpKgXvVVgfcnC7MFZ84Zc+YcgRuIIYL6nBXJ1w4RtrSGoE9q5MHop\n\tynxg==",
        "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=F4qOuNBwTxMwcEufGvo52z2PKIpfp4iF3J0N+o63+pk=;\n\tb=oW1/uhculBvlpnw4jsmWuXGmDbjOplE7gnHXGupNVrYx9LEcHmY/aY0vq/nFp1zFa7\n\tqqm2gukE4YYU6eoJQglg3tYVkYbim5sn60jwTWWxSdMPBQg3KjwSIzj9TTmSHFUh9fIx\n\tZkeN22zIWeOv3zuvoElBTtYpd7CCoAZT/J0gdRf+zXR7nwIGe/2lXHeI7r+tpFuM8+8F\n\tAuQ+13l+5OOvwRzc068G510f3rbXT0Jr+tK5IEictFlP0CMEowIXyNmhca+hlqQ26Kd7\n\tZn1yAKOqxMIOc+D3yvmSbs+m+lLsdRZxXfbaIxvAgzsZkCZHcl48+26KWXFfnM/NkeNz\n\tlNrg==",
        "X-Gm-Message-State": "AIVw110b2BJSdI12geycGP4udv1a0t5ZwviZs+S4YqBC81QjmV0RaxeY\n\tJZ7yPuoYCeBZObj3Kqo=",
        "X-Received": "by 10.28.238.219 with SMTP id j88mr263610wmi.33.1499386200700;\n\tThu, 06 Jul 2017 17:10:00 -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": "Fri,  7 Jul 2017 02:09:12 +0200",
        "Message-Id": "<1749d93aa8ee84c30fc698fe9f5d33c46ca18e53.1499385282.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": [
            "<cover.1499385281.git.gaetan.rivet@6wind.com>",
            "<cover.1499385281.git.gaetan.rivet@6wind.com>"
        ],
        "References": [
            "<cover.1496877105.git.gaetan.rivet@6wind.com>\n\t<cover.1499385281.git.gaetan.rivet@6wind.com>",
            "<cover.1499385281.git.gaetan.rivet@6wind.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v6 05/22] pci: use given name as generic name",
        "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": "The PCI device is referenced by other DPDK systems by the name of its\nparameter, not by the system name.\n\nFixes: beec692c5157 (\"eal: add name field to generic device\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_eal/bsdapp/eal/eal_pci.c    |  4 ++--\n lib/librte_eal/common/eal_common_pci.c | 21 ++++++++++++++++-----\n lib/librte_eal/common/eal_private.h    |  5 +++++\n lib/librte_eal/linuxapp/eal/eal_pci.c  |  4 ++--\n 4 files changed, 25 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c\nindex e321461..97a88ec 100644\n--- a/lib/librte_eal/bsdapp/eal/eal_pci.c\n+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c\n@@ -282,8 +282,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)\n \t/* FreeBSD has no NUMA support (yet) */\n \tdev->device.numa_node = 0;\n \n-\trte_pci_device_name(&dev->addr, dev->name, sizeof(dev->name));\n-\tdev->device.name = dev->name;\n+\tpci_name_set(dev);\n \n \t/* FreeBSD has only one pass through driver */\n \tdev->kdrv = RTE_KDRV_NIC_UIO;\n@@ -334,6 +333,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)\n \t\t\t} else { /* already registered */\n \t\t\t\tdev2->kdrv = dev->kdrv;\n \t\t\t\tdev2->max_vfs = dev->max_vfs;\n+\t\t\t\tpci_name_set(dev2);\n \t\t\t\tmemmove(dev2->mem_resource,\n \t\t\t\t\tdev->mem_resource,\n \t\t\t\t\tsizeof(dev->mem_resource));\ndiff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c\nindex e03a407..ab01749 100644\n--- a/lib/librte_eal/common/eal_common_pci.c\n+++ b/lib/librte_eal/common/eal_common_pci.c\n@@ -88,6 +88,21 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev)\n \treturn NULL;\n }\n \n+void\n+pci_name_set(struct rte_pci_device *dev)\n+{\n+\tstruct rte_devargs *devargs;\n+\n+\trte_pci_device_name(&dev->addr,\n+\t\t\tdev->name, sizeof(dev->name));\n+\tdevargs = pci_devargs_lookup(dev);\n+\tdev->device.devargs = devargs;\n+\tif (devargs != NULL)\n+\t\tdev->device.name = dev->device.devargs->name;\n+\telse\n+\t\tdev->device.name = dev->name;\n+}\n+\n /* map a particular resource from a file */\n void *\n pci_map_resource(void *requested_addr, int fd, off_t offset, size_t size,\n@@ -396,11 +411,7 @@ rte_pci_probe(void)\n \tFOREACH_DEVICE_ON_PCIBUS(dev) {\n \t\tprobed++;\n \n-\t\t/* set devargs in PCI structure */\n-\t\tdevargs = pci_devargs_lookup(dev);\n-\t\tif (devargs != NULL)\n-\t\t\tdev->device.devargs = devargs;\n-\n+\t\tdevargs = dev->device.devargs;\n \t\t/* probe all or only whitelisted devices */\n \t\tif (probe_all)\n \t\t\tret = pci_probe_all_drivers(dev);\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 0836339..597d82e 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -113,6 +113,11 @@ struct rte_pci_driver;\n struct rte_pci_device;\n \n /**\n+ * Find the name of a PCI device.\n+ */\n+void pci_name_set(struct rte_pci_device *dev);\n+\n+/**\n  * Add a PCI device to the PCI Bus (append to PCI Device list). This function\n  * also updates the bus references of the PCI Device (and the generic device\n  * object embedded within.\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c\nindex 7d9e1a9..556ae2c 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_pci.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c\n@@ -324,8 +324,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)\n \t\tdev->device.numa_node = 0;\n \t}\n \n-\trte_pci_device_name(addr, dev->name, sizeof(dev->name));\n-\tdev->device.name = dev->name;\n+\tpci_name_set(dev);\n \n \t/* parse resources */\n \tsnprintf(filename, sizeof(filename), \"%s/resource\", dirname);\n@@ -373,6 +372,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)\n \t\t\t} else { /* already registered */\n \t\t\t\tdev2->kdrv = dev->kdrv;\n \t\t\t\tdev2->max_vfs = dev->max_vfs;\n+\t\t\t\tpci_name_set(dev2);\n \t\t\t\tmemmove(dev2->mem_resource, dev->mem_resource,\n \t\t\t\t\tsizeof(dev->mem_resource));\n \t\t\t\tfree(dev);\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "05/22"
    ]
}