Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/97706/?format=api
http://patchwork.dpdk.org/api/patches/97706/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210901163216.120087-2-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": "<20210901163216.120087-2-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210901163216.120087-2-bruce.richardson@intel.com", "date": "2021-09-01T16:32:11", "name": "[v2,1/6] dmadev: add device idle check for testing use", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ffdd6dc7522bd422ffc26c687d9176ef9a43758f", "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/20210901163216.120087-2-bruce.richardson@intel.com/mbox/", "series": [ { "id": 18607, "url": "http://patchwork.dpdk.org/api/series/18607/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18607", "date": "2021-09-01T16:32:10", "name": "add test suite for DMA drivers", "version": 2, "mbox": "http://patchwork.dpdk.org/series/18607/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/97706/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/97706/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D40C5A0C47;\n\tWed, 1 Sep 2021 18:32:31 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A7941410FA;\n\tWed, 1 Sep 2021 18:32:31 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 1A70D410F2\n for <dev@dpdk.org>; Wed, 1 Sep 2021 18:32:28 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Sep 2021 09:32:28 -0700", "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga005.jf.intel.com with ESMTP; 01 Sep 2021 09:32:27 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10094\"; a=\"198359835\"", "E=Sophos;i=\"5.84,369,1620716400\"; d=\"scan'208\";a=\"198359835\"", "E=Sophos;i=\"5.84,369,1620716400\"; d=\"scan'208\";a=\"645812711\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "conor.walsh@intel.com, kevin.laatz@intel.com, fengchengwen@huawei.com,\n jerinj@marvell.com, Bruce Richardson <bruce.richardson@intel.com>", "Date": "Wed, 1 Sep 2021 17:32:11 +0100", "Message-Id": "<20210901163216.120087-2-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210901163216.120087-1-bruce.richardson@intel.com>", "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210901163216.120087-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 1/6] dmadev: add device idle check for testing\n use", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "Add in a function to check if a device or vchan has completed all jobs\nassigned to it, without gathering in the results. This is primarily for\nuse in testing, to allow the hardware to be in a known-state prior to\ngathering completions.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/dmadev/rte_dmadev.c | 16 ++++++++++++++++\n lib/dmadev/rte_dmadev.h | 21 +++++++++++++++++++++\n lib/dmadev/rte_dmadev_core.h | 4 ++++\n lib/dmadev/version.map | 1 +\n 4 files changed, 42 insertions(+)", "diff": "diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c\nindex 1c946402db..e249411631 100644\n--- a/lib/dmadev/rte_dmadev.c\n+++ b/lib/dmadev/rte_dmadev.c\n@@ -555,3 +555,19 @@ rte_dmadev_dump(uint16_t dev_id, FILE *f)\n \n \treturn 0;\n }\n+\n+int\n+rte_dmadev_vchan_idle(uint16_t dev_id, uint16_t vchan)\n+{\n+\tstruct rte_dmadev *dev = &rte_dmadevices[dev_id];\n+\n+\tRTE_DMADEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL);\n+\tif (vchan >= dev->data->dev_conf.nb_vchans) {\n+\t\tRTE_DMADEV_LOG(ERR,\n+\t\t\t\"Device %u vchan %u out of range\\n\", dev_id, vchan);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vchan_idle, -ENOTSUP);\n+\treturn (*dev->dev_ops->vchan_idle)(dev, vchan);\n+}\ndiff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h\nindex e8f58e9213..350e7defc8 100644\n--- a/lib/dmadev/rte_dmadev.h\n+++ b/lib/dmadev/rte_dmadev.h\n@@ -1028,6 +1028,27 @@ rte_dmadev_completed_status(uint16_t dev_id, uint16_t vchan,\n \treturn (*dev->completed_status)(dev, vchan, nb_cpls, last_idx, status);\n }\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Determine if all jobs have completed on a device channel.\n+ * This function is primarily designed for testing use, as it allows a process to check if\n+ * all jobs are completed, without actually gathering completions from those jobs.\n+ *\n+ * @param dev_id\n+ * The identifier of the device.\n+ * @param vchan\n+ * The identifier of virtual DMA channel.\n+ * @return\n+ * 1 - if all jobs have completed and the device vchan is idle\n+ * 0 - if there are still outstanding jobs yet to complete\n+ * < 0 - error code indicating there was a problem calling the API\n+ */\n+__rte_experimental\n+int\n+rte_dmadev_vchan_idle(uint16_t dev_id, uint16_t vchan);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h\nindex e94aa1c457..7ec5a5b572 100644\n--- a/lib/dmadev/rte_dmadev_core.h\n+++ b/lib/dmadev/rte_dmadev_core.h\n@@ -53,6 +53,9 @@ typedef int (*rte_dmadev_stats_reset_t)(struct rte_dmadev *dev, uint16_t vchan);\n typedef int (*rte_dmadev_dump_t)(const struct rte_dmadev *dev, FILE *f);\n /**< @internal Used to dump internal information. */\n \n+typedef int (*rte_dmadev_vchan_idle_t)(const struct rte_dmadev *dev, uint16_t vchan);\n+/**< @internal Used to check if a virtual channel has finished all jobs. */\n+\n typedef int (*rte_dmadev_copy_t)(struct rte_dmadev *dev, uint16_t vchan,\n \t\t\t\t rte_iova_t src, rte_iova_t dst,\n \t\t\t\t uint32_t length, uint64_t flags);\n@@ -106,6 +109,7 @@ struct rte_dmadev_ops {\n \trte_dmadev_stats_get_t stats_get;\n \trte_dmadev_stats_reset_t stats_reset;\n \trte_dmadev_dump_t dev_dump;\n+\trte_dmadev_vchan_idle_t vchan_idle;\n };\n \n /**\ndiff --git a/lib/dmadev/version.map b/lib/dmadev/version.map\nindex 80be592713..b7e52fda3d 100644\n--- a/lib/dmadev/version.map\n+++ b/lib/dmadev/version.map\n@@ -18,6 +18,7 @@ EXPERIMENTAL {\n \trte_dmadev_stats_reset;\n \trte_dmadev_stop;\n \trte_dmadev_submit;\n+\trte_dmadev_vchan_idle;\n \trte_dmadev_vchan_setup;\n \n \tlocal: *;\n", "prefixes": [ "v2", "1/6" ] }{ "id": 97706, "url": "