Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/98210/?format=api
http://patches.dpdk.org/api/patches/98210/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210907164925.291904-8-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": "<20210907164925.291904-8-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210907164925.291904-8-bruce.richardson@intel.com", "date": "2021-09-07T16:49:24", "name": "[v3,7/8] app/test: add dmadev fill tests", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d89baf1cc2cdecf554eedbb0c8d5a8c2a432c81f", "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/20210907164925.291904-8-bruce.richardson@intel.com/mbox/", "series": [ { "id": 18744, "url": "http://patches.dpdk.org/api/series/18744/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18744", "date": "2021-09-07T16:49:24", "name": "add test suite for DMA drivers", "version": 3, "mbox": "http://patches.dpdk.org/series/18744/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/98210/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/98210/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 B0EBFA0C47;\n\tTue, 7 Sep 2021 18:55:05 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2E3C84118B;\n\tTue, 7 Sep 2021 18:55:05 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 55E71410EF\n for <dev@dpdk.org>; Tue, 7 Sep 2021 18:55:03 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Sep 2021 09:49:59 -0700", "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga007.jf.intel.com with ESMTP; 07 Sep 2021 09:49:57 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10099\"; a=\"207374738\"", "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"207374738\"", "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"469268855\"" ], "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": "Tue, 7 Sep 2021 17:49:24 +0100", "Message-Id": "<20210907164925.291904-8-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20210907164925.291904-1-bruce.richardson@intel.com>", "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210907164925.291904-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v3 7/8] app/test: add dmadev fill tests", "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": "From: Kevin Laatz <kevin.laatz@intel.com>\n\nFor dma devices which support the fill operation, run unit tests to\nverify fill behaviour is correct.\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\n---\n app/test/test_dmadev.c | 49 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)", "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 35ba1ff45d..9ad865f249 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -624,7 +624,51 @@ test_completion_handling(int dev_id, uint16_t vchan)\n {\n \treturn test_completion_status(dev_id, vchan, false) /* without fences */\n \t\t\t|| test_completion_status(dev_id, vchan, true); /* with fences */\n+}\n+\n+static int\n+test_enqueue_fill(int dev_id, uint16_t vchan)\n+{\n+\tconst unsigned int lengths[] = {8, 64, 1024, 50, 100, 89};\n+\tstruct rte_mbuf *dst;\n+\tchar *dst_data;\n+\tuint64_t pattern = 0xfedcba9876543210;\n+\tunsigned int i, j;\n+\n+\tdst = rte_pktmbuf_alloc(pool);\n+\tif (dst == NULL)\n+\t\tERR_RETURN(\"Failed to allocate mbuf\\n\");\n+\tdst_data = rte_pktmbuf_mtod(dst, char *);\n+\n+\tfor (i = 0; i < RTE_DIM(lengths); i++) {\n+\t\t/* reset dst_data */\n+\t\tmemset(dst_data, 0, rte_pktmbuf_data_len(dst));\n+\n+\t\t/* perform the fill operation */\n+\t\tint id = rte_dmadev_fill(dev_id, vchan, pattern,\n+\t\t\t\trte_pktmbuf_iova(dst), lengths[i], RTE_DMA_OP_FLAG_SUBMIT);\n+\t\tif (id < 0)\n+\t\t\tERR_RETURN(\"Error with rte_ioat_enqueue_fill\\n\");\n+\t\tawait_hw(dev_id, vchan);\n+\n+\t\tif (rte_dmadev_completed(dev_id, vchan, 1, NULL, NULL) != 1)\n+\t\t\tERR_RETURN(\"Error: fill operation failed (length: %u)\\n\", lengths[i]);\n+\t\t/* check the data from the fill operation is correct */\n+\t\tfor (j = 0; j < lengths[i]; j++) {\n+\t\t\tchar pat_byte = ((char *)&pattern)[j % 8];\n+\t\t\tif (dst_data[j] != pat_byte)\n+\t\t\t\tERR_RETURN(\"Error with fill operation (lengths = %u): got (%x), not (%x)\\n\",\n+\t\t\t\t\t\tlengths[i], dst_data[j], pat_byte);\n+\t\t}\n+\t\t/* check that the data after the fill operation was not written to */\n+\t\tfor (; j < rte_pktmbuf_data_len(dst); j++)\n+\t\t\tif (dst_data[j] != 0)\n+\t\t\t\tERR_RETURN(\"Error, fill operation wrote too far (lengths = %u): got (%x), not (%x)\\n\",\n+\t\t\t\t\t\tlengths[i], dst_data[j], 0);\n+\t}\n \n+\trte_pktmbuf_free(dst);\n+\treturn 0;\n }\n \n static int\n@@ -692,6 +736,11 @@ test_dmadev_instance(uint16_t dev_id)\n \t\t\tdev_id, vchan, !CHECK_ERRS) < 0)\n \t\tgoto err;\n \n+\tif ((info.dev_capa & RTE_DMADEV_CAPA_OPS_FILL) == 0)\n+\t\tprintf(\"DMA Dev %u: No device fill support, skipping fill tests\\n\", dev_id);\n+\telse if (runtest(\"fill\", test_enqueue_fill, 1, dev_id, vchan, CHECK_ERRS) < 0)\n+\t\tgoto err;\n+\n \trte_mempool_free(pool);\n \trte_dmadev_stop(dev_id);\n \trte_dmadev_stats_reset(dev_id, vchan);\n", "prefixes": [ "v3", "7/8" ] }{ "id": 98210, "url": "