Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/78811/?format=api
http://patchwork.dpdk.org/api/patches/78811/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200925110910.284098-6-bruce.richardson@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20200925110910.284098-6-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200925110910.284098-6-bruce.richardson@intel.com", "date": "2020-09-25T11:08:50", "name": "[v3,05/25] raw/ioat: add a flag to control copying handle parameters", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "cec440624db47eece65c5afcf1fa9ca9f6e2583a", "submitter": { "id": 20, "url": "http://patchwork.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200925110910.284098-6-bruce.richardson@intel.com/mbox/", "series": [ { "id": 12509, "url": "http://patchwork.dpdk.org/api/series/12509/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12509", "date": "2020-09-25T11:08:45", "name": "raw/ioat: enhancements and new hardware support", "version": 3, "mbox": "http://patchwork.dpdk.org/series/12509/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/78811/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/78811/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E6417A04C0;\n\tFri, 25 Sep 2020 13:10:20 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id A5CBC1E8F9;\n\tFri, 25 Sep 2020 13:09:47 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id C8FD61E8BE\n for <dev@dpdk.org>; Fri, 25 Sep 2020 13:09:40 +0200 (CEST)", "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Sep 2020 04:09:40 -0700", "from unknown (HELO silpixa00399126.ir.intel.com) ([10.237.222.4])\n by orsmga004.jf.intel.com with ESMTP; 25 Sep 2020 04:09:38 -0700" ], "IronPort-SDR": [ "\n QMraUDGjYdV93eUUqdO5nJE1/J0GdNWxedb9MRj52i9kTCQVyUq6rRlAtv4JAwq7gN91cw1EaN\n hMoIVo2oCy0w==", "\n zT3pyu00XS51v4qxxWayV9nRyKDR4BtOAV9+WOzmB0wRzUcv2FoAFc7KD1nlMtveMwolzxvo/L\n 088ar3Uq/YuA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9754\"; a=\"149263062\"", "E=Sophos;i=\"5.77,301,1596524400\"; d=\"scan'208\";a=\"149263062\"", "E=Sophos;i=\"5.77,301,1596524400\"; d=\"scan'208\";a=\"455787835\"" ], "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": "patrick.fu@intel.com, Cheng Jiang <Cheng1.jiang@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>", "Date": "Fri, 25 Sep 2020 12:08:50 +0100", "Message-Id": "<20200925110910.284098-6-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200925110910.284098-1-bruce.richardson@intel.com>", "References": "<20200721095140.719297-1-bruce.richardson@intel.com>\n <20200925110910.284098-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 05/25] raw/ioat: add a flag to control copying\n\thandle parameters", "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 <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": "From: Cheng Jiang <Cheng1.jiang@intel.com>\n\nAdd a flag which controls whether rte_ioat_enqueue_copy and\nrte_ioat_completed_copies function should process handle parameters. Not\ndoing so can improve the performance when handle parameters are not\nnecessary.\n\nSigned-off-by: Cheng Jiang <Cheng1.jiang@intel.com>\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Kevin Laatz <kevin.laatz@intel.com>\n---\n doc/guides/rawdevs/ioat.rst | 3 ++\n doc/guides/rel_notes/release_20_11.rst | 6 ++++\n drivers/raw/ioat/ioat_rawdev.c | 2 ++\n drivers/raw/ioat/rte_ioat_rawdev.h | 45 +++++++++++++++++++-------\n 4 files changed, 45 insertions(+), 11 deletions(-)", "diff": "diff --git a/doc/guides/rawdevs/ioat.rst b/doc/guides/rawdevs/ioat.rst\nindex c46460ff4..af00d77fb 100644\n--- a/doc/guides/rawdevs/ioat.rst\n+++ b/doc/guides/rawdevs/ioat.rst\n@@ -129,6 +129,9 @@ output, the ``dev_private`` structure element cannot be NULL, and must\n point to a valid ``rte_ioat_rawdev_config`` structure, containing the ring\n size to be used by the device. The ring size must be a power of two,\n between 64 and 4096.\n+If it is not needed, the tracking by the driver of user-provided completion\n+handles may be disabled by setting the ``hdls_disable`` flag in\n+the configuration structure also.\n \n The following code shows how the device is configured in\n ``test_ioat_rawdev.c``:\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 4eb3224a7..196209f63 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -78,6 +78,12 @@ New Features\n ``--portmask=N``\n where N represents the hexadecimal bitmask of ports used.\n \n+* **Updated ioat rawdev driver**\n+\n+ The ioat rawdev driver has been updated and enhanced. Changes include:\n+\n+ * Added a per-device configuration flag to disable management of user-provided completion handles\n+\n \n Removed Items\n -------------\ndiff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c\nindex 0732b059f..ea9f51ffc 100644\n--- a/drivers/raw/ioat/ioat_rawdev.c\n+++ b/drivers/raw/ioat/ioat_rawdev.c\n@@ -58,6 +58,7 @@ ioat_dev_configure(const struct rte_rawdev *dev, rte_rawdev_obj_t config,\n \t\treturn -EINVAL;\n \n \tioat->ring_size = params->ring_size;\n+\tioat->hdls_disable = params->hdls_disable;\n \tif (ioat->desc_ring != NULL) {\n \t\trte_memzone_free(ioat->desc_mz);\n \t\tioat->desc_ring = NULL;\n@@ -122,6 +123,7 @@ ioat_dev_info_get(struct rte_rawdev *dev, rte_rawdev_obj_t dev_info,\n \t\treturn -EINVAL;\n \n \tcfg->ring_size = ioat->ring_size;\n+\tcfg->hdls_disable = ioat->hdls_disable;\n \treturn 0;\n }\n \ndiff --git a/drivers/raw/ioat/rte_ioat_rawdev.h b/drivers/raw/ioat/rte_ioat_rawdev.h\nindex 3d8419271..28ce95cc9 100644\n--- a/drivers/raw/ioat/rte_ioat_rawdev.h\n+++ b/drivers/raw/ioat/rte_ioat_rawdev.h\n@@ -38,7 +38,8 @@ extern \"C\" {\n * an ioat rawdev instance.\n */\n struct rte_ioat_rawdev_config {\n-\tunsigned short ring_size;\n+\tunsigned short ring_size; /**< size of job submission descriptor ring */\n+\tbool hdls_disable; /**< if set, ignore user-supplied handle params */\n };\n \n /**\n@@ -56,6 +57,7 @@ struct rte_ioat_rawdev {\n \n \tunsigned short ring_size;\n \tstruct rte_ioat_generic_hw_desc *desc_ring;\n+\tbool hdls_disable;\n \t__m128i *hdls; /* completion handles for returning to user */\n \n \n@@ -88,10 +90,14 @@ struct rte_ioat_rawdev {\n * The length of the data to be copied\n * @param src_hdl\n * An opaque handle for the source data, to be returned when this operation\n- * has been completed and the user polls for the completion details\n+ * has been completed and the user polls for the completion details.\n+ * NOTE: If hdls_disable configuration option for the device is set, this\n+ * parameter is ignored.\n * @param dst_hdl\n * An opaque handle for the destination data, to be returned when this\n- * operation has been completed and the user polls for the completion details\n+ * operation has been completed and the user polls for the completion details.\n+ * NOTE: If hdls_disable configuration option for the device is set, this\n+ * parameter is ignored.\n * @param fence\n * A flag parameter indicating that hardware should not begin to perform any\n * subsequently enqueued copy operations until after this operation has\n@@ -126,8 +132,10 @@ rte_ioat_enqueue_copy(int dev_id, phys_addr_t src, phys_addr_t dst,\n \tdesc->u.control_raw = (uint32_t)((!!fence << 4) | (!(write & 0xF)) << 3);\n \tdesc->src_addr = src;\n \tdesc->dest_addr = dst;\n+\tif (!ioat->hdls_disable)\n+\t\tioat->hdls[write] = _mm_set_epi64x((int64_t)dst_hdl,\n+\t\t\t\t\t(int64_t)src_hdl);\n \n-\tioat->hdls[write] = _mm_set_epi64x((int64_t)dst_hdl, (int64_t)src_hdl);\n \trte_prefetch0(&ioat->desc_ring[ioat->next_write & mask]);\n \n \tioat->enqueued++;\n@@ -174,19 +182,29 @@ rte_ioat_get_last_completed(struct rte_ioat_rawdev *ioat, int *error)\n /**\n * Returns details of copy operations that have been completed\n *\n- * Returns to the caller the user-provided \"handles\" for the copy operations\n- * which have been completed by the hardware, and not already returned by\n- * a previous call to this API.\n+ * If the hdls_disable option was not set when the device was configured,\n+ * the function will return to the caller the user-provided \"handles\" for\n+ * the copy operations which have been completed by the hardware, and not\n+ * already returned by a previous call to this API.\n+ * If the hdls_disable option for the device was set on configure, the\n+ * max_copies, src_hdls and dst_hdls parameters will be ignored, and the\n+ * function returns the number of newly-completed operations.\n *\n * @param dev_id\n * The rawdev device id of the ioat instance\n * @param max_copies\n * The number of entries which can fit in the src_hdls and dst_hdls\n- * arrays, i.e. max number of completed operations to report\n+ * arrays, i.e. max number of completed operations to report.\n+ * NOTE: If hdls_disable configuration option for the device is set, this\n+ * parameter is ignored.\n * @param src_hdls\n- * Array to hold the source handle parameters of the completed copies\n+ * Array to hold the source handle parameters of the completed copies.\n+ * NOTE: If hdls_disable configuration option for the device is set, this\n+ * parameter is ignored.\n * @param dst_hdls\n- * Array to hold the destination handle parameters of the completed copies\n+ * Array to hold the destination handle parameters of the completed copies.\n+ * NOTE: If hdls_disable configuration option for the device is set, this\n+ * parameter is ignored.\n * @return\n * -1 on error, with rte_errno set appropriately.\n * Otherwise number of completed operations i.e. number of entries written\n@@ -212,6 +230,11 @@ rte_ioat_completed_copies(int dev_id, uint8_t max_copies,\n \t\treturn -1;\n \t}\n \n+\tif (ioat->hdls_disable) {\n+\t\tread += count;\n+\t\tgoto end;\n+\t}\n+\n \tif (count > max_copies)\n \t\tcount = max_copies;\n \n@@ -229,7 +252,7 @@ rte_ioat_completed_copies(int dev_id, uint8_t max_copies,\n \t\tsrc_hdls[i] = hdls[0];\n \t\tdst_hdls[i] = hdls[1];\n \t}\n-\n+end:\n \tioat->next_read = read;\n \tioat->completed += count;\n \treturn count;\n", "prefixes": [ "v3", "05/25" ] }{ "id": 78811, "url": "