From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-SN1-obe.outbound.protection.outlook.com (mail-eopbgr700078.outbound.protection.outlook.com [40.107.70.78]) by dpdk.org (Postfix) with ESMTP id C02361BA8E for ; Fri, 12 Oct 2018 18:29:27 +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:X-MS-Exchange-SenderADCheck; bh=oY4IRPV/IEyZ6PYz5srNaw7qeinQFec8gPhewkE2h0I=; b=SawIIgmY7ieVQu20c3J9iJt4t84HDZjVPIXT3Xiy8zEmLbvlyZN6T0VBNGLW7PiCVTuRKGGai6EOf9COIYBbG2LFRkH1EnstVcb+pbNwTrqQb5Oq9In7tN9TQ/ferUCRfdHmm8bE5SSHAvMRJ8G5UC5GeDSOW33VVXH1QFNRhuk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from wstn-pvn (111.93.218.67) by BYAPR07MB4966.namprd07.prod.outlook.com (2603:10b6:a03:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.23; Fri, 12 Oct 2018 16:29:24 +0000 Date: Fri, 12 Oct 2018 21:59:00 +0530 From: Pavan Nikhilesh To: Shreyansh Jain , anatoly.burakov@intel.com, hemant.agrawal@nxp.com, jkollanukkaran@caviumnetworks.com Cc: dev@dpdk.org Message-ID: <20181012162607.GA21825@wstn-pvn> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0093.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::33) To BYAPR07MB4966.namprd07.prod.outlook.com (2603:10b6:a03:5b::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd8eea2d-17c3-4cd3-c339-08d6305fe05b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4966; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4966; 3:hBUvP/g1qRxxdHB3qbVhMHl+ozmx31q5mROUUzdsPZTPBF/PVex9ATsdY6R50GV1Xpb9wS8gJZa9KYe+3P2ANBXdiZRx5KIEw/XQug0wDD5tmBE4HWjjVtLfsZ3KON8CC7ShPoDTK5qUT8jTUE+arrfiR+9ATiU2JWgdEuNQzQtp4LS60G1XBAL+Q6+vpf//QLGYClmzQzlh0WrzSRZpcXZoJetk2pYV8p01EvsuLidhdXWOSOfOmPxyHWZw/PPc; 25:B6DaHI4gCSG59d7oj9npQub/efRHtA8nfo5zfCJ2oRK20LJZdU0hr/YqADp8H3rAaOICw1cX8x7ow4lzAi3XChJICJYV/9etDyaCeT+EDO7mYAvlbflDRz7TPhCETwehPc1WzUPIu+Rqvc/UZZG9DM84JRwGXkH3E4NEFrSSrz8Jux+CGUdmevr4pF13Rxg7+zu0O21EXWaZYD3Jy7+rrthtO78F9BVvvpJ6XdNFaRr8R1JpSdqR7L+BFTYbJUMlml/ZV/MQMkhc5TwLStEuYP9Qo/710T9IJeM+iyxoOJfIgaR7wuw33xUBsJxm18Y0BUpdw0DxqnM/wmAq2T2FjA==; 31:5u24Nv+PvDX6NkM5VuIqRDiXaYNP8iu0gGOeLy6CInj7eRGYysoWPi7sbE9HSc1+t0XHPvrw1T4TQfm1PBb0OV79BTIQM9YKirFsl0EypQ4ze+yDnZRnYtvvS5mERqNiaF2y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Pu0/UOItkjnsNf/3w6gSU2s16+0JJaYdItX7AY8O 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)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(149066)(150057)(6041310)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:BYAPR07MB4966; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4966; X-Forefront-PRVS: 0823A5777B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39850400004)(376002)(136003)(396003)(366004)(199004)(189003)(42882007)(186003)(106356001)(6246003)(47776003)(16526019)(6636002)(68736007)(26005)(5660300001)(6116002)(33716001)(81156014)(81166006)(2906002)(25786009)(105586002)(305945005)(7736002)(478600001)(23726003)(8936002)(8676002)(33656002)(1076002)(316002)(50466002)(55016002)(9686003)(3846002)(14444005)(33896004)(16586007)(386003)(58126008)(6496006)(11346002)(52116002)(72206003)(446003)(76176011)(4326008)(53936002)(956004)(97736004)(476003)(486006)(229853002)(6666004)(66066001)(93886005)(1006002)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4966; H:wstn-pvn; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4966; 23:JtH2vKpl07NYLf90HeZUfIHK9T4FIVTP7fCddSHkw?= =?us-ascii?Q?XOJhK6Qtl5OaHi10SuQj8gWwq874GsRfpJj3t9pqAzoCD3Ub5lr3rXkCKOO8?= =?us-ascii?Q?UoGq/unG5f1V428C7VEXUElfJksYjzCt9+qIMk6EL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Ebzjote54lpVI9wmJ5YOOTZt9y+P33u/M2eXmMhM1Bf33q6rKvi2lJKIdLwxpT6yxEMiIaAHaPLEyhuXgnOzkv5UdWaeCF97C3D6GpJdD/AS4Nq6sIZIAyEJYq8l4StLDqAtKf3GOlvRhUF0R46P9w/vOxHzoYRtqFCMjOn1oafGDgUlUhRAWt6g1uymWFJniUDyjt5RzKeH3DBJPxgDb3Y3qzA6umd8CmkM28TeW2vAeZRp9sGTWbf7aqsT70pIeBSpAjgWd5RoCDs1ld3Bj4qwxdvUcbGXDbUIg==; 5:GEKIkKlXW3zu5j1zR7axhvUfyLbuj2ePBO8EZdy359KX3iiPu98bXqlVVlnvzQ2kr1QIqsXeqfa12lShKLhqrV9B+JE06KK+p6Ypp/43bCrqwFCUquMYO9I6uEHJeaZvPhBNISgERh0oIVAB6vA0YYyAKfDEwNP8pOeiQcJdADY=; 7:EMGGTDER5A2EzQXikAZriahQODOVpfReewFqVjJmqyxEN+9w4ew3y2QThNipkNyJ2lzkqjiJHeN4XRebOdgRz2cyijoEThpWFApQ9fOy0+dCOwyTBaNJCxN/NKY2d1WzpXDJh5poGwJTGbkWYzeIDoR2euiUoAZVkib6Zqy3qeAK5M+iaRwHhYufBwyOKIrg5SX9dIOi+FnQWvvqFSjNlWZ8v9oMu9dbZapvVNvieTK5L8o8klO/6U2Q1zKeOwwS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2018 16:29:24.4656 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd8eea2d-17c3-4cd3-c339-08d6305fe05b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4966 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 16:29:28 -0000 On Fri, Oct 12, 2018 at 04:14:36PM +0530, Shreyansh Jain wrote: > 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? Looks good to me :) cheers - Pavan. > > > > > [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; > > > >