From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0087.outbound.protection.outlook.com [104.47.34.87]) by dpdk.org (Postfix) with ESMTP id 8A93C2BAC for ; Wed, 7 Dec 2016 10:52:37 +0100 (CET) Received: from BN3PR0301CA0015.namprd03.prod.outlook.com (10.160.180.153) by BN1PR0301MB0739.namprd03.prod.outlook.com (10.160.78.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Wed, 7 Dec 2016 09:52:36 +0000 Received: from BY2FFO11FD016.protection.gbl (2a01:111:f400:7c0c::142) by BN3PR0301CA0015.outlook.office365.com (2a01:111:e400:4000::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8 via Frontend Transport; Wed, 7 Dec 2016 09:52:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD016.mail.protection.outlook.com (10.1.14.148) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Wed, 7 Dec 2016 09:52:34 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:924; Count:13 Received: from [10.232.14.87] ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uB79qVIa032617; Wed, 7 Dec 2016 02:52:32 -0700 To: David Marchand References: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> CC: "dev@dpdk.org" , Thomas Monjalon From: Shreyansh Jain Message-ID: Date: Wed, 7 Dec 2016 15:25:20 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131255779551237035; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(336004)(377454003)(199003)(24454002)(189002)(4326007)(65956001)(83506001)(92566002)(65806001)(47776003)(68736007)(39860400001)(39850400001)(6916009)(189998001)(77096006)(86362001)(305945005)(81166006)(2906002)(39380400001)(7846002)(39450400002)(39410400001)(230700001)(8936002)(81156014)(39400400001)(39840400001)(356003)(8676002)(31696002)(85426001)(2950100002)(50986999)(65826007)(4001350100001)(31686004)(110136003)(229853002)(104016004)(97736004)(6666003)(36756003)(54356999)(626004)(106466001)(33646002)(105606002)(38730400001)(50466002)(64126003)(5660300001)(76176999)(23676002)(230783001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0739; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD016; 1:WcFj2BLK/YWEDQYG9aA5ISSe4jgxKt2Qo+PhLrWYWDbaiifTFvYxxplnoXi5zxeprZ8SjzdvfbwglMwrCAgYsweuP206ApDWJRUQYMPsR2a6aifUGXkFHSC/VwgVjKSSk/vW59j+ISPbD0pumf/vkitEbzCqyYnpK56o4xvK9XBGINvr+SwK9guq/C+GBgM0dfs726eXixOY6/FnAXDuwnvUBW/3gKje+psPbADiEZrplPk+/ig5P816ade0alH3JgBqlLw4rtjtUe+6a4Epk83Ti0wlGR50wtWByB6KJTVaepdTAOth/F1MTnNfLiF0qTwtYDPRp2mLN417jmSeR/0f9YcQptbChR4xuql6RgdTkOcenzRTOWPgvQ/FLSadyYp+WtPvt/Otb6b/Mkio8e/F1O5p0/fV+wxbhkcDsBm+MYy+FMG5kN2YjzhLxEZwEakOBBH19eXQdecP+8yfMo/K089hNdd+NXgH/oC3Heqg1+KAE9AjgTOI9H6F5lJB6Lnoy2mtCQyQOATkFFPSD/1kd+xnBDLNd2s8dYgbzwqwH299Tz+IZ1NtTeW0Lgr6PuaxfTkip0pArlpijMlF6l+OevE+2fa/7G3g9AivsRE= X-MS-Office365-Filtering-Correlation-Id: 28e5bcc2-89a1-4952-48a3-08d41e86c542 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0739; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 3:UIKW8k7j86zITq041cl8Dgk72pETHtTFzhSszl3YyMiwdqy2fQT3CMvhgwzcDT4YekFcOhfhYwLV4z9Wu8BX2+wFEmJgZUayu3UbGZ8qNvHo9bovBjluCxUQTHQpSe5XprDOaOcuvVx1UGY7sOzgtC71KuJUj0G8D7ehR3g90NLGoiTl3uRwywE+WDfPrrAVz5pSTvreSsdmQqSvnYmQo5Ev6KMCYXvI+UgndIymL3mbbbYGTzSWmSw3j5ptab7ROtwXO6BeLW0DhISmMa7k48xMzRF6EJ3PcJbljSCF9IPUwMGaizjuTC1hLW9fXT+8Kx0krSMh83aMs97cqM6Uf0ukRtc23B4NYbrgJrjeAw73yQ7yojfjpU8rxXact3S2 X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 25:cyNUTRvC4Cmg2j9fKyW9kC6rPF1s+/+8EjJhzz7oDRzjOmBSgIxvkg9D1hlMyHd6hhZKG4UIe7ks0avHIMTeOcLcSgyjJE3SXGF4eOv5MUzW4+UNAbtlV/vF0ZgkLQUbehehZTNMognOvDt7d0k9ZzkhdHdQ17Qm9FMvF7vIFj92xedceQ7UcXKtZJwp7fTp0WeZOAXLeqlq+S7zbVuHdHJeis+mtfsJajxmgVDet535gqanxqPAANMNZcbPYppwrnoWrRInrhn6SHDcwCJ3HRUFj8MXTsoKHz9pBrAYP7+c8bnzQoPepifJ8wxEZY5J5kqfKdWqanYeHrZ0lwf/i0vZ4oKr/CjaxSPvOqkdWGvK6vbeTba70G3jNxzxxXUs/46nkIfIj6+VE55eKvIeGcoX8s6FRyJuxG+sA4dM67PmmmrVgqJvvaIxC5X2UN1mS/umK8f+/4I89yC+0WmSWHttCFx26lb2rmd5GJmScs/ZZU5Y2/qk6gDooadYDABgiCF0ZzrSqEedlywdbkhyuvieKrsPfrWtMCtoBiUmoyZ6CdmAhJX9kO7vFvfM6emRsxJRKcdE4jGCdAtUspXszgedRpWWdS92utxEWxnjaLYX7s2b7r9NxoYY31Xgeep8R/eEsMA7m5UhbJNWKxr87B0Y8ZDv9gvNOut9vLiuLmuyfoLAxrF9TCrf73pErQsAP10pD0MdpDyqr67FFcdDKnhI3TC1EJaiFoTmSVATqH/MQUGbBP5KWQFsQoTwMbl8taIEx1yb6T5yvfm2gBRHHA== X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 31:+GTWzgQweDFNayheS7T7Iypho0MPGVGGFCeFzWOXibtEEFyFnZ/vhXNjz5VPXZ9rkcZ+9HC/Ev0RBMJrZ8Pt2pJGdfQ/U52wlCxZARdwbA4ngO4Ox6IYtzxNB0FDD9q65US70zkh3pdyG4hhVOkso0IbgQ8I7r3odaYHBSxsIursKValsVRBStdoDl5Jmyht38XtKmIQZhWR1jTGBB33ybzQtCXDylVjUZI7/1vIfgBj/KHAURSsz94WjyDH76/6rXjlgE0Ko6UUWHLnoTjrzZ7R+4sofmxfr8/AmlXRj1s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13017025)(13015025)(13023025)(13024025)(13018025)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BN1PR0301MB0739; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0739; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 4:icdMltB9DnTe2P9RFQKJ7PMMRFNL2q/aj2ygtxv7d6Q0wSWezYv1nSQEJJSPHgYaTLN3ajgbIh61OuNiGoqWHm5xuAsReEf5QwedVTKdm4h2TGLIim10Ao+4LKBOIRgjb3pwoT9aJqJx90INOPBg0iALb2G5Y3p8UG6+PjWblx9dbdz+ilUUINm/mP4/gfMKRuimdHLqNM949+K63EPdzEevUOJfUMHUWoEUd3DkkxUZPOGfkgf5qNFGvSqZdQIL4evOMShWPN1sij2HFWm1vyzBYsK8YO9EuFTjUDxqlU3FM6xdRFIFrz1NZitjOZH7XYoW1HFhf9Ew52O9wLw9INJuN0ws0W1c+KUC6BU6viMT4pvC8xu02gpttmfBV9Tv8RoF1B0tgQcGSSSDXdKYo38KJDJ2J4zwMjBFpBqSxy/6zAK1+xiImJEne4pHSy0iR9yTaRiyTowC815N+ObXa9nENvjZBIgaRjJcd748VDtDF6K17PRg7pr0Iv3cte29t7liLAjVsf9FsK81WOBVkTk3fFPzBStHscOXWyArTJ3IRvpC5ZqZLJjlz39FPUgawi6UUPs/zw5SBmr25jgGlpb+0UHcEpAWsTQLwy9LilDws4xSEZJ9hLE5eewjBgs6SvtJ+6MzVpd1zR2axOzSfrQxD4Z+maAPq1yRB8A2vhtMKHiOYzz1v6ewZqXxuQ6NJbkbZvgYf5cwVlvQyEl4U325fYzxfAD3/2eMEnD87rUlgaBISxapBLV4cfEQN8ZD X-Forefront-PRVS: 01494FA7F7 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjFQUjAzMDFNQjA3Mzk7MjM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dzNCzkN/vcGWqD2n/cnj+b+SiGbPo2v34VjRNndMbdjfhsNjHnGg/8hnNh/e0H+kUk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 7:V1lKzsgXsaztU3JBX55YOFKjlX3nwyefMa4o8KXeBC+FkXSZd6ZcASL89Dd19vuxBYpxp4WGIzpWkLsJpmWvx3PJ1aNZus0W2t5/Lh0AL4Z1Kh+TfG07JSjY3G3v47SZL9O9ZgBw0QzBYDkmRVXwHUGKKnZF73gdDFGa7Go7idvThefcEfOWeUpMnPZawNqqB6vkZTkvL6tEVjgsqeVN94bX2bacMQqWiDjmxhYlkeoPhRrBcIkgNu/jfjie8a3cbb2srUkO4UWYYVuxhEenX7wZv9OqcPw5qio9fgTJtVFVMXfJwkFuY4/EYbi+O5Tz+P5h4NVfpW3cOwUCZhYnxhUWxvOg8Eh75N88l4/MlORKj9ImcI0kVT8AS3XQ5p4njxrt0ctGtR1j8bRXqBiN2AwEFTXrhpTO2zYpcK3Z4OFxPoC4TyTN4f023wdffnS6igiwta7Ii1cDBT17tra5gw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2016 09:52:34.7961 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0739 Subject: Re: [dpdk-dev] [PATCH 00/13] Introducing EAL Bus-Device-Driver Model 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: Wed, 07 Dec 2016 09:52:38 -0000 Hello David, On Wednesday 07 December 2016 02:22 AM, David Marchand wrote: > "Big patchset and a lot of things to look at. > > Here is a first look at it. Thanks for comments. > > On Sun, Dec 4, 2016 at 11:11 AM, Shreyansh Jain wrote: >> In continuation to the RFC posted on 17/Nov [9], >> A series of patches is being posted which attempts to create: >> 1. A basic bus model >> `- define rte_bus and associated methods/helpers >> `- test infrastructure to test the Bus infra >> 2. Changes in EAL to support PCI as a bus >> `- a "pci" bus is registered >> `- existing scan/match/probe are modified to allow for bus integration >> `- PCI Device and Driver list, which were global entities, have been >> moved to rte_bus->[device/driver]_list >> >> I have sanity tested this patch over a XeonD X552 available with me, as >> well as part of PoC for verifying NXP's DPAA2 PMD (being pushed out in a >> separate series). Exhaustive testing is still pending. > > I saw some checkpatch issues for patch 1 (I would ignore this one) and > 4 (please check). Yes, for Patch 1 I too ignored the warnings. For Patch 4, there are 3 warnings, of which first 2 were reported by checkpatch tool before I sent out. Surprisingly, I didn't see the third one when I ran the tool in my environment. I will fix them (those which I can) in v2. > > >> :: Brief about Patch Layout :: >> >> 0001: Container_of patch from [3] > >> 0002~0003: Introducing the basic Bus model and associated test case >> 0005: Support insertion of device rather than addition to tail > > Patch 2 and 5 could be squashed. I deliberately kept them separate. I intent to extend the Patch 5 for hotplugging. But, if I don't end up adding support for that in this series, I will merge these two. > The constructor priority stuff seems unneeded as long as we use > explicit reference to a global (or local, did not check) bus symbol > rather than a runtime lookup. I didn't understand your point here. IMO, constructor priority (or some other way to handle this) is important. I faced this issue while verifying it at my end when the drivers were getting registered before the bus. Can you elaborate more on '..use explicit reference to a global...'? > > >> 0004: Add scan and match callbacks for the Bus and updated test case > > Why do you push back the bus object in the 'scan' method ? > This method is bus specific which means that the code "knows" the > object registered with the callback. This 'knows' is the grey area for me. The bus (for example, PCI) after scanning needs to call rte_eal_bus_add_device() to link the device in bus's device_list. Two options: 1. Have a global reference to "pci" bus (rte_bus) somewhere in eal_pci.c 2. Call rte_eal_get_bus() every time someone needs the reference. 3. C++ style, 'this->'. I have taken the 3rd path. It simplifies my code to not assume a handle as well as not allow for reference fetch calls every now and then. As a disadvantage: it means passing this as argument - and some cases maintaining it as __rte_unused. Taking (1) or (2) is not advantageous than this approach. > Is is that you want to have a single scan method used by multiple buses ? Yes, but only as a use case. For example, platform devices are of various types - what if we have a south-bound bus over a platform bus. In which case, a hierarchical bus layout is possible. But, this is far-fetched idea for now. > > >> 0006: Integrate bus scan/match with EAL, without any effective driver > > Hard to find a right balance in patch splittng, but patch 4 and 6 are > linked, I would squash them into one. Yes, it is hard and sometimes there is simply no strong rationale for splitting or merging. This is one of those cases. My idea was that one patch _only_ introduces Bus services (structures, functions etc) and another should enable the calls to it from EAL. In that sense, I still think 4 and 6 should remain separate, may be consecutive, though. > > >> 0007: rte_pci_driver->probe replaced with rte_driver->probe > > This patch is too big, please separate in two patches: eal changes > then ethdev/driver changes. I don't think that can be done. One change is incomplete without the other. Changes to all files are only for rte_pci_driver->probe to rte_driver->probe movement. EAL changes is to allow rte_eth_dev_pci_probe function after such a change as rte_driver->probe has different arguments as compared to rte_pci_driver->probe. The patches won't compile if I split. Am I missing something? > I almost missed that mlx4 has been broken : you moved the drv_flags > from the mlx4 pci driver to rte_driver. Oh! This is indeed my mistake. I will fix this right away. > > Why do you push back the driver object in the 'probe' method ? (idem > rte_bus->scan). I am assuming you are referring to rte_driver->probe(). This is being done so that implementations (specific to drivers on a particular bus) can start extracting the rte_xxx_driver, if need be. For example, for e1000/em_ethdev.c, rte_driver->probe() have been set to rte_eth_dev_pci_probe() which requires rte_pci_driver to work with. In absence of the rte_driver object, this function cannot call rte_pci_driver->probe (for example) for driver specific operations. > > >> 0008: Integrate probe of drivers with EAL > > This patch does nothing about "remove" while its title talks about it. Yes, that is a mistake on my part. I will fix this. > > + What about hotplug code ? I suppose this is for later. I am still working on it. Maybe, with the current set, if there is some agreement over the overall changes, I would be more confident on this next level of changes. > > >> 0009: Split the existing PCI probe into match and probe > > You don't need to expose rte_eal_pci_match_default() (and I am not > sure what the "default" means here). > This method should be internal to the pci bus object ? 1) Yes, rte_eal_pci_match_default isn't really a 'default' I will remove that. 2) Yes, there is no need to expose it. One trivial reason I took this liberty was so that I can put my implementation for PCI bus in ${RTE_SDK}/drivers/bus/pci/* rather than current ${RTE_SDK}/lib/librte_eal/linuxapp/eal_pci.c And similarly if there are other PCI-like implementations which would like to have their own bus rather than using PCI bus. But, I can remove this (from Map as well) > > >> 0010: Make PCI probe/match work on rte_driver/device rather than >> rte_pci_device/rte_pci_driver >> 0011: Patch from Ben [8], part of series [2] > > >> 0012~0013: Enable Scan/Match/probe on Bus from EAL and remove unused >> functions and lists > > Same thing as earlier in the series, you don't need to check for the bus object. > The pci bus code can't be called if the bus was not registered and > consequently, you are sure that the pci bus object is the pci_bus > symbol. Hm. Ok. I will remove this. I was doing this for two reasons 1) somehow I found drivers getting registered *before* bus and for debugging that. and 2) it made me avoid segfaults because of my wrong code. Anyways, it was only a debugging level change. > > > > Regards, > Thanks for your review. I still look forward to more discussion on overall approach and if there are holes which I can't see (for example, hotplugging). Regards, Shreyansh