From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hemant Agrawal Subject: Re: [PATCH v4 08/12] linuxapp/eal: auto detect iova mode Date: Tue, 18 Jul 2017 17:04:24 +0530 Message-ID: References: <20170711061631.5018-1-santosh.shukla@caviumnetworks.com> <20170718055950.10208-1-santosh.shukla@caviumnetworks.com> <20170718055950.10208-9-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , , To: Santosh Shukla , , Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0083.outbound.protection.outlook.com [104.47.42.83]) by dpdk.org (Postfix) with ESMTP id 4F6942FDD for ; Tue, 18 Jul 2017 13:34:39 +0200 (CEST) In-Reply-To: <20170718055950.10208-9-santosh.shukla@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 7/18/2017 11:29 AM, Santosh Shukla wrote: > - Moving late bus scanning to up..just after eal_parsing. > - Auto detect iova mapping mode, based on the result of > rte_bus_scan_iommu_class. > > Signed-off-by: Santosh Shukla > Signed-off-by: Jerin Jacob > --- > lib/librte_eal/linuxapp/eal/eal.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c > index fffdf0d15..49b52ce4f 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -798,6 +798,15 @@ rte_eal_init(int argc, char **argv) > return -1; > } > > + if (rte_bus_scan()) { > + rte_eal_init_alert("Cannot scan the buses for devices\n"); > + rte_errno = ENODEV; > + return -1; > + } > + > + /* autodetect the iova mapping mode (default is iova_pa) */ > + rte_eal_get_configuration()->iova_mode = rte_bus_get_iommu_class(); > + Santosh, With some workaround in fslmc bus scanning/probe code. I am able to test it. It works ok. Post 17.08, we will be submitting the rework of fslmc bus so that this patch will not break the dpaa2 platform support. Regards, Hemant > if (internal_config.no_hugetlbfs == 0 && > internal_config.process_type != RTE_PROC_SECONDARY && > internal_config.xen_dom0_support == 0 && > @@ -895,12 +904,6 @@ rte_eal_init(int argc, char **argv) > return -1; > } > > - if (rte_bus_scan()) { > - rte_eal_init_alert("Cannot scan the buses for devices\n"); > - rte_errno = ENODEV; > - return -1; > - } > - > RTE_LCORE_FOREACH_SLAVE(i) { > > /* >