Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/97711/?format=api
https://patches.dpdk.org/api/patches/97711/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210901163216.120087-7-bruce.richardson@intel.com/", "project": { "id": 1, "url": "https://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": "<20210901163216.120087-7-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210901163216.120087-7-bruce.richardson@intel.com", "date": "2021-09-01T16:32:16", "name": "[v2,6/6] app/test: add dmadev fill tests", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "0e833306ca9ed474a484ae99162bd1e9dcd9fae3", "submitter": { "id": 20, "url": "https://patches.dpdk.org/api/people/20/?format=api", "name": "Bruce Richardson", "email": "bruce.richardson@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210901163216.120087-7-bruce.richardson@intel.com/mbox/", "series": [ { "id": 18607, "url": "https://patches.dpdk.org/api/series/18607/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18607", "date": "2021-09-01T16:32:10", "name": "add test suite for DMA drivers", "version": 2, "mbox": "https://patches.dpdk.org/series/18607/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/97711/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/97711/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 5B092A0C47;\n\tWed, 1 Sep 2021 18:33:02 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B8EA841188;\n\tWed, 1 Sep 2021 18:32:47 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id EABD54117E\n for <dev@dpdk.org>; Wed, 1 Sep 2021 18:32:45 +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:45 -0700", "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga005.jf.intel.com with ESMTP; 01 Sep 2021 09:32:43 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10094\"; a=\"198359922\"", "E=Sophos;i=\"5.84,369,1620716400\"; d=\"scan'208\";a=\"198359922\"", "E=Sophos;i=\"5.84,369,1620716400\"; d=\"scan'208\";a=\"645812891\"" ], "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:16 +0100", "Message-Id": "<20210901163216.120087-7-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 6/6] 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>\n---\n app/test/test_dmadev.c | 73 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 73 insertions(+)", "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 5d7b6ddd87..c44c3ad9db 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -710,6 +710,62 @@ test_completion_status(int dev_id, uint16_t vchan, bool fence)\n \treturn 0;\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\tPRINT_ERR(\"Failed to allocate mbuf\\n\");\n+\t\treturn -1;\n+\t}\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\tPRINT_ERR(\"Error with rte_ioat_enqueue_fill\\n\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tawait_hw(dev_id, vchan);\n+\n+\t\tif (rte_dmadev_completed(dev_id, vchan, 1, NULL, NULL) != 1) {\n+\t\t\tPRINT_ERR(\"Error: fill operation failed (length: %u)\\n\", lengths[i]);\n+\t\t\treturn -1;\n+\t\t}\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\tPRINT_ERR(\"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\t\treturn -1;\n+\t\t\t}\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\tPRINT_ERR(\"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\t\t\treturn -1;\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\trte_pktmbuf_free(dst);\n+\treturn 0;\n+}\n+\n static int\n test_dmadev_instance(uint16_t dev_id)\n {\n@@ -813,6 +869,23 @@ test_dmadev_instance(uint16_t dev_id)\n \t\t\tgoto err;\n \t}\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 {\n+\t\trte_dmadev_stats_reset(dev_id, vchan);\n+\t\tprintf(\"DMA Dev: %u, Running Fill Tests\\n\", dev_id);\n+\n+\t\tif (test_enqueue_fill(dev_id, vchan) != 0)\n+\t\t\tgoto err;\n+\n+\t\trte_dmadev_stats_get(dev_id, 0, &stats);\n+\t\tprintf(\"Ops submitted: %\"PRIu64\"\\t\", stats.submitted);\n+\t\tprintf(\"Ops completed: %\"PRIu64\"\\t\", stats.completed);\n+\t\tprintf(\"Errors: %\"PRIu64\"\\n\", stats.errors);\n+\t\tif (check_stats(&stats, true) < 0)\n+\t\t\tgoto err;\n+\t}\n+\n \trte_mempool_free(pool);\n \trte_dmadev_stop(dev_id);\n \trte_dmadev_stats_reset(dev_id, vchan);\n", "prefixes": [ "v2", "6/6" ] }{ "id": 97711, "url": "