Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/139544/?format=api
http://patches.dpdk.org/api/patches/139544/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240419090734.43613-1-vvelumuri@marvell.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": "<20240419090734.43613-1-vvelumuri@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240419090734.43613-1-vvelumuri@marvell.com", "date": "2024-04-19T09:07:33", "name": "[v2,1/2] test/dma: update the sg test to verify wrap around case", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a1e91176cbf167a5bff3703bc92473222c6a9173", "submitter": { "id": 2363, "url": "http://patches.dpdk.org/api/people/2363/?format=api", "name": "Vidya Sagar Velumuri", "email": "vvelumuri@marvell.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/20240419090734.43613-1-vvelumuri@marvell.com/mbox/", "series": [ { "id": 31792, "url": "http://patches.dpdk.org/api/series/31792/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31792", "date": "2024-04-19T09:07:33", "name": "[v2,1/2] test/dma: update the sg test to verify wrap around case", "version": 2, "mbox": "http://patches.dpdk.org/series/31792/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/139544/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/139544/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 39C9E43EAC;\n\tFri, 19 Apr 2024 11:08:21 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0551440273;\n\tFri, 19 Apr 2024 11:08:21 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 9209D400D6\n for <dev@dpdk.org>; Fri, 19 Apr 2024 11:08:19 +0200 (CEST)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 43J6M4ua014941; Fri, 19 Apr 2024 02:08:18 -0700", "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3xk89mtq1a-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Fri, 19 Apr 2024 02:08:17 -0700 (PDT)", "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.4; Fri, 19 Apr 2024 02:08:16 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend\n Transport; Fri, 19 Apr 2024 02:08:16 -0700", "from localhost.localdomain (unknown [10.28.36.179])\n by maili.marvell.com (Postfix) with ESMTP id 4A4653F7090;\n Fri, 19 Apr 2024 02:08:13 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=\n pfpt0220; bh=8pHGaQLvwh+3cx2h1cNmYg9sodbwMb28UGBAm2c7CEY=; b=ROv\n SoVs9uwfXcp4Alv1rHkVW3nv2gXjXNdApQQvqLQhmU4qk+XcasqQmqWxQjbFgqep\n oCkNDC0CKQ0WOamPrDJsDTGAr84EUlWyG+WVNzP0HnUuUOSuQf/5SDN4/0ogj2ic\n E5oKNZ722lnQO5peE4vwB0aJGR/dPMkvjadFtCInZWxFATkuqFmUZSSYasgkxv8F\n jEkB6Z0FSubmyFQV98uajBzcdHVCszACB/77ysEtXUY+TJ5NekMCi7vs5puEegpf\n MQxPgnA5/psqJ93j+lhfTaQWN+Rhp+wLvDX3YSjRarbKNlilA/1OmvLVdR9XZ7oJ\n kqRGz4OhK5M1H0c+g6g==", "From": "Vidya Sagar Velumuri <vvelumuri@marvell.com>", "To": "<fengchengwen@huawei.com>, <kevin.laatz@intel.com>,\n <bruce.richardson@intel.com>", "CC": "<jerinj@marvell.com>, <anoobj@marvell.com>, <vvelumuri@marvell.com>,\n <asasidharan@marvell.com>, <ktejasree@marvell.com>,\n <gmuthukrishn@marvell.com>, <dev@dpdk.org>", "Subject": "[PATCH v2 1/2] test/dma: update the sg test to verify wrap around\n case", "Date": "Fri, 19 Apr 2024 02:07:33 -0700", "Message-ID": "<20240419090734.43613-1-vvelumuri@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20240416123747.4133884-1-vvelumuri@marvell.com>", "References": "<20240416123747.4133884-1-vvelumuri@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "WxjtxKHlIwkzaBZEbhAUt45HSN425KYJ", "X-Proofpoint-ORIG-GUID": "WxjtxKHlIwkzaBZEbhAUt45HSN425KYJ", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-04-19_06,2024-04-17_01,2023-05-22_02", "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": "Run the sg test in a loop to verify wrap around case.\nTotal number commands submitted to be more than the number descriptors\nallocated to verify the scenario.\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>", "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 143e1bcd68..7462e90831 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -393,34 +393,26 @@ test_stop_start(int16_t dev_id, uint16_t vchan)\n }\n \n static int\n-test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n+test_enqueue_sg(int16_t dev_id, uint16_t vchan, unsigned int n_sge, unsigned int test_len)\n {\n-\tunsigned int src_len, dst_len, n_sge, len, i, j, k;\n \tchar orig_src[COPY_LEN], orig_dst[COPY_LEN];\n-\tstruct rte_dma_info info = { 0 };\n+\tunsigned int src_len, dst_len, i, j, k;\n \tenum rte_dma_status_code status;\n \tuint16_t id, n_src, n_dst;\n \n-\tif (rte_dma_info_get(dev_id, &info) < 0)\n-\t\tERR_RETURN(\"Failed to get dev info\");\n-\n-\tif (info.max_sges < 2)\n-\t\tERR_RETURN(\"Test needs minimum 2 SG pointers\");\n-\n-\tn_sge = info.max_sges;\n-\n \tfor (n_src = 1; n_src <= n_sge; n_src++) {\n \t\tfor (n_dst = 1; n_dst <= n_sge; n_dst++) {\n \t\t\t/* Normalize SG buffer lengths */\n-\t\t\tlen = COPY_LEN;\n-\t\t\tlen -= (len % (n_src * n_dst));\n-\t\t\tdst_len = len / n_dst;\n-\t\t\tsrc_len = len / n_src;\n-\n+\t\t\tunsigned int len = test_len - (test_len % (n_src * n_dst));\n \t\t\tstruct rte_dma_sge sg_src[n_sge], sg_dst[n_sge];\n \t\t\tstruct rte_mbuf *src[n_sge], *dst[n_sge];\n \t\t\tchar *src_data[n_sge], *dst_data[n_sge];\n \n+\t\t\tdst_len = len / n_dst;\n+\t\t\tsrc_len = len / n_src;\n+\t\t\tif (dst_len == 0 || src_len == 0)\n+\t\t\t\tcontinue;\n+\n \t\t\tfor (i = 0 ; i < len; i++)\n \t\t\t\torig_src[i] = rte_rand() & 0xFF;\n \n@@ -511,6 +503,27 @@ test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n \treturn 0;\n }\n \n+static int\n+test_enqueue_sg_copies(int16_t dev_id, uint16_t vchan)\n+{\n+\tstruct rte_dma_info info = { 0 };\n+\tunsigned int n_sge, len;\n+\tint loop_count = 0;\n+\n+\tif (rte_dma_info_get(dev_id, &info) < 0)\n+\t\tERR_RETURN(\"Failed to get dev info\");\n+\n+\tn_sge = RTE_MIN(info.max_sges, TEST_SG_MAX);\n+\tlen = COPY_LEN;\n+\n+\tdo {\n+\t\ttest_enqueue_sg(dev_id, vchan, n_sge, len);\n+\t\tloop_count++;\n+\t} while (loop_count * n_sge * n_sge < TEST_RINGSIZE * 3);\n+\n+\treturn 0;\n+}\n+\n /* Failure handling test cases - global macros and variables for those tests*/\n #define COMP_BURST_SZ\t16\n #define OPT_FENCE(idx) ((fence && idx == 8) ? RTE_DMA_OP_FLAG_FENCE : 0)\ndiff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c\nindex d40c05cfbf..6a07ed593b 100644\n--- a/app/test/test_dmadev_api.c\n+++ b/app/test/test_dmadev_api.c\n@@ -16,7 +16,6 @@ extern int test_dma_api(uint16_t dev_id);\n \n #define TEST_MEMCPY_SIZE\t1024\n #define TEST_WAIT_US_VAL\t50000\n-#define TEST_SG_MAX\t\t64\n \n static int16_t test_dev_id;\n static int16_t invalid_dev_id;\ndiff --git a/app/test/test_dmadev_api.h b/app/test/test_dmadev_api.h\nindex 33fbc5bd41..a03f7acd4f 100644\n--- a/app/test/test_dmadev_api.h\n+++ b/app/test/test_dmadev_api.h\n@@ -2,4 +2,6 @@\n * Copyright(c) 2021 HiSilicon Limited\n */\n \n+#define TEST_SG_MAX\t\t64\n+\n int test_dma_api(uint16_t dev_id);\n", "prefixes": [ "v2", "1/2" ] }{ "id": 139544, "url": "