From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0065.outbound.protection.outlook.com [104.47.36.65]) by dpdk.org (Postfix) with ESMTP id A43AF2A5D for ; Thu, 7 Jul 2016 12:29:05 +0200 (CEST) Received: from BY2PR03CA042.namprd03.prod.outlook.com (10.141.249.15) by BY2PR0301MB2021.namprd03.prod.outlook.com (10.163.196.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Thu, 7 Jul 2016 10:29:04 +0000 Received: from BY2FFO11FD055.protection.gbl (2a01:111:f400:7c0c::159) by BY2PR03CA042.outlook.office365.com (2a01:111:e400:2c5d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16 via Frontend Transport; Thu, 7 Jul 2016 10:29:04 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; rehivetech.com; dkim=none (message not signed) header.d=none;rehivetech.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD055.mail.protection.outlook.com (10.1.15.192) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Thu, 7 Jul 2016 10:29:03 +0000 Received: from [10.232.14.199] (Tophie.ap.freescale.net [10.232.14.199]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u67AT0nR017938; Thu, 7 Jul 2016 03:29:01 -0700 To: Jan Viktorin References: <1462542490-15556-1-git-send-email-viktorin@rehivetech.com> <1462542490-15556-29-git-send-email-viktorin@rehivetech.com> <577397EF.2080300@nxp.com> <20160704150451.1a61fbbd@pcviktorin.fit.vutbr.cz> <577A7245.700@nxp.com> <20160704163646.45d1f0f8@pcviktorin.fit.vutbr.cz> <577B3ABE.4040709@nxp.com> <20160705051630.5861459.88497.5797@rehivetech.com> CC: , Thomas Monjalon From: Shreyansh jain Message-ID: <577E2F15.7070607@nxp.com> Date: Thu, 7 Jul 2016 15:59:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160705051630.5861459.88497.5797@rehivetech.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131123609435347020; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(24454002)(199003)(377454003)(57704003)(189002)(105606002)(81166006)(81156014)(106466001)(189998001)(7846002)(33656002)(4001350100001)(2870700001)(64126003)(36756003)(356003)(4326007)(15395725005)(8676002)(59896002)(2950100001)(110136002)(97736004)(8936002)(50466002)(305945005)(80316001)(77096005)(87266999)(104016004)(11100500001)(76176999)(65816999)(92566002)(54356999)(50986999)(86362001)(93886004)(87936001)(68736007)(85426001)(47776003)(6806005)(65956001)(83506001)(23676002)(19580405001)(65806001)(19580395003)(586003)(69596002)(15975445007)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB2021; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD055; 1:/CjtgKWp8WdXx5qJf98QXksK+czvPSZ9WUNy9E78wWNrTyu4ZNT4FVuZHn8OTAackAcjbe3yVgUlqoY2s5T+xGJFSLWKcqr2+ryKZ0fRzhB6nicLVdhgANgkLqc+QXPdEC0Uv6CkXKrDlS8TVLDbIk+QqjIXWWWtRSja7VJraRjvdAE0pOWRFmXQnP/eqRxq7Yyq/JIKpg0wCqdfCjfMdsqtxBcvn+bb8X0Zc504uKyPRo+1Ki76F2NWfxr6DpLDa79amYst2sA66pqFyeAQmVVVfcetXEBl4D9X9EqDowE6V6wrbcd92ecGkI3TEM6H/EzwOSOAPEsc92afk34liEuT2waTQaRvY03hjp5RFhbdcagCJ/dM0bUjKZRBQlhl4qMh5/pn7zmET2Mi2q3/HbRSqODqauYQRhyHwE19ul+vS4BT1V0EdHKjpqs8bQBlrHkgr5iivE2sj4PT42jwPf3vrm6Ty28KMCQxRLcmS2LWB+HFN0YvTail7tQw6kZUA5cskLFWAqjk4SRecrriCj/bkilXnwBvpTLQRcdIG6ks3rEyQl/SeKDy61vAMmhoxiR3EtKw5nXr2EOZ8G+9Gg== X-MS-Office365-Filtering-Correlation-Id: ee034cff-791c-41fe-984c-08d3a6518486 X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB2021; 2:nfamqlmc5F9Ty7O8f5UsV/5hnS8yjqSwMjUDq8eWcQRT8sDjmHzechdsMZ63LXmuBsAD2UNGb6k5qosg2hAIV56QBURxanSNy58uD3lf7veKhtCFhuvDCs3IAJ7iCcqoxj4rr+VG2+jEe2hA42b/D/8kyxpdJw1gg4GfUXYMY4ewLYJhCHVEDUwcppL65ejD; 3:6Rtt0yB8ogQs0SPd1bkqLIZiWMAkocthaXNpv+yCcltRYRpno/ms8Y5zw7mV1S3FcBKwqLgZRh6FmsRz2ty4sHorh4RvR66+jBtEHcwqX1ra3giqLrhFwjHyxQjPNxSGQFRStzb6yWs6FoIlJU0K/6AglYMAFFwTiuADQzHU0HEcqIfUhAREzN1ymnLf912nTGfTfE52LXloIGdgKL4gXvx+6+2iSH0WFMxo3l/zFMM=; 25:ucoqOuoIKJRA2NlqTdhMVj73YD2sBLhdWJHIeKZegiIPjmcdOYjs6LhkJNwNSF+knXPhlANo84GAbSMilWK+exES3gbb2RMczEoWXjp2Ur9TVVkArDDB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L9Uc04BPakfn1oDdqTNgil/jT35qArNEKJTEJ2m3NXc05KVaUJEEux961tpdsJ70QcTCoYsTebZKFmFlyXsmgzPknVPgPEAQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13024025)(13018025)(13015025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:BY2PR0301MB2021; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB2021; X-Forefront-PRVS: 0996D1900D X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjAzMDFNQjIwMjE7MjM6T0tkemFSMjltWUpYY3JXSVJHeStEbk1s?= =?utf-8?B?WWsrM0E4YWZYeHIxQWR6ZFV2QWhZVUVoWHNBRlZoampVaFVWUUR1ajcyOGxP?= =?utf-8?B?Z1lTdDkyNW05ZDJzYUdaamVPRFRhS2RxUURnYnBjZ0gxSjFZOGFtV1FzVWVt?= =?utf-8?B?V0E4OEo4QjRUQkF5TTNQSklPUjB1UVpxT293YWVVbTRidFU0NkllcExaamFv?= =?utf-8?B?RjhUM0Y4b0N5TWErVXBqL2dKczlkaG1yM2hObmU0eDZDSFlUejVLQmhUQzJu?= =?utf-8?B?bUsvRk4veFo1a3JWT3lPemRPRVFqWVQ4aTVKWGNCcU1KNVpQcTlTS2t3emly?= =?utf-8?B?V1RRUENEcXV1TXRxOTc1YlEyVytPR1htN1QzQjk1Wkt1R0Y4VlByQ0djcWg3?= =?utf-8?B?ZS9LYW1yd3JpODBMYUI3cTFGNWFHY2ttalFvVXgrNm4wRjN1TnhQRkh0UmhV?= =?utf-8?B?REdRZWNFUmR6akVFejZCRFRVQkZINHJIMEE1SlZ2ZDRtVHlHaTdaSm1EUXhY?= =?utf-8?B?dVNLU2pSSHZNeWs5L0hzU2drM3Y5TC9tOWpwSW5BN2ZQVVAvSmRWN0Vma1c4?= =?utf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VxVnD+fbbec4U6gE=; 24:+UAODQTgrozPU0fkMSeAGRQHPxH19wNAUI4zXmHYfjk8RO1McCvsinZWaxU9j7ee8DAmBJX9zgiVSN+cOeUcoohQYmHfPPeqascI0IkjdCw=; 7:ILlI8D7lpTlGeDFj0/LFiyHXmyYpbsEtvGUrsoZqZ+dywyZUXIo8ZWYo4KN7CpKIy4oeLKbJZOHYHqQNlE/VtP5TS3kC2paROg6mQmOEf9BufGqr6GbokUtYeftdZN4X/TQRfZ9igYqeRACsaQBTicwE2JrEw1JHjSZYOfltc0tQIIxpp+qqOhNiGXkRHDZgYgMEqL7U/boq3e4hxLIW9fhiCIJZfTfiSRGtdk1bieXcB0e7WagyRnyRHpGg7y4K SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jul 2016 10:29:03.3943 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB2021 Subject: Re: [dpdk-dev] [PATCH v1 28/28] ether: support SoC device/driver X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2016 10:29:06 -0000 Hi Jan, Apologies for delay in my response. On Tuesday 05 July 2016 10:46 AM, Jan Viktorin wrote: > Hello Shreyansh, > ‎ >> On Monday 04 July 2016 08:06 PM, Jan Viktorin wrote: >>> On Mon, 4 Jul 2016 19:57:18 +0530 >>> Shreyansh jain wrote: >>> >>> [...] >>> >>>>>>> @@ -1431,7 +1524,7 @@ >rte_eth_dev_info_get(uint8_t port_id, struct >rte_eth_dev_info *dev_info) >>>>>>> >>>>>>> RTE_FUNC_PTR_OR_RET(*dev->dev_ops->>dev_infos_get); >>>>>>> (*dev->dev_ops->dev_infos_get)(dev, dev_info); >>>>>>> - dev_info->pci_dev = dev->pci_dev; >>>>>>> + dev_info->soc_dev = dev->soc_dev; >>>>>> >>>>>> I think both the members, pci_dev and soc_dev, should be updated by this call. >>>>>> Is there some specific reason why soc_dev is the only one which is getting updated? >>>>> >>>>> Yes, looks like a mistake. Thanks! And sorry for delayed reply. >>>> >>>> No problems - thanks for confirmation. >>>> I have gone through almost complete series and as and when you rebase it, it would have my ACK. >>> >>> OK, thanks. That's what I am playing with right now. I've rebased on v3 of this patch. There will >>> be some more tests in my v2. >>> >>>> rte_driver patchset which I sent last are broken - I will publish an updated version very soon. >>> >>> I am surprised that you've changed the args to RTE_EAL_PCI_REGISTER... Are you sure about this step? >>> I wrote that I'll change it myself for v2 for SoC to accept name and pointer as it was originally for PCI... >> >> Really? Then probably I understood it wrong. I don't have any issues with the first one as well but just for slightly cleaner approach I thought of going with your suggest (or, suggestion as understood by me). > ‎> >> Anyways the patch is broken and doesn't apply on master. I will push a new version (with revert EAL_PCI_REGISTER arguments) within today. > > Ok. I am away for few days this week but I will continue as soon as possible on the soc patchset and also on the rte_device/driver issue. We have to cut this as soon as possible. I think the best would be to post a small patchset on top of this one introducing the change. I am anyway working on a driver for NXP's SoC platform which I am basing over rte_device + SoC patchset. I plan to release a draft of this driver soon. It might help validate both the patchsets in a limited manner. > > I think, there should be a single list of rte_device and a list for rte_driver while preserving lists for each infra, so also rte_pci_device would have a separate list. Then, it's possible to iterate over all PCI devices easily and iterate over all devices generically at the same time. I have similar understanding. Separate pci/soc lists, and unified rte_driver and rte_device lists. This, in my opinion, would help keep the interfaces clean (free of unnecessary checks). > > What I am not sure about are addr and id things. It's quite difficult to generalize them. The addr needs a conpare function but how to compare pci addr to another type of addr? Do we need this? If so, I'll work on this. I am not sure why we need to compare the PCI addresses with non-PCI (or any other, SoC) address set? Can you elaborate? > > Another thing - resources. Do we want to have a kind of a generic rte_resource instead of rte_pci_resource? I think this is clearly possible. I am about to do this. The idea sounds good but I don't know whether it would be feasible or not. My understanding is that resources have special characteristics. Generalizing them would involve creating opaque objects in rte_resource{..} which in turn beats the purpose of generalization. Probably, I will wait for your next patchset version to understand your approach. > > I am afraid we are unable to change devargs significantly in this release :/ (due to time and lack of a discussion here).‎ What I really like to see is the virtual device conversion and pmd_type removal. Are you able to look at this? pmd_type removal is my todo as well. This would anyway impact the vdevs. I haven't given devargs much thought, yet. > > Any other objections? I was looking at various discussions [1],[2] that have happened in past. From that, the summary I have is: 1) Generalize devices to rte_device/rte_driver `-- Cleaner interfaces/difference for 'bus', 'driver' and 'device' `-- Moving the init/deinit functions into rte_device/rte_driver layer `-- hierarchical device structure (as explained by David in [1]) 2) Do away with device type specific initializations (registrations) `-- No more pdev/vdev distinction `-- standardizing devargs for accepting device specific strings. 3) Hotplug support Most of work of (1) David has already done. What remains is completing (2) and probably (3) which I haven't verified yet. [1] http://dpdk.org/ml/archives/dev/2016-January/031390.html [2] http://dpdk.org/ml/archives/dev/2016-January/030975.html > > Jan Viktorin > RehiveTech > Sent from a mobile device‎ > >>> >>> Jan >>> >> >> - >> Shreyansh > - Shreyansh