From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 0C8387CD5 for ; Wed, 16 Aug 2017 19:38:46 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B89720275; Wed, 16 Aug 2017 17:38:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8B89720275 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=aconole@redhat.com Received: from dhcp-25-97.bos.redhat.com (ovpn-122-168.rdu2.redhat.com [10.10.122.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C9A5600CA; Wed, 16 Aug 2017 17:38:40 +0000 (UTC) From: Aaron Conole To: Santosh Shukla Cc: dev@dpdk.org, olivier.matz@6wind.com, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, maxime.coquelin@redhat.com, sergio.gonzalez.monroy@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com, anatoly.burakov@intel.com, stephen@networkplumber.org References: <20170724084004.25542-1-santosh.shukla@caviumnetworks.com> <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> <20170814161059.6684-9-santosh.shukla@caviumnetworks.com> Date: Wed, 16 Aug 2017 13:38:37 -0400 In-Reply-To: <20170814161059.6684-9-santosh.shukla@caviumnetworks.com> (Santosh Shukla's message of "Mon, 14 Aug 2017 21:40:55 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 16 Aug 2017 17:38:46 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v6 08/12] linuxapp/eal: auto detect iova 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: , X-List-Received-Date: Wed, 16 Aug 2017 17:38:47 -0000 Santosh Shukla writes: > - 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 > Reviewed-by: Maxime Coquelin > --- > 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 febbafdb3..5382f6c00 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; Since this now happens before hugetlbs are allocated, is it possible to retry? If so, then I would say to clear the run_once variable. > + return -1; > + } > + > + /* autodetect the iova mapping mode (default is iova_pa) */ > + rte_eal_get_configuration()->iova_mode = rte_bus_get_iommu_class(); > + > if (internal_config.no_hugetlbfs == 0 && > internal_config.process_type != RTE_PROC_SECONDARY && > internal_config.xen_dom0_support == 0 && > @@ -900,12 +909,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) { > > /*