get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55785,
    "url": "http://patches.dpdk.org/api/patches/55785/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190701155600.43695-7-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": "<20190701155600.43695-7-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190701155600.43695-7-bruce.richardson@intel.com",
    "date": "2019-07-01T15:55:57",
    "name": "[v4,6/9] raw/ioat: add device info function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8921715837589f8cf38beaea1e56cc6f80bb45d1",
    "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/20190701155600.43695-7-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 5257,
            "url": "http://patches.dpdk.org/api/series/5257/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5257",
            "date": "2019-07-01T15:55:51",
            "name": "raw/ioat: driver for Intel QuickData Technology",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/5257/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55785/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55785/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 BCF731BAB5;\n\tMon,  1 Jul 2019 17:56:35 +0200 (CEST)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 0C0731BA46\n\tfor <dev@dpdk.org>; Mon,  1 Jul 2019 17:56:25 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t01 Jul 2019 08:56:25 -0700",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.223.2])\n\tby fmsmga004.fm.intel.com with ESMTP; 01 Jul 2019 08:56:22 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,439,1557212400\"; d=\"scan'208\";a=\"186524110\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, jerinj@marvell.com, jiayu.hu@intel.com,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tHarry van Haaren <harry.van.haaren@intel.com>",
        "Date": "Mon,  1 Jul 2019 16:55:57 +0100",
        "Message-Id": "<20190701155600.43695-7-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190701155600.43695-1-bruce.richardson@intel.com>",
        "References": "<20190530212525.40370-1-bruce.richardson@intel.com>\n\t<20190701155600.43695-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 6/9] 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>\nTested-by: Harry van Haaren <harry.van.haaren@intel.com>\n---\nV4: Use TEST_SUCCESS in place of 0, when returning from test case.\n    Minor documentation updates.\n\nV2: Test case is placed in driver self-test routine\n---\n app/test/test_rawdev.c             | 11 ++++++++++\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 4 files changed, 67 insertions(+)",
    "diff": "diff --git a/app/test/test_rawdev.c b/app/test/test_rawdev.c\nindex 88549fb61..623117af9 100644\n--- a/app/test/test_rawdev.c\n+++ b/app/test/test_rawdev.c\n@@ -29,6 +29,17 @@ REGISTER_TEST_COMMAND(rawdev_autotest, test_rawdev_selftest_skeleton);\n static int\n test_rawdev_selftest_ioat(void)\n {\n+\tconst int count = rte_rawdev_count();\n+\tint i;\n+\n+\tfor (i = 0; i < count; i++) {\n+\t\tstruct rte_rawdev_info info = { .dev_private = NULL };\n+\t\tif (rte_rawdev_info_get(i, &info) == 0 &&\n+\t\t\t\tstrstr(info.driver_name, \"ioat\") != NULL)\n+\t\t\treturn TEST_SUCCESS;\n+\t}\n+\n+\tprintf(\"No IOAT rawdev found, skipping tests\\n\");\n \treturn TEST_SKIPPED;\n }\n \ndiff --git a/doc/guides/rawdevs/ioat_rawdev.rst b/doc/guides/rawdevs/ioat_rawdev.rst\nindex 4b7fe8a8f..efed9c64c 100644\n--- a/doc/guides/rawdevs/ioat_rawdev.rst\n+++ b/doc/guides/rawdevs/ioat_rawdev.rst\n@@ -83,3 +83,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 queried 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 snippet can be used to identify an IOAT\n+rawdev device for use by an application:\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 86b5b2a77..2bfe2544d 100644\n--- a/drivers/raw/ioat/ioat_rawdev.c\n+++ b/drivers/raw/ioat/ioat_rawdev.c\n@@ -34,10 +34,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 f83d26ef0..1d0dbdd2e 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev.h\n@@ -25,6 +25,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": [
        "v4",
        "6/9"
    ]
}