From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84C05A09F6; Thu, 17 Dec 2020 20:07:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CF41ECAAB; Thu, 17 Dec 2020 20:06:36 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 424F3CA98 for ; Thu, 17 Dec 2020 20:06:34 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BHJ5kwZ006426; Thu, 17 Dec 2020 11:06:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=/npYs+VmBB2UAY5hOPxp3mdJxEzOqdsIz0Cu/lLizUs=; b=ffalnfy4Dp4KPU/0LbwBpCnDTo2+P7lqIKsxTxbxzCF1maknbJxEHWhWRCqI2hSYBFdv KpUeI+JyD02Xf//jZ80mlqMnBEfux6pXx68M+t35nDrbt56XF8BnME0nWbixqmS03BQa 3EqA/vZo4acB3n52/c/bRQQSzgKtN8V6TuFQPQTAEtrbh+U14D4N3z0RsZx6ZwIEeans OsVawtIChX7uY2Wr9qsGO33R5YwGJL4RayV6VsikWPUlXY7QWvrGZmR2tXnae+a9Boi+ QrBQkqYlg165APnwipXF0+tME/juWb3lo7guNqwpnPFJHN7+6NvnvkITOrcnoLQA+NSa bA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 35cx8tgruh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 17 Dec 2020 11:06:32 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Dec 2020 11:06:31 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Dec 2020 11:06:30 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 17 Dec 2020 11:06:30 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 093F33F703F; Thu, 17 Dec 2020 11:06:27 -0800 (PST) From: Nithin Dabilpuram To: , David Christensen , CC: , , Nithin Dabilpuram Date: Fri, 18 Dec 2020 00:36:04 +0530 Message-ID: <20201217190604.29803-5-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20201217190604.29803-1-ndabilpuram@marvell.com> References: <20201012081106.10610-1-ndabilpuram@marvell.com> <20201217190604.29803-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-17_13:2020-12-17, 2020-12-17 signatures=0 Subject: [dpdk-dev] [PATCH v6 4/4] test: change external memory test to use system page sz X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently external memory test uses 4K page size. VFIO DMA mapping works only with system page granularity. Earlier it was working because all the contiguous mappings were coalesced and mapped in one-go which ended up becoming a lot bigger page. Now that VFIO DMA mappings both in IOVA as VA and IOVA as PA mode, are being done at memseg list granularity, we need to use system page size. Signed-off-by: Nithin Dabilpuram --- app/test/test_external_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_external_mem.c b/app/test/test_external_mem.c index 7eb81f6..5edf88b 100644 --- a/app/test/test_external_mem.c +++ b/app/test/test_external_mem.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -532,8 +533,8 @@ test_extmem_basic(void *addr, size_t len, size_t pgsz, rte_iova_t *iova, static int test_external_mem(void) { + size_t pgsz = rte_mem_page_size(); size_t len = EXTERNAL_MEM_SZ; - size_t pgsz = RTE_PGSIZE_4K; rte_iova_t iova[len / pgsz]; void *addr; int ret, n_pages; -- 2.8.4