From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30054.outbound.protection.outlook.com [40.107.3.54]) by dpdk.org (Postfix) with ESMTP id C8FC51B52A for ; Fri, 12 Oct 2018 12:45: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=NH2E44KTCtLihyZwfuI1EjPTmPMHwSbBHNdJs+cC4O8=; b=e57tnultZ+FQ4oUhDW2RS1tchqsBaoTcAOdEEmcP2jzSIO0wpYHAG+sG9xrRs3qGkzliq7hFg6Y4rC/KB/SPMv+sOEpsKCRjEhB7n5BtW+sOpjXKyhvFqgMVarUvs77flXAmajpNk0qU5O2OugC+qwm9/cBqNzLXlHGWlYeFRfY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by AM0PR04MB4674.eurprd04.prod.outlook.com (2603:10a6:208:75::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.27; Fri, 12 Oct 2018 10:45:11 +0000 To: Pavan Nikhilesh Cc: anatoly.burakov@intel.com, hemant.agrawal@nxp.com, jkollanukkaran@caviumnetworks.com, dev@dpdk.org References: <20180925125423.7505-1-shreyansh.jain@nxp.com> <20181009112548.7025-1-shreyansh.jain@nxp.com> <20181009112548.7025-2-shreyansh.jain@nxp.com> <20181012090142.GA15154@ltp-pvn> From: Shreyansh Jain Message-ID: Date: Fri, 12 Oct 2018 16:14:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181012090142.GA15154@ltp-pvn> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0025.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::11) To AM0PR04MB4674.eurprd04.prod.outlook.com (2603:10a6:208:75::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ecc71662-d079-40e7-3391-08d6302fca7b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR04MB4674; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4674; 3:T3fFRozLvh0Tne/OQyCsBdiAEo1i70dt22GtyER1cD2/bk8M0cQTe/H0tAxlxZYuS96OZ7j9xDkkpYwPwyCDYUM8BO95tyjWz05JAynxnU5izQIWSR3ZuyJcvAd9BszQpMmjIKuf1Ns35CP0lw1ytclnbQ2jR6V4j2XUpYJRAwxR3hk1KVCHhhtOvlAXaccXbGuznZacGIbnx7y3tzqICiCoYwx7j9GUULqCafTsAQfJAmQC/tGXGV12z/bHpuOh; 25:tVddWk75CMDwTALf9q+6Fpuo6eeHEEqWAMpckuvPt4KjWYshNySigfzoc3674wiSz/5507n1QfzzeQMzlarfBU/l5iGE6+7yUb9o2SH3zA1tCIRoLx0ML+I5GEtONzOLGMbujNR+qjkXXzsuefWsBFpvjX9+orH07iLu4MUCw32pt/Gs/ekc5a/IPY6hghcMnzs+tU0ynFQtEuP0+ElXPHxPbKvWns6BUT0CMUTLWLtFMWpkNtlZaQZZ9YsW5Cy+jvePygLzoKhfEgrapFiGYzCqO04BDsa6nV2F9mUzNNLfohGLyHxcLcQ4neP2IO9A2lnJCl10BxhTQCjGdGiwnQ==; 31:bqFj4Hs7dI8YKat5nursyM98A+MdX48esmPqPGiueuMZvhVv8QOhIjtdYaeh+LiqKehkPmN+LMXuLWF/EGbp3ShzlUvX2X98EP4S+qHYemDSlzebte+Xn+HUXge7CTkZGfB0yCjYyDqEvNQc/iSZe5GmgwJv9MHimpxvnqp7J5vcwdQPmIBW2hxzKrsFnTZ3mX/7OeEbU0MFLu1gNWtt9js98JmOU0lSo2kZvryH938= X-MS-TrafficTypeDiagnostic: AM0PR04MB4674: X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4674; 20:+lv5No3QO/xP/JeWr1aHna27FbbrIrs7jxhOIk/amct5tNZzTcsd8WB4P7kiX3Sk/FX+k2reTrOuVgfbSqo5erHyh0f53WwmyB0zPjUsW7FylsDYBxaI7vCaQr3RnLyw9Koz1hiZct4tzL2B31nhRplrTX5zJLnLh9B7+uATuHKBzHc8T9+9z0eUByNndjK6sEifwUHrljQ1MPDTn/9n+z8wqWKKItBILmz0LB60as8kBabhcYQixMyt4alpeWNa3axE4uFPRNjADv7Ur2lGAHn1OU9tdDF1WIIUqNRUwbRSZpn5uHynxz/ChgxFl1KT14gYslZgbP/D90AII/0hKvZktckVyFe0pGy3xBGw0XjGPitcSZCsV1SPiF8AZK7Y1GyJBLukWw9AYBVrx5Q8KCOt6ZPqifYCHPtH+s0vkoi13pcR3y+Ku3bLqJX5Wiom7Ud5MQ0n5VAkzwX8QdrHqul+IC/71UED6MO+dyH13QAl7G4yOR/eFJOahRkx8OkR; 4:U+rOveeQoEzkt0V6tr8wUKAkFpeF+w/8YlFaBXSCT6Id9nvmxx8EeaKAyrooGjtrlFPV2V3xoNMkD1NzJiW8ING09tuv67O7vkXTaV8v6zD90QV1efLy2wHvOTADKsaAt5+zWxUAg8W1PDOaHLw8cmaI4BYM5wIno7Yv6KO147ob5Se3+oYRNuyhIgt5wRA0/hLoaJmpcthl/C14F/LppHVxNhEx73T1i2iO9zusPCcpZ9StbRgf9B0U4iLFr3w0DoA7JKgNHRZ2LLJxk6SyN21fkefzJu80RnGhGYvcU2uz438icwb4kiUwnfIWYevt X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:AM0PR04MB4674; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4674; X-Forefront-PRVS: 0823A5777B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(39860400002)(346002)(396003)(376002)(366004)(189003)(199004)(2486003)(55236004)(229853002)(76176011)(386003)(97736004)(67846002)(7736002)(52116002)(8936002)(52146003)(23676004)(105586002)(478600001)(106356001)(305945005)(31686004)(6666004)(1006002)(78486009)(68736007)(65826007)(2906002)(53936002)(50466002)(16526019)(25786009)(36756003)(31696002)(8676002)(6246003)(93886005)(66066001)(316002)(26005)(230700001)(6916009)(5660300001)(65956001)(64126003)(77096007)(6486002)(186003)(44832011)(6116002)(11346002)(65806001)(446003)(486006)(956004)(81166006)(4326008)(86362001)(3846002)(16576012)(476003)(14444005)(2616005)(58126008)(81156014)(47776003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4674; H:[10.232.14.39]; 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?MTtBTTBQUjA0TUI0Njc0OzIzOkRKWHp2dTN2Qk56RG85aFo2VnlJQWRCWXRD?= =?utf-8?B?eWhCUjBmT1NoQ3NCd1JPNjJxOHJZeldPaGxQNDVhSkFLTmZnVkp5WnAvcmVQ?= =?utf-8?B?Q0p0S0k4eDduaFhJTjNhS0hGTGwvOEZHMldXQndwTnYxdWpmajlGWWxrbVAx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Rr36TCWetCqKDtHVrU76K559u9QdDSIPbtyll41WAfc2HrmoK15+ljHAt4RwKyWrOynteyigW+mGAHNLkgnuwtwtjvc0mOTaXD3xX4u3IYwxwK9qTYJfCtOKaMwA4NlNPF+dsEN7FImOHrvWb8xUhgCd5nEscSj0stQLg=; 7:+rWOK9KQNkIGVrFKuCb99psLxOEVvOjWR5l20ZqdnU1YUI4OI0gSnglW3CVlKW7jbOi5I3PNrI44Me1lxWYJifwz2Vx4RyAPg3mLevWTVRxJqrXDukXg7piJb7omVo3UQ8k5D0xuvD0XlEqLrC9SIXdRA5aTdAgbCnogK5lVHvGZDYCocDLm32TPO3O0Rl3xWNBvdkzQ/3GQ2Fn0w79IGjgdYCl/QwQaVFaNIPV4DQZZDLW+GFHSp9+zu+Co5XeF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2018 10:45:11.7316 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ecc71662-d079-40e7-3391-08d6302fca7b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4674 Subject: Re: [dpdk-dev] [PATCH v2 1/5] bus/fslmc: fix physical addressing check 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: Fri, 12 Oct 2018 10:45:15 -0000 On Friday 12 October 2018 02:31 PM, Pavan Nikhilesh wrote: > Hi Shreyansh, > > On Tue, Oct 09, 2018 at 04:55:44PM +0530, Shreyansh Jain wrote: >> In case RTE_LIBRTE_DPAA2_USE_PHYS_IOVA is enabled, only supported >> class is RTE_IOVA_PA. >> >> Fixes: f7768afac101 ("bus/fslmc: support dynamic IOVA") >> Cc: hemant.agrawal@nxp.com >> >> Signed-off-by: Shreyansh Jain >> --- >> drivers/bus/fslmc/fslmc_bus.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c >> index bfe81e236..a4f9a9eee 100644 >> --- a/drivers/bus/fslmc/fslmc_bus.c >> +++ b/drivers/bus/fslmc/fslmc_bus.c >> @@ -491,6 +491,10 @@ rte_dpaa2_get_iommu_class(void) >> bool is_vfio_noiommu_enabled = 1; >> bool has_iova_va; >> >> +#ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA >> + return RTE_IOVA_PA; >> +#endif >> + > > As, RTE_LIBRTE_DPAA2_USE_PHYS_IOVA is set to true by default[1] and fslmc bus > being always registered[2] irrespective of the underlying platform, the IOVA class > will be always returned as PA. > This will break multiple platforms as some work only when IOVA as VA. I think > you need to verify if the underlying platform is really FLMC similar to DPAA[3] Thats a good catch and bad patch from me :( - Thanks for review. I will do this now: ---->8--- static enum rte_iova_mode rte_dpaa2_get_iommu_class(void) { bool is_vfio_noiommu_enabled = 1; bool has_iova_va; - #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA - return RTE_IOVA_PA; - #endif if (TAILQ_EMPTY(&rte_fslmc_bus.device_list)) return RTE_IOVA_DC; + #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA + return RTE_IOVA_PA; + #endif ---->8--- In this case, in case no FSLMC device is detected (which would be cases you are referring to), DC would be returned. There is no other explicit way for me to check the PA/VA combination on the DPAA2 bus. Even for the DPAA function [3]that you have mentioned, that is not actually checking PA/VA applicability - it is just checking if we have DPAA enabled or not (complete bus). Is that OK? > > [1] > ->[master]ltp-pvn[dpdk] $ grep -nir "RTE_LIBRTE_DPAA2_USE_PHYS_IOVA" config/ > config/meson.build:86:dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true) > config/common_base:218:CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y > > [2] > config/common_linuxapp:45:CONFIG_RTE_LIBRTE_FSLMC_BUS=y > > [3] > static enum rte_iova_mode > rte_dpaa_get_iommu_class(void) > { > if ((access(DPAA_DEV_PATH1, F_OK) != 0) && > (access(DPAA_DEV_PATH2, F_OK) != 0)) { > return RTE_IOVA_DC; > } > return RTE_IOVA_PA; > } > > >> if (TAILQ_EMPTY(&rte_fslmc_bus.device_list)) >> return RTE_IOVA_DC; >>