From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0047.outbound.protection.outlook.com [104.47.38.47]) by dpdk.org (Postfix) with ESMTP id 0D2A2325F for ; Thu, 6 Sep 2018 09:35:02 +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=ylvJozrR6LV0TIkyvsvbzn5VxQLZoT55cAWVKAYuRo8=; b=gPC6IDPNhYqL7ZugNPIq0euyIecSWtIBn7tiPNEGJ/f+ov2Zl+9qQZzVt41Il8+nqoX/pZBMkCM2zkEfQw88HybrhqyKx7kb6J69nYeGSl3kK7lXTOZc+eNzoOY8acWnsm+7a/mezhe06PN4JKSJZbl9RN0TELYOP92qvAvr9zI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (31.216.236.195) by SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.17; Thu, 6 Sep 2018 07:34:57 +0000 Date: Thu, 6 Sep 2018 13:04:49 +0530 From: Jerin Jacob To: Eric Zhang Cc: santosh , hemant.agrawal@nxp.com, =?iso-8859-1?Q?Ga=EBtan?= Rivet , "Burakov, Anatoly" , bruce.richardson@intel.com, dev@dpdk.org, Allain.Legacy@windriver.com, Matt.Peters@windriver.com Message-ID: <20180906073449.GA20576@jerin> References: <1535558289-10336-1-git-send-email-eric.zhang@windriver.com> <20180830094323.37xkgud4fz3mflbg@bidouze.vm.6wind.com> <0f19de06-fccd-eff2-b33e-71d49a005dbb@nxp.com> <9ae6e3dd-5f33-d874-9a58-730435b58de3@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ae6e3dd-5f33-d874-9a58-730435b58de3@windriver.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [31.216.236.195] X-ClientProxiedBy: DB6PR07CA0023.eurprd07.prod.outlook.com (2603:10a6:6:2d::33) To SN6PR07MB5005.namprd07.prod.outlook.com (2603:10b6:805:ac::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a40a4ea6-d00c-4b3e-1b27-08d613cb4054 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5005; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 3:XnZqxpw0I54ia0ZkyJAOBX3WepWbyqbAgvkAaIc3XuhUdTtZ2pPX/0e5x3/3/GVNqx3vye6HHWYpiskVI6aXY+pYt2m5m34citgBH3zrW8UJf63mAAGsrPwB43ewtvUTDhpdgKGDzpXTm/2shO5rAkerk0kd9eoFQZLhY7qzm83ZnTYtYdR38FCAjni61xwW2B4ltLLcuTMWx/IRjIjGXdaRLVZevH4BSlnfglCu5S4iQ1Dz+fgXlghtDS8dmPa5; 25:3TW1piigdMYiT4J64HdAgSRGDA9SzKW/L+G6pRyGQneusseMmCi/+9DHPVQHUBgI787uBkl34kTcWzrmp3/HX9ZL4yGFiGYKH9fEx6UY8FEmonpSd+i6c0jDF2R0kM3B9fJXFLX/qEwonMt9ExsdOWp2EvMb5QZdRMNlR47WXgQM29BcE8kpiUJZ5jHdpsLm6Z63aMsvIhL5ibztvp05rBkgawmkLQEfPhzozi1qv556lVFMGGj00mXBxcmrzT/md4ThdNmGK+2iqhagsxV47ZO5TVOHP/7/UpkBByqfRilKoXaa9ycmZMxtHt9pyMUYWwa+jXSdaajng5AjoioBpw==; 31:13mPsdSW5Q85n60U4qP5Ve8Ked4l0tzzhlWED8K2LuQs9owG6lRSosD8SQ7WVt4FVwiMZFj8kGZp7otKPh7r5dssqBRgdTElSBQyrnWjB1oSbQ7YGv98Fz8CjBmqyBiuoxMr4YDhQHEI+R5rSm7Odjaot0MyUkfwvCNT/enJVBKbVOaAPrZ/zise5cqj1fiG5IZgh7jTJJ76PHOxUVao3v2d9lk8UdqisAWaiQFg+h4= X-MS-TrafficTypeDiagnostic: SN6PR07MB5005: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 20:roVSlzNmX4xQIOVcb5A5Xu+KJ9Mmaqddkk1YNzFMoP27dI0wuGEUDjV+vSLaVm2I1VUxq+iYY5EfveKz+Ps3tHRL89jydAWr17+T6JMlaS0FmvaGVqjFuVavOZufSLNdmsGxTir+S9Au7oZx0YhfBo5QZSDBIp0zxb+Z3K/fu76EYD5gJ1jtQ57GJ+C0Dc7qixbwQN3h+/zA2pA93iwNYUxh4CjdlLkDEByUns1MePZTXZKwNreBl0paJsXTyz+A9ZthJL+FH3gcjZ9ML6l/ZlDnqra3iDOaOk+/IEbLGVsFFMaozwP0oEg8ZTrqGRAv4J7W+ByMJxb+d9p90uYCbfWgQjxSSwSEfBdN71hcE3yhcZ5mb/Dt0wY9GLexumNybGSkqBDkHgPjzWvDz3EqK3tZVRRpqbKKk+C4bRbuDPepbIOOARG6Oia5IXuaqSUbOfI/FzrY1DA5ZxY+17VWl1n7v5oxDrAkoD8+0Qcmm6uRD3RiEDQdo3nGLMt3b1D99pM3lGdVQss3lYkX95CHI9ajCO/UGvNC5qVh0bECYNz6J50XdDQFCuvex/bwpWqLoSTvf0K9jZM1X7V2wLTjhnWGjUnIovhDIsHCaMfb7Gw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201708071742011)(7699016); SRVR:SN6PR07MB5005; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5005; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB5005; 4:6OXl0XFMVZRjx/l/vyvWPLeufdklM/qhFbCIT4nIqdJXBqHUU764+3qKd/2yO5L4tBYSPrkayak3QNMKlKnZCVz6geo19oIqIapdHzJTwzuC6vV7Kk5UWPmiRIV16IQJ9rjo8PJPyYE8fGwsb6nyfCRAdDnypaKZ2F/7s4OQgDxnvIZGtHA1G+7wdFdNIEoF+im7+vDDgIEDapKb4aJexZOwTYmAKsxiT/v9msgxfbiJP10vzgUvy4L0+CB3tDes5Ow0gMOcnpuwSclr+RMY+A0no0zUU88Zla0AObrPLRNTkaB1QkhnPmaz589q/SgwYg+KswdQdkVgPod0GCDaouwsNSD0MDHU45uCm7sd96I= X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(346002)(396003)(39860400002)(136003)(13464003)(189003)(199004)(966005)(72206003)(6916009)(76176011)(478600001)(68736007)(52116002)(305945005)(316002)(7736002)(33656002)(66066001)(33896004)(23756003)(5024004)(81156014)(6666003)(8936002)(81166006)(58126008)(5660300001)(47776003)(93886005)(54906003)(33716001)(8676002)(6496006)(53936002)(42882007)(26005)(53546011)(44832011)(55016002)(229853002)(3846002)(386003)(6116002)(9686003)(6306002)(25786009)(105586002)(446003)(106356001)(186003)(16526019)(11346002)(476003)(97736004)(2906002)(6246003)(486006)(1076002)(4326008)(956004)(50466002)(2870700001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5005; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1; SN6PR07MB5005; 23:T3xdYPVog89cGZh1GymsAbQ77F4SEO3pH/UJXBM?= =?iso-8859-1?Q?eNPeXOUc+741HrlSKIkoGmME/7oqz5Juy1BghoOa4JnuYulN6hQHUO49EN?= =?iso-8859-1?Q?s7KfTMRfAcc36L59sVDMrftYGCO6Uxt8xfuALtl0ZyZtblFQZvylUkatgR?= =?iso-8859-1?Q?Pa2TmliliFYf5S2Z/ROsvtV84k83yJj3Ae64WC/5p9jJ7MC/MPMoxM2/gV?= =?iso-8859-1?Q?8KvKsWEK8BRlA4Z5KGB2HYLu2mImTfrf1f9dDgkL/N3cCr3zH6GVmJxRU1?= =?iso-8859-1?Q?pJmCjhadh8ppLCm7EhjPQkqpXf+S8KpO5FgwziBBJIFV0YOjRMW+g11T4m?= =?iso-8859-1?Q?CixdpKbLkQe6lL1aP5tbEW22kdyPPGI7UjhULVrQiP9gVNhQhJvFsEH80F?= =?iso-8859-1?Q?EMbjXfMF9520gczgx5Pqw12q9n3hCmkcQAHFsYIwR1Sz4C0JMFhVZ+ELk4?= =?iso-8859-1?Q?1mRXJBlUS38gu5/dGL6XX9WI2zWD0MERUp1F+GT14kIv+spnqiU5Iu8z+y?= =?iso-8859-1?Q?hwqmLEu1j0g958EumAtE4BFQOqSqSxOU5l8YEwAkyqWMQF0t+HgA5UuMMm?= =?iso-8859-1?Q?3QmIx7t+pZwbbZHzrHuQSb737WqQehLgMBYbYoXb6fRg4Tn+/Fj5Zj/tCF?= =?iso-8859-1?Q?PSaxY3NJOXHHzIT6e2i73Blk9f1TvHd1CfPU67x+mw25wami4DVt9y9oxV?= =?iso-8859-1?Q?sVNdT3emIMs9B7/ugmagH/nRlju4kernpVwlimc0C0uo3L7kRFnTrkvlu8?= =?iso-8859-1?Q?eCfnVAW0VfR9wX4oUHaV1+VbzliSVDcfyGCMJyqYW0ZWEMAveIqLyP5KTN?= =?iso-8859-1?Q?dJ1oNO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3vqN8fiz3jQhQWNEg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 07:34:57.9608 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a40a4ea6-d00c-4b3e-1b27-08d613cb4054 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5005 Subject: Re: [dpdk-dev] [PATCH] eal: force IOVA mode to physical 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: Thu, 06 Sep 2018 07:35:02 -0000 -----Original Message----- > Date: Tue, 4 Sep 2018 23:40:36 -0400 > From: Eric Zhang > To: santosh , hemant.agrawal@nxp.com, > Gaëtan Rivet , "Burakov, Anatoly" > > CC: bruce.richardson@intel.com, dev@dpdk.org, Allain.Legacy@windriver.com, > Matt.Peters@windriver.com > Subject: Re: [dpdk-dev] [PATCH] eal: force IOVA mode to physical > User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 > Thunderbird/52.9.1 > > On 08/30/2018 08:59 AM, santosh wrote: > > On Thursday 30 August 2018 05:43 PM, Hemant wrote: > > > External Email > > > > > > Hi, > > > > > > On 8/30/2018 3:13 PM, Gaëtan Rivet wrote: > > > > Hi, > > > > > > > > On Thu, Aug 30, 2018 at 10:09:04AM +0100, Burakov, Anatoly wrote: > > > > > On 29-Aug-18 4:58 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 > > > > > > --- > > > > > Defining this at compile-time seems like an overkill. Wouldn't it be better > > > > > to just add an EAL command-line option to force IOVA mode to a particular > > > > > value? > > > That is a good suggestion. > > > > > -- > > > > > Thanks, > > > > > Anatoly > > > > What is the bus of these devices and why not implement get_iommu_class > > > > in it? > > > There are cases, where you are using dpdk libraries with external > > > libraries and you need to change the default behavior DPDK lib to use > > > physical address instead of virtual address. > > > Providing an option to user will help. > > > > > > > > More appropriate solution could be: > > * Either fix it at bus layer .. i.e.. get_iommu_class().. > > * Or introduce something like [1] --iova-mode= param. > > > > Former is better solution than latter if autodetection is a key criteria. > > Thanks. > > > > [1] http://patchwork.dpdk.org/patch/25192/ > > > It's not generic which couldn't be fixed at bus layer. > So what's the preference of EAL option or compile time solution? > Adding --iova-mode as patch [1] will overrivde auto-detection > rte_bus_get_iommu_class() > make it no use; compile time solution will align with upstream and keep > new atuodetection > solution in #ifndef. If it is for vdev devices, why not introduce something like RTE_PCI_DRV_IOVA_AS_VA and let vdev device describe its personality. And based on the devices(flags) on vdev bus, rte_bus_get_iommu_class() of vdev can decide the mode just like PCI bus. > > Thanks > Eric >