From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50048.outbound.protection.outlook.com [40.107.5.48]) by dpdk.org (Postfix) with ESMTP id C7CB64C8D for ; Thu, 30 Aug 2018 08:14:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=92E24C624pVV5oL5ami4ek0yxbtPvLCI90tkOB97x3Y=; b=Luuaf+E0+M0GH+lymm92o+Af34wZXeFKhg1LP5phbgMEUDrwTTggeR85QMG9XxklNZOZ1PhZmJ7v18jNCtqbMBgCVL2p/QysHNFsKg96/NwFRjzOt9sbAkW+AiFwk/fc7tclc+ZitLbCaKUWGjcPycyw89GNFAxbWLKf66ii2tk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from [10.232.133.65] (14.143.30.134) by VI1PR0401MB2543.eurprd04.prod.outlook.com (2603:10a6:800:56::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Thu, 30 Aug 2018 06:14:11 +0000 To: eric zhang , anatoly.burakov@intel.com, bruce.richardson@intel.com Cc: dev@dpdk.org, Allain.Legacy@windriver.com, Matt.Peters@windriver.com References: <1535558289-10336-1-git-send-email-eric.zhang@windriver.com> From: Hemant Organization: NXP Message-ID: <7d4fd31b-925a-4020-0301-0121c6bf96cc@nxp.com> Date: Thu, 30 Aug 2018 11:43:57 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535558289-10336-1-git-send-email-eric.zhang@windriver.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR01CA0075.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::15) To VI1PR0401MB2543.eurprd04.prod.outlook.com (2603:10a6:800:56::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83b76c8d-5adc-4851-bc9e-08d60e3fce94 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4618075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2543; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2543; 3:wMyvDtC7/BtSytCl9efueELnBZZJueZlAW7s2+a1yL28sV1Kj+VlyRzCxKY5eUYMD0vlEpmFQbOnAvXjesSwoJiDYVhMkC1NhnDoIU0fK1k69NvcWoCWf7fY92r7YaLRQYhRSJKtmGqWonnS58gS/FufSSVeA0jpfWmpf2QoDFcRXzKTnNkQ26CmqsWnBXWQ5+KppBtbjA9ld8BNeQTDFIULrnf7AUUDHjTS/AqSkrzQbuSzmnWmBw7Najkq0Jz2; 25:5TFGQPlNroUSsYtnwZaJMoQsCkd2IZuxokak/+Enpx0k8Hng7BXAhmPhiGTWs8WTW3xPkpJgvbnl+2dbHduJG8j0tvGE0+t+mkj9Hb4yP7c7kV8sveNd5m4jzelLbzKtNbcstLQ8Qme+LFzaAn9BaBr8W0tfkguIM2gsbOw3qnNEfz6dS8AOx94iuGwTKPrnIg3Q90BivzWMzgoqZCetfWlX9IVR4iP7Orv2eZ1pm734tuIlnQmnfAbjQ9hKlOoiPNeYWQlsaKGkk8ZfreqJQMhfS7psekr7OmtwimivDKwLSjJrMWOYr5lONE4KB5l8W32zT2cCybN140nE+bCl/w==; 31:P+rpgxuErxyyHTfH18jEIdcFg2OlA8D/g95He2d8cRpfNOI1mntAsy5p9WcZHWfMPlQ8sEzFHDPrd0GEX3+em1Lyp6GGYdoKF73yAtF30a7m9uE6GCBfYG5SYSc7UylEiGF2PymHrTBntSi26bq7ohCimvvCZnRWJeB8LhayWHUspqJKgsnFhjNcyHf8RHGJk1oQqPR2EvjCO+qjW8Dn9QvzUM47ybGv6ber9QKNWj4= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2543: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2543; 20:rhaf0e7qwTxDfXvxY9AunUiU6IJuSWHik4MsFZAcWadUDWS7Ji4a2ZhBmA0yFC3Lh6h5OUuXlGGKK0dIzasL8WwmsuuqQ+50Os1EVtZvV0KWz9IwZOwKVk748ThFl/lr382Tdm4ky+ojbHbWB6ib0sxm6DaSnV3f0qM1TsY5zhPXhwCGNlB7wlRqQhzX75uwxjHOyWkUrzLMrfhiAPlaajwVLBF7uNpTgYL3tGCidnc4qTgvraFt8fl7me5hQDRiFIive0cF/enCJAlhkrUySXl8UmKrl0k2FBrt6NDI6XdIp1SUSU+z5W37EE7JceGVyT9G80PUnwQkFiev/AQSSe/YGhdfmi27aalfFEew8gh9wevQ+A+kBHgbknXC5YL0k4N69OLNHKQj9SIn5ULvJ+iMLFm4hoQfIseVahOAP3JfWXnbtnBpLADI/AK2g92HJno3RwN2Cpvl4xlPZ76VWk3kj/nOJkE4t2R4SU1H8Egfr/5typBslW9my2Aw7Rq6; 4:Wt3PBQYGAYhnn27hh8qE7YV6CZfBQ6kokAKhFtAgv/HbNKcOvNHXBYNqa4/UUHWAcUK+/8lbXOUXsLCan6/PokHDi6Hl4vNMkTuo3PXPQrz8EFYI3DExDIbovkEieTwOv8ePxAPFRgj4TodcSlouBb3hdGe8MwDgLETpKwx7C4P/S+RxBHJS0QeAj5QzW4lf/mdDukfE4tjE+GtmLrhG+rcXvL5qyBl0S9dQEmYagrYSxek/l+IhWTNuhGUzhmr6eT0CLbBp3HmqssVnSAmfDw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:VI1PR0401MB2543; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2543; X-Forefront-PRVS: 07807C55DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(396003)(366004)(346002)(39860400002)(376002)(189003)(199004)(956004)(77096007)(53546011)(53936002)(16526019)(11346002)(6486002)(105586002)(6116002)(5660300001)(2870700001)(486006)(106356001)(50466002)(3450700001)(68736007)(186003)(25786009)(6666003)(5009440100003)(229853002)(386003)(2616005)(65826007)(3260700006)(4326008)(55236004)(31696002)(86362001)(575784001)(3846002)(6246003)(26005)(446003)(316002)(52116002)(23676004)(2486003)(478600001)(8936002)(47776003)(65956001)(36916002)(43066004)(65806001)(66066001)(5024004)(476003)(76176011)(97736004)(52146003)(31686004)(58126008)(16576012)(8676002)(81166006)(64126003)(305945005)(7736002)(36756003)(81156014)(67846002)(14444005)(2906002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2543; H:[10.232.133.65]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0MDFNQjI1NDM7MjM6N0JJM0FIRGlKUm9xWEFCOFY0WVJrUmZj?= =?utf-8?B?RXBzQ2dqc1VDN3ZCQ2FvekVQNnQvK0JtUVRVTzBjVmlHVHp0QnJCRjVkZ29n?= =?utf-8?B?NjROa2w2b1dPY3E1R0hLQ1d5L2djbjJXTnlzaXI3Rkc0djUzcS9scmlSNDhG?= =?utf-8?B?bGF4M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tVZQLfR2E3Wc0l671D1jOMCzLSV/bqXVTtKGIKE4j5wA8ORDOoNMNur9tmj9/sU8Z/O6M79C2FgJd3OP15CIEEGF5YFFfg==; 5:HVphD+m7jmN67GZTIdN6XGxXO3ZK1vuPPI/xwecFkyuShpJvLknwA+EXfivKkSByOs7SPbF4BwALLdIDatJTu5YPLsyTN8F5x3FVFl6OMFeTYthKBS6QnRg22ilo9okZbv+w1FpLUSZhHgn+yDHai+3FKHKO5pTkH6QJivIiuI4=; 7:PKcaRO/Z+5w1S5bMvzlcp1UqdXcSjFwCP12uI4qAk22XUOUTFH2Bl1YuzTX2l6a7Zt9EkiEXoO7Wbq/eaQ/yocQEmnttClesDFFbkhtklHdWn8btYUNVP+vui/YPueX9BgtbkIkVtSaLuJ6vHLEJJHbmBorhbKajqVam/Gl7EZ28OkvlR5mOKDJy24doPhWUxnyLKwFwo2VloZJRBUymbXHWlqTH8hJLlnazqyZNrLoV12AYNxyAbb5AgtpfvYCf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2018 06:14:11.7795 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83b76c8d-5adc-4851-bc9e-08d60e3fce94 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2543 Subject: Re: [dpdk-dev] [PATCH] eal: force IOVA mode to physical X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: hemant.agrawal@nxp.com List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 06:14:15 -0000 On 8/29/2018 9:28 PM, eric zhang wrote: > This patch adds a configuration option to force the IOVA mode to > physical address (PA). There exists virtual devices that are not > directly attached to the PCI bus, and therefore the auto detection > of the IOVA mode based on probing the PCI bus and IOMMU configuration > may not report the required addressing mode. Having the configuration > option permits the mode to be explicitly configured in this scenario. > > Signed-off-by: eric zhang > --- > lib/librte_eal/linuxapp/eal/eal.c | 7 +++++++ you will also need the same in bsdapp/eal > 1 file changed, 7 insertions(+) > > diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c > index e0b5ae1..bee4aed 100644 > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -805,6 +805,7 @@ static void rte_eal_init_alert(const char *msg) > return -1; > } > > +#ifndef RTE_EAL_IOVA_MODE_PA Add the default option as 'n'  in config/common_base > /* autodetect the iova mapping mode (default is iova_pa) */ > rte_eal_get_configuration()->iova_mode = rte_bus_get_iommu_class(); > > @@ -816,6 +817,12 @@ static void rte_eal_init_alert(const char *msg) > "Some devices want IOVA as VA but PA will be used because.. " > "KNI module inserted\n"); > } > +#else > + /* Force iova mapping mode to be physical address */ > + rte_eal_get_configuration()->iova_mode = RTE_IOVA_PA; > + RTE_LOG(WARNING, EAL, > + "Force the iova mapping mode to be physical address\n"); > +#endif > > if (internal_config.no_hugetlbfs == 0 && > internal_config.process_type != RTE_PROC_SECONDARY &&