From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0082.outbound.protection.outlook.com [104.47.32.82]) by dpdk.org (Postfix) with ESMTP id 637A0915D for ; Mon, 14 Aug 2017 18:13:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lfKmy0YCFV36tuNW0YuiHarjUvWwef42z5yqOzF4RjI=; b=BAxjsAYszDKLX35N3ozMMayqWBsHYJHCvOGhc7zMPWX1w4DxbcIDn7/95uGyWMlvlZkwQzoRPxc7qgC6piaYKyx+Y9DoFD4sq8EPiab2DOtX1isymY07tOnWGnro9mUaw7eloLnTQyAlPcTGt1qJl/zLM0DU9KjBwaRcTdf7P6Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by CY4PR07MB3093.namprd07.prod.outlook.com (10.172.115.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Mon, 14 Aug 2017 16:12:57 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: 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, Santosh Shukla Date: Mon, 14 Aug 2017 21:40:56 +0530 Message-Id: <20170814161059.6684-10-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> References: <20170724084004.25542-1-santosh.shukla@caviumnetworks.com> <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: PN1PR01CA0087.INDPRD01.PROD.OUTLOOK.COM (10.174.144.155) To CY4PR07MB3093.namprd07.prod.outlook.com (10.172.115.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eb59fd50-2d0a-4dbb-2be3-08d4e32f56e7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR07MB3093; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3093; 3:HYlBUZaP21XhIBnwD8EGD/FgyLKrpzhPbGlhuTJt7vsURNoaakT1gwrPBkNUhiTYdII17SE9Wk1gv9VJL+4b4WVvYjqFpQwPWroJfw6cMj6bTyjLcHjrGAfM1NTVLGtl25t6sxqn1knNx9K50CSOvkwxH4wu/YSZLCCKP62+BWAyHuhn7ELkopjzZF+bY2/bqb7zB+5HGPwmC6rCYEGY80jAzrAEhaVpJFVZEn7Qq471dsIrwNV/jV5pLRK6QJGv; 25:wsb2rX2hgADVH3hqmFxOCNxz1btzp0auo4KtnM/CS3R9/N424L8j0DJkcUBBJx0RyRszknlp45D8DwDT07/qZnWZ3CWgVgkiOZobF9uVDCxcyaF3pTMwalYRZ3xozTKUGRHN18DPD72r9T1VTpms8X+vngeiaDsStfHuYrc1GfJmJZc/xUbyEdTuxuE7CiVevZQr8LUtA2DShrwZqsd/97hY3J2EhZGaGPG4OSpfXW5xJPOmwWmjF2aWKvbVGDNe2TW3yOLeDAKb/8txiNWhs53a7wqMIIFj9lYsc5Pkr2UImNO4bMlrjMD70wf/OoMb0ZWlLP127kgVDqDT1L1Jrw==; 31:25VYUOqDAHAdzYF4UFXZex9WOlBgQpOxvNEdF9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GvWcmUyM2Ylu18GckOsMzAHnvv7PRWaS1aX7Que8n+cj8KfFYagEir3L X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123562025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3093; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3093; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6069001)(6009001)(189002)(199003)(76176999)(101416001)(1076002)(50986999)(8656003)(6116002)(66066001)(72206003)(7350300001)(5009440100003)(3846002)(107886003)(47776003)(110136004)(2361001)(8676002)(42186005)(6486002)(50466002)(48376002)(105586002)(106356001)(189998001)(4326008)(6506006)(5660300001)(2351001)(25786009)(6512007)(81156014)(478600001)(36756003)(33646002)(7416002)(5003940100001)(7736002)(305945005)(68736007)(97736004)(50226002)(6916009)(42882006)(2906002)(2950100002)(81166006)(53936002)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3093; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3093; 23:6q9EzY0iV1M7AaSANGW7PRhmKba36WpneL1NRPYdk?= =?us-ascii?Q?WpDwCxh8Zl8+LSbbrsNJTH2jwA4dEqzh2X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fYf1MHc2Vi57wEMRxEgg9gq5zoJGajcg9hfOFDwBBex1vrqpWK05Tpomnw0Xn+7aKnB3LcrcAT1F6QAIZRDshy6Sq9KwOzDLrHXvZFmg/FLZhKXUIUuODRzB8PUPF0KmoVPw+EFtJZpMabk0vKN9oyVFra3p+87spKhefUDHsuvvcT2Bkd12chSPwGawAPF3s+kF3o1AMqKUJnWbgyMa8MM+of8k= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 16:12:57.5788 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3093 Subject: [dpdk-dev] [PATCH v6 09/12] bsdapp/eal: auto detect iova mapping 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: Mon, 14 Aug 2017 16:13:04 -0000 - Moving late bus scanning to up..just after eal_parsing. - Mapping mode would be default for bsdapp. It supports only one pass through mode (RTE_KDRV_NIC_UIO) Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob Reviewed-by: Maxime Coquelin --- lib/librte_eal/bsdapp/eal/eal.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 07e72203f..53ad87b95 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -540,6 +540,14 @@ rte_eal_init(int argc, char **argv) rte_atomic32_clear(&run_once); 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(); if (internal_config.no_hugetlbfs == 0 && internal_config.process_type != RTE_PROC_SECONDARY && @@ -625,12 +633,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) { /* -- 2.11.0