get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44023,
    "url": "http://patches.dpdk.org/api/patches/44023/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/e43e97e762d5cf8865f93c202098a970904403ba.1535633784.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": "<e43e97e762d5cf8865f93c202098a970904403ba.1535633784.git.gaetan.rivet@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e43e97e762d5cf8865f93c202098a970904403ba.1535633784.git.gaetan.rivet@6wind.com",
    "date": "2018-08-30T13:41:52",
    "name": "[v1,01/13] bus/pci: implement device iteration and comparison",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "380718e32b9939ec47dda5ee21a5ad7fb4574461",
    "submitter": {
        "id": 269,
        "url": "http://patches.dpdk.org/api/people/269/?format=api",
        "name": "Gaëtan Rivet",
        "email": "gaetan.rivet@6wind.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/e43e97e762d5cf8865f93c202098a970904403ba.1535633784.git.gaetan.rivet@6wind.com/mbox/",
    "series": [
        {
            "id": 1115,
            "url": "http://patches.dpdk.org/api/series/1115/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1115",
            "date": "2018-08-30T13:41:51",
            "name": "Implement new devargs framework",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1115/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44023/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44023/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 370B54CA0;\n\tThu, 30 Aug 2018 15:42:37 +0200 (CEST)",
            "from mail-wm0-f65.google.com (mail-wm0-f65.google.com\n\t[74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 390462BF7\n\tfor <dev@dpdk.org>; Thu, 30 Aug 2018 15:42:34 +0200 (CEST)",
            "by mail-wm0-f65.google.com with SMTP id s12-v6so2059146wmc.0\n\tfor <dev@dpdk.org>; Thu, 30 Aug 2018 06:42:34 -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\tw10-v6sm5247731wrp.31.2018.08.30.06.42.32\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 30 Aug 2018 06:42:32 -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=P+2HyqC4ZvrPG7gLe4w+bgYhBL0eNkfSbx9QrWWRZQA=;\n\tb=1+qrP+qljLAlSLmnlTgkSLX5Fo7croLWVX4VFJrpWKptqk539tFUpZwPZY1sqE8Sm8\n\tMDWy/GHqVVc3A7IJqlUA3QZpFZRN6r8JqWLRHThWfFbdZ1iQgiyXFtzJ0T1DgtkEokzt\n\tYrMBIywDmSOYSNJCCUHw4fILO6A90EevSMbS5ukLNO+m5ifXo1UuThBb7LxNz75A9Xx6\n\tTCeCfEFNpAzqZYpZe+IQbEHsiQ6nGCXvWwITIxlz3IZczIS7xsoNWacjaeF5wE04AGBR\n\t9p2cN/vn1bSZRwgPxoBk59WGjqzgeXZxMNLtRObEIBXIHjDOp0F1jB5+fMVXcFcJDVKG\n\t4zbQ==",
        "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=P+2HyqC4ZvrPG7gLe4w+bgYhBL0eNkfSbx9QrWWRZQA=;\n\tb=dDAIfiKipno1pOAEz7TI6ogZbbUZ4X+kCNbg/Z7x/1eabFJB51T01MkIWtjY7tFkfb\n\tRwSMOkRPQKibZEuYDRHbmelqf/gLJU7T72iYvsIBIkNuIVYhgWYv1E709c0mHfxQSxqk\n\tyma7Y5HMBWg6oHk6YjtOy1JkkVM8CzVOhgAv3H3n9tH+jTRluUGNqxQJOLripfXqswT8\n\tkiZPHgtsfRIpAj1usaUNUIKg58nAiFEunjvaSLwhtEsdmaqRksXv7Q9X5Wj6m/kFmiIy\n\t6Xo1Ev4QcIjlPrYojCv1pXxadFiLLhAjIU6vYmbXqzncPKSlxLpi2fqpsw1og4it6bv+\n\tRctQ==",
        "X-Gm-Message-State": "APzg51A1+V+HRyFdEu9p3Tw8V0yTVTYN1vd/x4XOhQpycnUPw+58S/WY\n\tnrdFjkAXo8zxoFrPJ7kdeSUPmiW4tvE=",
        "X-Google-Smtp-Source": "ANB0VdakmcdaWRYzzaw5eg2/C2e8QvlNk8s0sTVT0sjZQVLnzaaLDKjyz8M3DGUMEiUGQkeFIkOLJw==",
        "X-Received": "by 2002:a1c:889:: with SMTP id\n\t131-v6mr1793863wmi.142.1535636553601; \n\tThu, 30 Aug 2018 06:42:33 -0700 (PDT)",
        "From": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>",
        "Date": "Thu, 30 Aug 2018 15:41:52 +0200",
        "Message-Id": "<e43e97e762d5cf8865f93c202098a970904403ba.1535633784.git.gaetan.rivet@6wind.com>",
        "X-Mailer": "git-send-email 2.18.0",
        "In-Reply-To": "<cover.1535633783.git.gaetan.rivet@6wind.com>",
        "References": "<cover.1535633783.git.gaetan.rivet@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v1 01/13] bus/pci: implement device iteration and\n\tcomparison",
        "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/pci/Makefile     |  3 +-\n drivers/bus/pci/meson.build  |  6 +++-\n drivers/bus/pci/pci_common.c |  3 +-\n drivers/bus/pci/pci_params.c | 53 ++++++++++++++++++++++++++++++++++++\n drivers/bus/pci/private.h    | 25 +++++++++++++++++\n 5 files changed, 86 insertions(+), 4 deletions(-)\n create mode 100644 drivers/bus/pci/pci_params.c",
    "diff": "diff --git a/drivers/bus/pci/Makefile b/drivers/bus/pci/Makefile\nindex cf373068a..4de953f8f 100644\n--- a/drivers/bus/pci/Makefile\n+++ b/drivers/bus/pci/Makefile\n@@ -26,10 +26,11 @@ CFLAGS += -I$(RTE_SDK)/lib/librte_eal/$(SYSTEM)app/eal\n CFLAGS += -DALLOW_EXPERIMENTAL_API\n \n LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring\n-LDLIBS += -lrte_ethdev -lrte_pci\n+LDLIBS += -lrte_ethdev -lrte_pci -lrte_kvargs\n \n include $(RTE_SDK)/drivers/bus/pci/$(SYSTEM)/Makefile\n SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) := $(addprefix $(SYSTEM)/,$(SRCS))\n+SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci_params.c\n SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci_common.c\n SRCS-$(CONFIG_RTE_LIBRTE_PCI_BUS) += pci_common_uio.c\n \ndiff --git a/drivers/bus/pci/meson.build b/drivers/bus/pci/meson.build\nindex 72939e598..23d6a5fec 100644\n--- a/drivers/bus/pci/meson.build\n+++ b/drivers/bus/pci/meson.build\n@@ -3,7 +3,9 @@\n \n deps += ['pci']\n install_headers('rte_bus_pci.h')\n-sources = files('pci_common.c', 'pci_common_uio.c')\n+sources = files('pci_common.c',\n+\t'pci_common_uio.c',\n+\t'pci_params.c')\n if host_machine.system() == 'linux'\n \tsources += files('linux/pci.c',\n \t\t\t'linux/pci_uio.c',\n@@ -17,3 +19,5 @@ endif\n \n # memseg walk is not part of stable API yet\n allow_experimental_apis = true\n+\n+deps += ['kvargs']\ndiff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c\nindex 7736b3f9c..c7695d108 100644\n--- a/drivers/bus/pci/pci_common.c\n+++ b/drivers/bus/pci/pci_common.c\n@@ -27,8 +27,6 @@\n #include \"private.h\"\n \n \n-extern struct rte_pci_bus rte_pci_bus;\n-\n #define SYSFS_PCI_DEVICES \"/sys/bus/pci/devices\"\n \n const char *rte_pci_get_sysfs_path(void)\n@@ -435,6 +433,7 @@ struct rte_pci_bus rte_pci_bus = {\n \t\t.unplug = pci_unplug,\n \t\t.parse = pci_parse,\n \t\t.get_iommu_class = rte_pci_get_iommu_class,\n+\t\t.dev_iterate = rte_pci_dev_iterate,\n \t},\n \t.device_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.device_list),\n \t.driver_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.driver_list),\ndiff --git a/drivers/bus/pci/pci_params.c b/drivers/bus/pci/pci_params.c\nnew file mode 100644\nindex 000000000..0fde75803\n--- /dev/null\n+++ b/drivers/bus/pci/pci_params.c\n@@ -0,0 +1,53 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2018 Gaëtan Rivet\n+ */\n+\n+#include <rte_bus.h>\n+#include <rte_dev.h>\n+#include <rte_errno.h>\n+#include <rte_kvargs.h>\n+#include <rte_pci.h>\n+\n+#include \"private.h\"\n+\n+enum pci_params {\n+\tRTE_PCI_PARAMS_MAX,\n+};\n+\n+static const char * const pci_params_keys[] = {\n+\t[RTE_PCI_PARAMS_MAX] = NULL,\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+\n+\t(void) dev;\n+\t(void) kvlist;\n+\treturn 0;\n+}\n+\n+void *\n+rte_pci_dev_iterate(const void *start,\n+\t\t    const char *str,\n+\t\t    const struct rte_dev_iterator *it __rte_unused)\n+{\n+\trte_bus_find_device_t find_device;\n+\tstruct rte_kvargs *kvargs = NULL;\n+\tstruct rte_device *dev;\n+\n+\tif (str != NULL) {\n+\t\tkvargs = rte_kvargs_parse(str, pci_params_keys);\n+\t\tif (kvargs == NULL) {\n+\t\t\tRTE_LOG(ERR, EAL, \"cannot parse argument list\\n\");\n+\t\t\trte_errno = EINVAL;\n+\t\t\treturn NULL;\n+\t\t}\n+\t}\n+\tfind_device = rte_pci_bus.bus.find_device;\n+\tdev = find_device(start, pci_dev_match, kvargs);\n+\trte_kvargs_free(kvargs);\n+\treturn dev;\n+}\ndiff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h\nindex 8ddd03e16..0e689fa74 100644\n--- a/drivers/bus/pci/private.h\n+++ b/drivers/bus/pci/private.h\n@@ -10,6 +10,8 @@\n #include <rte_pci.h>\n #include <rte_bus_pci.h>\n \n+extern struct rte_pci_bus rte_pci_bus;\n+\n struct rte_pci_driver;\n struct rte_pci_device;\n \n@@ -166,4 +168,27 @@ rte_pci_match(const struct rte_pci_driver *pci_drv,\n enum rte_iova_mode\n rte_pci_get_iommu_class(void);\n \n+/*\n+ * Iterate over internal devices,\n+ * matching any device against the provided\n+ * string.\n+ *\n+ * @param start\n+ *   Iteration starting point.\n+ *\n+ * @param str\n+ *   Device string to match against.\n+ *\n+ * @param it\n+ *   (unused) iterator structure.\n+ *\n+ * @return\n+ *   A pointer to the next matching device if any.\n+ *   NULL otherwise.\n+ */\n+void *\n+rte_pci_dev_iterate(const void *start,\n+\t\t    const char *str,\n+\t\t    const struct rte_dev_iterator *it);\n+\n #endif /* _PCI_PRIVATE_H_ */\n",
    "prefixes": [
        "v1",
        "01/13"
    ]
}