get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86059,
    "url": "https://patches.dpdk.org/api/patches/86059/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1609949855-23817-10-git-send-email-xuemingl@nvidia.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": "<1609949855-23817-10-git-send-email-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1609949855-23817-10-git-send-email-xuemingl@nvidia.com",
    "date": "2021-01-06T16:17:35",
    "name": "[v2,9/9] eal: allow PCI device with different representors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "acbaf8d72e65104c720e213d7376efd827eb030c",
    "submitter": {
        "id": 1904,
        "url": "https://patches.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1609949855-23817-10-git-send-email-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 14559,
            "url": "https://patches.dpdk.org/api/series/14559/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14559",
            "date": "2021-01-06T16:17:28",
            "name": "support SubFunction representor",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/14559/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86059/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/86059/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id ED3CBA09FF;\n\tWed,  6 Jan 2021 17:18:26 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3C435140E15;\n\tWed,  6 Jan 2021 17:18:10 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id 5C45B140E04\n for <dev@dpdk.org>; Wed,  6 Jan 2021 17:18:05 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n xuemingl@nvidia.com) with SMTP; 6 Jan 2021 18:18:01 +0200",
            "from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 106GI0Mo017451;\n Wed, 6 Jan 2021 18:18:01 +0200"
        ],
        "From": "Xueming Li <xuemingl@nvidia.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Olivier Matz <olivier.matz@6wind.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "Cc": "dev@dpdk.org, xuemingl@nvidia.com, Asaf Penso <asafp@nvidia.com>",
        "Date": "Wed,  6 Jan 2021 16:17:35 +0000",
        "Message-Id": "<1609949855-23817-10-git-send-email-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": [
            "<1609949855-23817-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "References": [
            "<1609949855-23817-1-git-send-email-xuemingl@nvidia.com>",
            "<1608303356-13089-2-git-send-email-xuemingl@nvidia.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 9/9] eal: allow PCI device with different\n representors",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When probing same PCI device with different representor arguments, PCI\nbus on probed first devargs, ignored other allowed devices with\ndifferent representor arguments.\n\nThis patch iterates all devargs and try them all after PCI bus scan.\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\n---\n lib/librte_eal/common/eal_common_bus.c | 25 +++++++++++++++++++++++++\n 1 file changed, 25 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c\nindex baa5b532af..47c0243647 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -10,6 +10,7 @@\n #include <rte_debug.h>\n #include <rte_string_fns.h>\n #include <rte_errno.h>\n+#include <rte_devargs.h>\n \n #include \"eal_private.h\"\n \n@@ -56,12 +57,22 @@ rte_bus_scan(void)\n \treturn 0;\n }\n \n+static int\n+cmp_dev_name(const struct rte_device *dev, const void *_name)\n+{\n+\tconst char *name = _name;\n+\n+\treturn strcmp(dev->name, name);\n+}\n+\n /* Probe all devices of all buses */\n int\n rte_bus_probe(void)\n {\n \tint ret;\n \tstruct rte_bus *bus, *vbus = NULL;\n+\tstruct rte_devargs *da;\n+\tstruct rte_device *dev;\n \n \tTAILQ_FOREACH(bus, &rte_bus_list, next) {\n \t\tif (!strcmp(bus->name, \"vdev\")) {\n@@ -82,6 +93,20 @@ rte_bus_probe(void)\n \t\t\t\tvbus->name);\n \t}\n \n+\t/* For devargs with same name but different arguments, try them all. */\n+\tRTE_EAL_DEVARGS_FOREACH(\"pci\", da) {\n+\t\tdev = da->bus->find_device(NULL, cmp_dev_name, da->name);\n+\t\tif (!dev || !rte_dev_is_probed(dev) || dev->devargs == da)\n+\t\t\tcontinue;\n+\t\tdev->devargs = da;\n+\t\tret = dev->bus->plug(dev);\n+\t\tif (ret > 0)\n+\t\t\tret = -ENOTSUP;\n+\t\tif (!ret && rte_dev_is_probed(dev))\n+\t\t\tRTE_LOG(ERR, EAL, \"device probed %s %s\", da->name,\n+\t\t\t\tda->args);\n+\t}\n+\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v2",
        "9/9"
    ]
}