get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53932,
    "url": "http://patches.dpdk.org/api/patches/53932/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190530212525.40370-6-bruce.richardson@intel.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": "<20190530212525.40370-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190530212525.40370-6-bruce.richardson@intel.com",
    "date": "2019-05-30T21:25:22",
    "name": "[5/8] raw/ioat: add device info function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bedb738e637746e469de010319f5ab25c666296c",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.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/20190530212525.40370-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 4831,
            "url": "http://patches.dpdk.org/api/series/4831/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4831",
            "date": "2019-05-30T21:25:17",
            "name": "raw/ioat: driver for Intel QuickData Technology",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4831/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53932/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53932/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 421341B95C;\n\tThu, 30 May 2019 23:26:01 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id BD9B11B94A\n\tfor <dev@dpdk.org>; Thu, 30 May 2019 23:25:50 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 May 2019 14:25:49 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n\tby orsmga001.jf.intel.com with ESMTP; 30 May 2019 14:25:49 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu, 30 May 2019 22:25:22 +0100",
        "Message-Id": "<20190530212525.40370-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190530212525.40370-1-bruce.richardson@intel.com>",
        "References": "<20190530212525.40370-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 5/8] raw/ioat: add device info function",
        "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": "Add in the \"info_get\" function to the driver, to allow us to query the\ndevice. This allows us to have the unit test pick up the presence of\nsupported hardware or not.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n app/test/meson.build               |  3 +++\n app/test/test_ioat_rawdev.c        | 23 ++++++++++++++++++++\n doc/guides/rawdevs/ioat_rawdev.rst | 34 ++++++++++++++++++++++++++++++\n drivers/raw/ioat/ioat_rawdev.c     | 11 ++++++++++\n drivers/raw/ioat/rte_ioat_rawdev.h | 11 ++++++++++\n 5 files changed, 82 insertions(+)",
    "diff": "diff --git a/app/test/meson.build b/app/test/meson.build\nindex 9867619d3..9fe3ddc89 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -305,6 +305,9 @@ endif\n if dpdk_conf.has('RTE_LIBRTE_KNI')\n \ttest_deps += 'kni'\n endif\n+if dpdk_conf.has('RTE_LIBRTE_PMD_IOAT_RAWDEV')\n+\ttest_deps += 'pmd_ioat'\n+endif\n \n cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\ndiff --git a/app/test/test_ioat_rawdev.c b/app/test/test_ioat_rawdev.c\nindex bd1bb2827..ac1389f6e 100644\n--- a/app/test/test_ioat_rawdev.c\n+++ b/app/test/test_ioat_rawdev.c\n@@ -11,9 +11,32 @@ test_ioat_rawdev(void) { return TEST_SKIPPED; }\n \n #else\n \n+#include <string.h>\n+#include <unistd.h>\n+\n+#include <rte_mbuf.h>\n+#include <rte_rawdev.h>\n+#include <rte_ioat_rawdev.h>\n+\n static int\n test_ioat_rawdev(void)\n {\n+\tconst int count = rte_rawdev_count();\n+\tint i, found = 0;\n+\n+\tprintf(\"Checking %d rawdevs\\n\", count);\n+\tfor (i = 0; i < count && !found; i++) {\n+\t\tstruct rte_rawdev_info info = { .dev_private = NULL };\n+\t\tfound = (rte_rawdev_info_get(i, &info) == 0 &&\n+\t\t\t\tstrcmp(info.driver_name,\n+\t\t\t\t\t\tIOAT_PMD_RAWDEV_NAME_STR) == 0);\n+\t}\n+\n+\tif (!found) {\n+\t\tprintf(\"No IOAT rawdev found, skipping tests\\n\");\n+\t\treturn TEST_SKIPPED;\n+\t}\n+\n \treturn 0;\n }\n \ndiff --git a/doc/guides/rawdevs/ioat_rawdev.rst b/doc/guides/rawdevs/ioat_rawdev.rst\nindex 476b0503f..b68cdffc3 100644\n--- a/doc/guides/rawdevs/ioat_rawdev.rst\n+++ b/doc/guides/rawdevs/ioat_rawdev.rst\n@@ -45,3 +45,37 @@ parameters need to be passed to create or initialize the device.\n Once probed successfully, the device will appear as a ``rawdev``, that is a\n \"raw device type\" inside DPDK, and can be accessed using APIs from the\n ``rte_rawdev`` library.\n+\n+Using IOAT Rawdev Devices\n+--------------------------\n+\n+To use the devices from an application, the rawdev API can be used, along\n+with definitions taken from the device-specific header file\n+``rte_ioat_rawdev.h``. This header is needed to get the definition of\n+structure parameters used by some of the rawdev APIs for IOAT rawdev\n+devices, as well as providing key functions for using the device for memory\n+copies.\n+\n+Getting Device Information\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Basic information about each rawdev device can be got using the\n+``rte_rawdev_info_get()`` API. For most applications, this API will be\n+needed to verify that the rawdev in question is of the expected type. For\n+example, the following code in ``test_ioat_rawdev.c`` is used to identify\n+the IOAT rawdev device for use for the tests:\n+\n+.. code-block:: C\n+\n+        for (i = 0; i < count && !found; i++) {\n+                struct rte_rawdev_info info = { .dev_private = NULL };\n+                found = (rte_rawdev_info_get(i, &info) == 0 &&\n+                                strcmp(info.driver_name,\n+                                                IOAT_PMD_RAWDEV_NAME_STR) == 0);\n+        }\n+\n+When calling the ``rte_rawdev_info_get()`` API for an IOAT rawdev device,\n+the ``dev_private`` field in the ``rte_rawdev_info`` struct should either\n+be NULL, or else be set to point to a structure of type\n+``rte_ioat_rawdev_config``, in which case the size of the configured device\n+input ring will be returned in that structure.\ndiff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c\nindex b6964bccd..90bed2810 100644\n--- a/drivers/raw/ioat/ioat_rawdev.c\n+++ b/drivers/raw/ioat/ioat_rawdev.c\n@@ -24,10 +24,21 @@ static struct rte_pci_driver ioat_pmd_drv;\n #define IOAT_PMD_ERR(fmt, args...)    IOAT_PMD_LOG(ERR, fmt, ## args)\n #define IOAT_PMD_WARN(fmt, args...)   IOAT_PMD_LOG(WARNING, fmt, ## args)\n \n+static void\n+ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info)\n+{\n+\tstruct rte_ioat_rawdev_config *cfg = dev_info;\n+\tstruct rte_ioat_rawdev *ioat = dev->dev_private;\n+\n+\tif (cfg != NULL)\n+\t\tcfg->ring_size = ioat->ring_size;\n+}\n+\n static int\n ioat_rawdev_create(const char *name, struct rte_pci_device *dev)\n {\n \tstatic const struct rte_rawdev_ops ioat_rawdev_ops = {\n+\t\t\t.dev_info_get = ioat_dev_info_get,\n \t};\n \n \tstruct rte_rawdev *rawdev = NULL;\ndiff --git a/drivers/raw/ioat/rte_ioat_rawdev.h b/drivers/raw/ioat/rte_ioat_rawdev.h\nindex c3216a174..7e0d72ca3 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev.h\n@@ -24,6 +24,17 @@\n /** Name used to adjust the log level for this driver */\n #define IOAT_PMD_LOG_NAME \"rawdev.ioat\"\n \n+/**\n+ * Configuration structure for an ioat rawdev instance\n+ *\n+ * This structure is to be passed as the \".dev_private\" parameter when\n+ * calling the rte_rawdev_get_info() and rte_rawdev_configure() APIs on\n+ * an ioat rawdev instance.\n+ */\n+struct rte_ioat_rawdev_config {\n+\tunsigned short ring_size;\n+};\n+\n /**\n  * @internal\n  * Structure representing a device instance\n",
    "prefixes": [
        "5/8"
    ]
}