Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/124066/?format=api
http://patches.dpdk.org/api/patches/124066/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230216110919.373385-6-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": "<20230216110919.373385-6-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230216110919.373385-6-bruce.richardson@intel.com", "date": "2023-02-16T11:09:18", "name": "[v3,5/6] test/dmadev: create separate function for single copy test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "79ec97292ba6a644ff968a3cb91357ca08dc932f", "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/20230216110919.373385-6-bruce.richardson@intel.com/mbox/", "series": [ { "id": 27043, "url": "http://patches.dpdk.org/api/series/27043/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27043", "date": "2023-02-16T11:09:13", "name": "dma/ioat: fix issues with stopping and restarting device", "version": 3, "mbox": "http://patches.dpdk.org/series/27043/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/124066/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/124066/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 15A6C41CB1;\n\tThu, 16 Feb 2023 12:10:05 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 97A8B42D3D;\n\tThu, 16 Feb 2023 12:09:48 +0100 (CET)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id B950342D43\n for <dev@dpdk.org>; Thu, 16 Feb 2023 12:09:46 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 03:09:46 -0800", "from silpixa00401385.ir.intel.com ([10.237.214.22])\n by orsmga001.jf.intel.com with ESMTP; 16 Feb 2023 03:09:44 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1676545786; x=1708081786;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=JZO4As2sVLcm3wlPugCrwwUCc5fndoQDjPDO3DuJoPw=;\n b=Zp9L3Bzode672VG49NbVuIxVLaoCK2uIkzSPYqpCF6Pknx+I2pSFCjM1\n 7w73MwNxutbVBv/0pquXaWrPGC8bxMjsnwDj5OccphwNB6GUHQmFJVv9r\n xpGeTH7WbW5/ob5ZsUBlU6z3bjGUohe+Za3as/QptlK0RCDyBz4eyt2K6\n knT94+lS4HgvXPp26avf8x15lUwW/0OX9PHxEZAsDQo9qTjceOgO2BLiQ\n XjyiEvo0EFju4tXHYHUdMV3JAK5AqaN806IocKHwzpsmo8TM7n1bHhIBM\n IlmsJOCoFbfoqKON1ULMcJjx8F4wChIg+MvpAJMKsAwCEO058ENYr6Xzx Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10622\"; a=\"315368188\"", "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"315368188\"", "E=McAfee;i=\"6500,9779,10622\"; a=\"702522844\"", "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"702522844\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "fengchengwen@huawei.com, Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>", "Subject": "[PATCH v3 5/6] test/dmadev: create separate function for single copy\n test", "Date": "Thu, 16 Feb 2023 11:09:18 +0000", "Message-Id": "<20230216110919.373385-6-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230216110919.373385-1-bruce.richardson@intel.com>", "References": "<20230116153714.554470-1-bruce.richardson@intel.com>\n <20230216110919.373385-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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" }, "content": "The copy tests for dmadev had separate blocks in the test function for\nsingle copy and burst copies. Separate out the single-copy block to its\nown function so that it can be re-used if necessary.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Kevin Laatz <kevin.laatz@intel.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test/test_dmadev.c | 120 ++++++++++++++++++++++-------------------\n 1 file changed, 64 insertions(+), 56 deletions(-)", "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 65226004d8..0296c52d2a 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -175,77 +175,85 @@ do_multi_copies(int16_t dev_id, uint16_t vchan,\n }\n \n static int\n-test_enqueue_copies(int16_t dev_id, uint16_t vchan)\n+test_single_copy(int16_t dev_id, uint16_t vchan)\n {\n-\tenum rte_dma_status_code status;\n-\tunsigned int i;\n+\tuint16_t i;\n \tuint16_t id;\n+\tenum rte_dma_status_code status;\n+\tstruct rte_mbuf *src, *dst;\n+\tchar *src_data, *dst_data;\n \n-\t/* test doing a single copy */\n-\tdo {\n-\t\tstruct rte_mbuf *src, *dst;\n-\t\tchar *src_data, *dst_data;\n+\tsrc = rte_pktmbuf_alloc(pool);\n+\tdst = rte_pktmbuf_alloc(pool);\n+\tsrc_data = rte_pktmbuf_mtod(src, char *);\n+\tdst_data = rte_pktmbuf_mtod(dst, char *);\n \n-\t\tsrc = rte_pktmbuf_alloc(pool);\n-\t\tdst = rte_pktmbuf_alloc(pool);\n-\t\tsrc_data = rte_pktmbuf_mtod(src, char *);\n-\t\tdst_data = rte_pktmbuf_mtod(dst, char *);\n+\tfor (i = 0; i < COPY_LEN; i++)\n+\t\tsrc_data[i] = rte_rand() & 0xFF;\n \n-\t\tfor (i = 0; i < COPY_LEN; i++)\n-\t\t\tsrc_data[i] = rte_rand() & 0xFF;\n+\tid = rte_dma_copy(dev_id, vchan, rte_pktmbuf_iova(src), rte_pktmbuf_iova(dst),\n+\t\t\tCOPY_LEN, RTE_DMA_OP_FLAG_SUBMIT);\n+\tif (id != id_count)\n+\t\tERR_RETURN(\"Error with rte_dma_copy, got %u, expected %u\\n\",\n+\t\t\t\tid, id_count);\n \n-\t\tid = rte_dma_copy(dev_id, vchan, rte_pktmbuf_iova(src), rte_pktmbuf_iova(dst),\n-\t\t\t\tCOPY_LEN, RTE_DMA_OP_FLAG_SUBMIT);\n-\t\tif (id != id_count)\n-\t\t\tERR_RETURN(\"Error with rte_dma_copy, got %u, expected %u\\n\",\n-\t\t\t\t\tid, id_count);\n+\t/* give time for copy to finish, then check it was done */\n+\tawait_hw(dev_id, vchan);\n \n-\t\t/* give time for copy to finish, then check it was done */\n-\t\tawait_hw(dev_id, vchan);\n+\tfor (i = 0; i < COPY_LEN; i++)\n+\t\tif (dst_data[i] != src_data[i])\n+\t\t\tERR_RETURN(\"Data mismatch at char %u [Got %02x not %02x]\\n\", i,\n+\t\t\t\t\tdst_data[i], src_data[i]);\n+\n+\t/* now check completion works */\n+\tid = ~id;\n+\tif (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 1)\n+\t\tERR_RETURN(\"Error with rte_dma_completed\\n\");\n+\n+\tif (id != id_count)\n+\t\tERR_RETURN(\"Error:incorrect job id received, %u [expected %u]\\n\",\n+\t\t\t\tid, id_count);\n+\n+\t/* check for completed and id when no job done */\n+\tid = ~id;\n+\tif (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 0)\n+\t\tERR_RETURN(\"Error with rte_dma_completed when no job done\\n\");\n+\tif (id != id_count)\n+\t\tERR_RETURN(\"Error:incorrect job id received when no job done, %u [expected %u]\\n\",\n+\t\t\t\tid, id_count);\n+\n+\t/* check for completed_status and id when no job done */\n+\tid = ~id;\n+\tif (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0)\n+\t\tERR_RETURN(\"Error with rte_dma_completed_status when no job done\\n\");\n+\tif (id != id_count)\n+\t\tERR_RETURN(\"Error:incorrect job id received when no job done, %u [expected %u]\\n\",\n+\t\t\t\tid, id_count);\n \n-\t\tfor (i = 0; i < COPY_LEN; i++)\n-\t\t\tif (dst_data[i] != src_data[i])\n-\t\t\t\tERR_RETURN(\"Data mismatch at char %u [Got %02x not %02x]\\n\", i,\n-\t\t\t\t\t\tdst_data[i], src_data[i]);\n-\n-\t\t/* now check completion works */\n-\t\tid = ~id;\n-\t\tif (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 1)\n-\t\t\tERR_RETURN(\"Error with rte_dma_completed\\n\");\n-\n-\t\tif (id != id_count)\n-\t\t\tERR_RETURN(\"Error:incorrect job id received, %u [expected %u]\\n\",\n-\t\t\t\t\tid, id_count);\n-\n-\t\t/* check for completed and id when no job done */\n-\t\tid = ~id;\n-\t\tif (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 0)\n-\t\t\tERR_RETURN(\"Error with rte_dma_completed when no job done\\n\");\n-\t\tif (id != id_count)\n-\t\t\tERR_RETURN(\"Error:incorrect job id received when no job done, %u [expected %u]\\n\",\n-\t\t\t\t\tid, id_count);\n-\n-\t\t/* check for completed_status and id when no job done */\n-\t\tid = ~id;\n-\t\tif (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0)\n-\t\t\tERR_RETURN(\"Error with rte_dma_completed_status when no job done\\n\");\n-\t\tif (id != id_count)\n-\t\t\tERR_RETURN(\"Error:incorrect job id received when no job done, %u [expected %u]\\n\",\n-\t\t\t\t\tid, id_count);\n+\trte_pktmbuf_free(src);\n+\trte_pktmbuf_free(dst);\n \n-\t\trte_pktmbuf_free(src);\n-\t\trte_pktmbuf_free(dst);\n+\t/* now check completion returns nothing more */\n+\tif (rte_dma_completed(dev_id, 0, 1, NULL, NULL) != 0)\n+\t\tERR_RETURN(\"Error with rte_dma_completed in empty check\\n\");\n+\n+\tid_count++;\n \n-\t\t/* now check completion returns nothing more */\n-\t\tif (rte_dma_completed(dev_id, 0, 1, NULL, NULL) != 0)\n-\t\t\tERR_RETURN(\"Error with rte_dma_completed in empty check\\n\");\n+\treturn 0;\n+}\n \n-\t\tid_count++;\n+static int\n+test_enqueue_copies(int16_t dev_id, uint16_t vchan)\n+{\n+\tunsigned int i;\n \n-\t} while (0);\n+\t/* test doing a single copy */\n+\tif (test_single_copy(dev_id, vchan) < 0)\n+\t\treturn -1;\n \n \t/* test doing a multiple single copies */\n \tdo {\n+\t\tuint16_t id;\n \t\tconst uint16_t max_ops = 4;\n \t\tstruct rte_mbuf *src, *dst;\n \t\tchar *src_data, *dst_data;\n", "prefixes": [ "v3", "5/6" ] }{ "id": 124066, "url": "