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 B9383A0613 for ; Thu, 29 Aug 2019 12:45:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BB371E8D0; Thu, 29 Aug 2019 12:43:12 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 154A31DFE8 for ; Thu, 29 Aug 2019 12:42:01 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C857E200332; Thu, 29 Aug 2019 12:42:00 +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 C67BD200336; Thu, 29 Aug 2019 12:41:58 +0200 (CEST) Received: from GDB1.ap.freescale.net (GDB1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C5898402D7; Thu, 29 Aug 2019 18:41:55 +0800 (SGT) From: Sachin Saxena To: dev@dpdk.org Cc: thomas@monjalon.net, Shreyansh Jain Date: Thu, 29 Aug 2019 15:57:32 +0530 Message-Id: <20190829102737.13267-26-sachin.saxena@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829102737.13267-1-sachin.saxena@nxp.com> References: <20190827070730.11206-1-sachin.saxena@nxp.com> <20190829102737.13267-1-sachin.saxena@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 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