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 35F31A0613 for ; Tue, 27 Aug 2019 09:13:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F19181C0C8; Tue, 27 Aug 2019 09:10:29 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 642C71C034 for ; Tue, 27 Aug 2019 09:09:32 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 44332200131; Tue, 27 Aug 2019 09:09:32 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 408D3200108; Tue, 27 Aug 2019 09:09:30 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 27EB1402DE; Tue, 27 Aug 2019 15:09:27 +0800 (SGT) From: Sachin Saxena To: dev@dpdk.org Cc: thomas@monjalon.net, Shreyansh Jain Date: Tue, 27 Aug 2019 12:37:25 +0530 Message-Id: <20190827070730.11206-26-sachin.saxena@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190827070730.11206-1-sachin.saxena@nxp.com> References: <20190827070730.11206-1-sachin.saxena@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v1 25/30] bus/fslmc: update PA-VA dpaax library only in PA mode 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" From: Shreyansh Jain The address translation support for PA->VA is required only in case of PA mode operation of DPDK. This was causing warning to be reported on running any DPAA2 application in VA mode: Add: Incorrect entry for PA->VA Table(xxxxxxxxxx) Add: Lowest address: xxxxxxxxxxxx This was caused by call to update the DPAAX table when VA mode was enabled, in which case the VA==IOVA address. Signed-off-by: Shreyansh Jain Reviewed-by: Sachin Saxena --- drivers/bus/fslmc/fslmc_bus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 9b2dd51c4..aa90d686f 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -421,8 +421,11 @@ rte_fslmc_probe(void) * * Error is ignored as relevant logs are handled within dpaax and * handling for unavailable dpaax table too is transparent to caller. + * + * And, the IOVA table is only applicable in case of PA mode. */ - dpaax_iova_table_populate(); + if (rte_eal_iova_mode() == RTE_IOVA_PA) + dpaax_iova_table_populate(); TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) { TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) { @@ -519,7 +522,8 @@ rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver) /* Cleanup the PA->VA Translation table; From whereever this function * is called from. */ - dpaax_iova_table_depopulate(); + if (rte_eal_iova_mode() == RTE_IOVA_PA) + dpaax_iova_table_depopulate(); TAILQ_REMOVE(&fslmc_bus->driver_list, driver, next); /* Update Bus references */ -- 2.17.1