get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44960,
    "url": "https://patches.dpdk.org/api/patches/44960/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/eb083345ffe02b9c15583e4ea86ad8792b728806.1537372746.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": "<eb083345ffe02b9c15583e4ea86ad8792b728806.1537372746.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/eb083345ffe02b9c15583e4ea86ad8792b728806.1537372746.git.gaetan.rivet@6wind.com",
    "date": "2018-09-19T16:03:33",
    "name": "[v2,03/13] bus/vdev: implement device iteration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "58333192876122c1399fc193686b639634ea9a81",
    "submitter": {
        "id": 269,
        "url": "https://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.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/eb083345ffe02b9c15583e4ea86ad8792b728806.1537372746.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 1397,
            "url": "https://patches.dpdk.org/api/series/1397/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1397",
            "date": "2018-09-19T16:03:30",
            "name": "Implement new devargs framework",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/1397/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44960/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/44960/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 E506758FE;\n\tWed, 19 Sep 2018 18:04:14 +0200 (CEST)",
            "from mail-wm1-f65.google.com (mail-wm1-f65.google.com\n\t[209.85.128.65]) by dpdk.org (Postfix) with ESMTP id A84485592\n\tfor <dev@dpdk.org>; Wed, 19 Sep 2018 18:04:08 +0200 (CEST)",
            "by mail-wm1-f65.google.com with SMTP id t25-v6so7587175wmi.3\n\tfor <dev@dpdk.org>; Wed, 19 Sep 2018 09:04:08 -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\tx24-v6sm34983671wrd.13.2018.09.19.09.04.06\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 19 Sep 2018 09:04:07 -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:mime-version:content-transfer-encoding;\n\tbh=2ktNHEg07US44dnB8N2dYpOT+Gu9W3FwuRYZlnSCcvE=;\n\tb=wx3eT+nTFZ/PS12tTfGlIsEmcvuMfotnVMltPgcztFQCp64kh6IyyG/kpf5SdsD3cm\n\t/I71GObqP1P8eF3xavlnEmgrthvZGomt08glolRJ3sclwB9d4w55//FZjkg6FUjEgoX5\n\ti1p2UC10Py+dpuvmtKV37vPRwQ8RsZI8ixIIa6r04+LDqKU4HWzM5H0waEcYY9vPsqVx\n\tX5NnTvmjy44qgnEPlIkBF1qpppj+LaoHM7AZkSDUujBWg7xUQtDZkYsjMh0TOPbBlBf1\n\tX3crFT57A5N0HXQnt50PWWUuhQOomIg2T2tXMVPeAAhWmWcVd/sBMZA/W9AXbkHb4Ym8\n\trwxg==",
        "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:mime-version:content-transfer-encoding;\n\tbh=2ktNHEg07US44dnB8N2dYpOT+Gu9W3FwuRYZlnSCcvE=;\n\tb=GCYv1I9dvd17ybAnu8ZUOe/LOoGNjrts/bMG9C965qe+6imqDR9Wo0l8mt2B7siCVA\n\tPZjozdeGFKC8kIImS5vdnY+4qi93kdKDMcC0J/9TdvkDBquMnPgJU+Fdsl2GTUkmRska\n\tCe8AEEQhouHIq3KKOC7MMktyy+DRg3Y0iiZkqM5bEfkEY3pjA1hph5zNL8wnprGQuXyX\n\t52VBsuAQAB1wdVz8rlBkRcZ3ZHwHSKZcu7aEJbmU+OFRW5r/R+I9lEcex36FnhkpxTmE\n\t2/gMIsFUSzxWLB6VT6MlfONO/wce4l6fQhvO+aK7O6g7QFppJsT6SdXp2yFspKm6clZJ\n\t6daQ==",
        "X-Gm-Message-State": "APzg51DRiEFFHYr40maLVqt4NrYVqvTyDD8XvgdUx+wOFT4WLLeH5ik1\n\t++qwXawsvIpUXPxCqS1WNr0ieascZ/k=",
        "X-Google-Smtp-Source": "ANB0VdaulQ0uOifpbxvRZTppPXOqeeEimpKvKdyBbd0Rv9RW1meUFTBGiQRj8OuKBtW26R8jCwuDnA==",
        "X-Received": "by 2002:a1c:a94d:: with SMTP id\n\ts74-v6mr20983622wme.39.1537373047837; \n\tWed, 19 Sep 2018 09:04:07 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Wed, 19 Sep 2018 18:03:33 +0200",
        "Message-Id": "<eb083345ffe02b9c15583e4ea86ad8792b728806.1537372746.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<cover.1537372746.git.gaetan.rivet@6wind.com>",
        "References": "<cover.1537372746.git.gaetan.rivet@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 03/13] bus/vdev: implement device iteration",
        "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://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n drivers/bus/vdev/Makefile       |  3 +-\n drivers/bus/vdev/meson.build    |  5 +++-\n drivers/bus/vdev/vdev.c         | 10 ++++---\n drivers/bus/vdev/vdev_params.c  | 51 +++++++++++++++++++++++++++++++++\n drivers/bus/vdev/vdev_private.h | 26 +++++++++++++++++\n 5 files changed, 89 insertions(+), 6 deletions(-)\n create mode 100644 drivers/bus/vdev/vdev_params.c\n create mode 100644 drivers/bus/vdev/vdev_private.h",
    "diff": "diff --git a/drivers/bus/vdev/Makefile b/drivers/bus/vdev/Makefile\nindex bd0bb8955..1f9cd7ebe 100644\n--- a/drivers/bus/vdev/Makefile\n+++ b/drivers/bus/vdev/Makefile\n@@ -19,8 +19,9 @@ EXPORT_MAP := rte_bus_vdev_version.map\n LIBABIVER := 1\n \n SRCS-y += vdev.c\n+SRCS-y += vdev_params.c\n \n-LDLIBS += -lrte_eal\n+LDLIBS += -lrte_eal -lrte_kvargs\n \n #\n # Export include files\ndiff --git a/drivers/bus/vdev/meson.build b/drivers/bus/vdev/meson.build\nindex 2ee648b49..12605e5c7 100644\n--- a/drivers/bus/vdev/meson.build\n+++ b/drivers/bus/vdev/meson.build\n@@ -1,7 +1,10 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-sources = files('vdev.c')\n+sources = files('vdev.c',\n+\t'vdev_params.c')\n install_headers('rte_bus_vdev.h')\n \n allow_experimental_apis = true\n+\n+deps += ['kvargs']\ndiff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c\nindex 69dee89a8..ef3ad6d99 100644\n--- a/drivers/bus/vdev/vdev.c\n+++ b/drivers/bus/vdev/vdev.c\n@@ -23,6 +23,7 @@\n \n #include \"rte_bus_vdev.h\"\n #include \"vdev_logs.h\"\n+#include \"vdev_private.h\"\n \n #define VDEV_MP_KEY\t\"bus_vdev_mp\"\n \n@@ -497,9 +498,9 @@ vdev_probe(void)\n \treturn ret;\n }\n \n-static struct rte_device *\n-vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,\n-\t\t const void *data)\n+struct rte_device *\n+rte_vdev_find_device(const struct rte_device *start, rte_dev_cmp_t cmp,\n+\t\t     const void *data)\n {\n \tconst struct rte_vdev_device *vstart;\n \tstruct rte_vdev_device *dev;\n@@ -536,10 +537,11 @@ vdev_unplug(struct rte_device *dev)\n static struct rte_bus rte_vdev_bus = {\n \t.scan = vdev_scan,\n \t.probe = vdev_probe,\n-\t.find_device = vdev_find_device,\n+\t.find_device = rte_vdev_find_device,\n \t.plug = vdev_plug,\n \t.unplug = vdev_unplug,\n \t.parse = vdev_parse,\n+\t.dev_iterate = rte_vdev_dev_iterate,\n };\n \n RTE_REGISTER_BUS(vdev, rte_vdev_bus);\ndiff --git a/drivers/bus/vdev/vdev_params.c b/drivers/bus/vdev/vdev_params.c\nnew file mode 100644\nindex 000000000..842a4684e\n--- /dev/null\n+++ b/drivers/bus/vdev/vdev_params.c\n@@ -0,0 +1,51 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2018 Gaëtan Rivet\n+ */\n+\n+#include <rte_dev.h>\n+#include <rte_bus.h>\n+#include <rte_kvargs.h>\n+#include <rte_errno.h>\n+\n+#include \"vdev_logs.h\"\n+#include \"vdev_private.h\"\n+\n+enum vdev_params {\n+\tRTE_VDEV_PARAMS_MAX,\n+};\n+\n+static const char * const vdev_params_keys[] = {\n+\t[RTE_VDEV_PARAMS_MAX] = NULL,\n+};\n+\n+static int\n+vdev_dev_match(const struct rte_device *dev,\n+\t       const void *_kvlist)\n+{\n+\tconst struct rte_kvargs *kvlist = _kvlist;\n+\n+\t(void) kvlist;\n+\t(void) dev;\n+\treturn 0;\n+}\n+\n+void *\n+rte_vdev_dev_iterate(const void *start,\n+\t\t     const char *str,\n+\t\t     const struct rte_dev_iterator *it __rte_unused)\n+{\n+\tstruct rte_kvargs *kvargs = NULL;\n+\tstruct rte_device *dev;\n+\n+\tif (str != NULL) {\n+\t\tkvargs = rte_kvargs_parse(str, vdev_params_keys);\n+\t\tif (kvargs == NULL) {\n+\t\t\tVDEV_LOG(ERR, \"cannot parse argument list\\n\");\n+\t\t\trte_errno = EINVAL;\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\tdev = rte_vdev_find_device(start, vdev_dev_match, kvargs);\n+\trte_kvargs_free(kvargs);\n+\treturn dev;\n+}\ndiff --git a/drivers/bus/vdev/vdev_private.h b/drivers/bus/vdev/vdev_private.h\nnew file mode 100644\nindex 000000000..ba6dc48ff\n--- /dev/null\n+++ b/drivers/bus/vdev/vdev_private.h\n@@ -0,0 +1,26 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2018 Gaëtan Rivet\n+ */\n+\n+#ifndef _VDEV_PRIVATE_H_\n+#define _VDEV_PRIVATE_H_\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+struct rte_device *\n+rte_vdev_find_device(const struct rte_device *start,\n+\t\t     rte_dev_cmp_t cmp,\n+\t\t     const void *data);\n+\n+void *\n+rte_vdev_dev_iterate(const void *start,\n+\t\t     const char *str,\n+\t\t     const struct rte_dev_iterator *it);\n+\n+#ifdef __cplusplus\n+}\n+#endif\n+\n+#endif /* _VDEV_PRIVATE_H_ */\n",
    "prefixes": [
        "v2",
        "03/13"
    ]
}