From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0065.outbound.protection.outlook.com [104.47.34.65]) by dpdk.org (Postfix) with ESMTP id B64645323 for ; Tue, 17 Jan 2017 06:05:28 +0100 (CET) Received: from BN6PR03CA0013.namprd03.prod.outlook.com (10.168.230.151) 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.845.12; Tue, 17 Jan 2017 05:05:25 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::102) by BN6PR03CA0013.outlook.office365.com (2603:10b6:404:23::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12 via Frontend Transport; Tue, 17 Jan 2017 05:05:24 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; networkplumber.org; dkim=none (message not signed) header.d=none; networkplumber.org; 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 BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.803.8 via Frontend Transport; Tue, 17 Jan 2017 05:05:24 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v0H55Fjn014802; Mon, 16 Jan 2017 22:05:17 -0700 To: Stephen Hemminger References: <1484581107-2025-1-git-send-email-shreyansh.jain@nxp.com> <20170116102706.58d1738a@xeon-e3> CC: , , From: Shreyansh Jain Message-ID: Date: Tue, 17 Jan 2017 10:38:44 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170116102706.58d1738a@xeon-e3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131291031244618209; (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)(336005)(39450400003)(39860400002)(39840400002)(39410400002)(39400400002)(39850400002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(24454002)(199003)(377454003)(189002)(8676002)(68736007)(6666003)(2950100002)(65826007)(81166006)(83506001)(85426001)(64126003)(81156014)(65806001)(4326007)(33646002)(50986999)(50466002)(15395725005)(76176999)(30001)(5660300001)(65956001)(230783001)(6916009)(305945005)(110136003)(54356999)(626004)(36756003)(356003)(8936002)(5890100001)(104016004)(97736004)(86362001)(69596002)(31686004)(47776003)(105606002)(2906002)(31696002)(38730400001)(106466001)(230700001)(229853002)(54906002)(6306002)(77096006)(4001350100001)(92566002)(189998001)(23746002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0739; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:APLdjVyTSko2IjmkgIBMU9QxUIDjuPbLbBsGaElZFnrx3wgDQyq6WOfxuv8a1zNN6z5nIDh0soN7fI1Dlz9Dwb1NWfP2rH43eKQwNKimm5anxEA23yN5Hl4YYJcCamXVMyD+mDnOmxlEZb9iEHF1VoUsnegHWqPLPZmwJ3ZsxMiy04fbBXdBPz14psmcV8us7e13nPGIKXXSqtxIqx8mEg0WFPFQGAUIFCrgtIyvwrNyI2B+x6A6FJrp4j0INerOJw/UGu/seZwiEh0E3qyALYL2F2J7MfmsMc5/0o39lZ2aRC0iuZbtjStmyHC53mwtg7vKDXv//gh+6nmxoC9cgm+zHggVDH9dI88exZARoVQuHG/U4/YUjhrQc2/skirmYm2B+YgIswlERPAO92LsJv3Y+LZQ6yl/O4+I75oEEiH4z29uyUGZkX2Nda7w8+i3oZls91Joset64GZffUyhU6N/A8kXz+Oo1GCL4A8V6NHdSM22i6DrjtJDrtk3pttjXP90+j7P4FPAQvMUAqDVF+4jrA0lTArJf0GzLJ2OgvzqxMPlIADo5AEzzo/m0Ucc X-MS-Office365-Filtering-Correlation-Id: 795f2ab0-7359-4f27-5884-08d43e9671fc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN1PR0301MB0739; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 3:Pi0iMf7Kz5TPAtm3aFGeQ2yKB2ukVdlBwvQEbj0tGFO2E9m3skafoKVeAr1dmP6NpKXUPeKEWsrQ3xGY34Ssad3var+GC4mXBwyu4ixv4f8fT7pVBuUlLZGfOAWI3BVrmr38dZRmGWz07hyffabt0Zpq2hXLMkwCIivaH1tWHmDUIoriAz9aF5QP/ezIZ88homF7es0OGK4FQJ97uNeRS5WyzTwR64vDdF+//gbWV+8a4sLGCX6qEEz+pcgB1Nl+6nYW0eeBxqV7cyk+o3CnxI9pgmtutdNTUWm49ZhBiCZ8VRlwVVPZPKd+tvD/YZsMCxHWUK23yLhKNFaU4ssxweExUq2dQbYoLXoiqtsbmdXMiKtWd81TGZcj3rwwQPrB X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 25:8Iq2VLb8clVP+yQg6JBOeulgxKqCSqg+ZuPh8nqgf7Yn5KkfdHmFaAaOR2i5ILPQuon+xVDLJ8yVvIikkL8b34cyDUez5I6QVNDWdpMqNM3BzSTPDNqeCUPtOVdkdj91d3sm1RbpuXWMGELeanp+9LLlOsSmXa7guom/tTbKrxbOASNYsyZSjYgUSJK0lYtloNUsd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Scan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(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:G2RrszcOipoFUeGbtmbDamlUZjCvUsyJE1R22ZyuMrrlCbDL2ih6ndzmpmHlc6dm2DWNzjba+6pW5owZCDqHe14kHZ7CGfu9VeaUh7hjWKZn7Shypu198mG4nyjaKxVi8u/ShDrUyVuY/+K4W7IdmO5FKOdYv2C4r+unb9DXDN5BArBm/7iGfrKdVsOFbufHloOVWqJkBWMuunIRWkjUXZFo8vsyJoAfKyxpHKk5kSdbS5LLnAVS7m4b8YcDrWZ4DCSWD1RB0Xb7RokLnrDDwNH5aD4Am1sfkAA5FAU0txXM1kSQjm2qTAHvt7OFiGfgmHpfX6hHpRNRDtuU6gAvyOBculu04wrpM1Fbojkpgpn8lY/KxZ05ctn+bD0RXFcq+s6HDO+eLEBCpI17C+SNLJHw9hyRZBYcxhZKZCGS/imYPBDVVebpzDq/ORtroz3WBaUCCryjg7SW01k4diRbt3cRt/LP87+91eH3Y+JPN5xDrI0HZucRTp1fCEI/EI77Y/cNKAfbXD3+3Ulm1M0pbCPy7QuDVxo8T0d8Ju1GkE5V6TrZNmLvNACfie6NigP1S/zftAb0+VbaSJTSv/D1a11rqbwbc+V15gYPrUtbvth1bsIpeGbwYUdp1KYcuywkklBmeK70jUNQkoaDf6lmVW/8OmMDfkurt08ZdPtPCKlF1Tlq7fDLzCbh5x0yzglxFVJrta3K/U8UKU/hYcWIn2dLWrtd2szu8jJiVSQJuoPgGNcFmbkN0Liut3mfSG2o X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN1PR0301MB0739; 23:nSw7K4um3pPVqbHGjutbkmoojgHxhv118eA?= =?Windows-1252?Q?n4fbBCsZ5Z6lJ80HPo/5hY/lyFDdrpaRERlbtRWKQ5R/9meKDJywb3p3?= =?Windows-1252?Q?By5xQ9Xz0sNCI8X3rYnQS4KnccslPSJ4BhxLylNjjFpfMcoEmpUceTrC?= =?Windows-1252?Q?s0l7FOflzB9z9lbsx1RzLo4QE37qcTViHsqFp3TuWV72mCAGyIOR1vZK?= =?Windows-1252?Q?BwmveOKDdUMIzxJl0vnqZsntaZvvnPZX9xV4JepyuxtRPFMPEM4J1V5i?= =?Windows-1252?Q?09FTGAp49vJ3Vl9mpuzBPTHjTs/2h6i15I5v6aZ5aRT9oGaeIfF2pk6l?= =?Windows-1252?Q?HtCBekpCu3tuoLp2Yg1hyHPNJUw4kzxDpK2QWO6/0K1SF4sjxsT542AD?= =?Windows-1252?Q?CyVfwLaFKYl2+fj/XhRlcfQY2fXp9eXr/gLXXZyWhj36nHLdjHpd+j4R?= =?Windows-1252?Q?PoQGKHxZqFNLCRcy6JGXPbPb+bpFNL5TnFobs2JF6JcviGJ9cvduk+UG?= =?Windows-1252?Q?8IT1uigR4NzLXAODbzq4Mi6BE7n7tLgz+2ZOA+Ph/YonJj9+UHM1MvXV?= =?Windows-1252?Q?MEcf/fKUW+Jo87Yj6l/AWJo9Nx9+jwwR90l6zyoRQjtAkD74pZ978g46?= =?Windows-1252?Q?9ctO8uOHz4/CMJaagdV+Z1af3yNbFy2QDbT/Qfwcax4ygNibOlzz4RpF?= =?Windows-1252?Q?bhYbKW/IaXoz3KdhI09xjmd+aOGcYVX8K2OTsuPe9iX9/uk/jgTu5YN0?= =?Windows-1252?Q?Y7Wb/DtRf3k9a31h73mVgtWb/QfLO/ubRl9pRovGJCOaDhgtPsMKZJnm?= =?Windows-1252?Q?qhWl7v9vMT7lB0LvsgHJZfRujERQnaET15UHXo4461fbyMAVyrcfEi6h?= =?Windows-1252?Q?aaj+s3hUmXyq6zuhUbeDo2DB4SEKkwxjW8C8byO7G02mGEYZ/25tma+l?= =?Windows-1252?Q?AYpMAHTpq8MDx8NSdCWjAhIwbSospZzgI9MEXUqRiX4z/akZoR8Jo8B2?= =?Windows-1252?Q?5QBjwfjr4jDwzQd+hfr960KgEJGvGEAkWx+HuHZ2eD5yRcUSKROZRz2w?= =?Windows-1252?Q?Fu/e/aoLaJqQnnBCSgHLkVhMiQW1HPpl2INwP6fKm3x6kVKBuCk5JtTo?= =?Windows-1252?Q?yD6hQv56t2JiXkXxZGg/i44poAJwFfoRe2dxZ2sCUfLPzd7e12R20GpY?= =?Windows-1252?Q?sZybmrxGO2dg1z7cjKQL/NKhb3uY892SmZKkicZODCPxn40I9m6zXay0?= =?Windows-1252?Q?z1s3T6C2vvDxUvJtyWbxbNLKY9Zl+9d8BnlQ8p2c3j+UfBfMN4n00l/Y?= =?Windows-1252?Q?uJ2y6ltCwAmDquNQWMbu5TM3Yxt44IsplxO+maphEwzRZJIJ1crx0d0v?= =?Windows-1252?Q?ZMd0oTy7k+H7uQh3bnMQM1N5TjoXiW49lmHw2yC7TS+pX5+Sm7LekVeE?= =?Windows-1252?Q?1LG4sop7x2c2o2P5a71gsGQ/cMZkKtWldiVRIDlIYb655xYNVF9f6M7X?= =?Windows-1252?Q?zANCy1MGvo25GSy4Lil1TZCdf9IN8mjuZ3mo2M4nnsyMKDTEG6Fs8doo?= =?Windows-1252?Q?OBA+YGd6Fu3i2ZCRDHr0gS2HgeVUW2Cx1swZKpLUGPdDjRim2cIvupX/?= =?Windows-1252?Q?LMLv8VtoqMBofoAnjTYmEn6YFy2XkhbH8ykRFOn3zpPW0H3yYgHSwGvp?= =?Windows-1252?Q?7IiqQDg+mDH401bK3dpdWk4WUy9wdTm7FpgrqZqoUfBuNUwGlaCPKNzm?= =?Windows-1252?Q?r2wMTcHd/eX7CX0iS/w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0739; 6:U1KSP3sZk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IUY9xTjIRLJEfohd2u1qg/RpRvgQpb8/Unu5dWCdd+TR8HwACsNVkVAdUTbgFnsuQsh/vwpl0r97+LbgKg7uu0rEmuK4ZqKrA91q4v1cwndivoXtz0KDtYR6c+RSDOeY1GilgaekV7xN9gbIi3ExzTz78zrADsW2G1dybiqlZb+Hy7ZZO1Xr6zLT5pXu8ZvgvXhGd7lwID0y7WFJRewQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 05:05:24.1966 (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: BN1PR0301MB0739 Subject: Re: [dpdk-dev] [PATCH v6 0/8] 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: Tue, 17 Jan 2017 05:05:29 -0000 On Monday 16 January 2017 11:57 PM, Stephen Hemminger wrote: > On Mon, 16 Jan 2017 21:08:19 +0530 > Shreyansh Jain wrote: > >> Link to v5: [15] >> >> :: Introduction :: >> >> DPDK has been inherently a PCI inclined framework. Because of this, the >> design of device tree (or list) within DPDK is also PCI inclined. A >> non-PCI device doesn't have a way of being expressed without using hooks >> started from EAL to PMD. >> >> (Check 'Version Changes' section for changes) >> >> :: Overview of the Proposed Changes :: >> >> Assuming the below graph for a computing node: >> >> device A1 >> | >> +==.===='==============.============+ Bus A. >> | `--> driver A11 \ >> device A2 `-> driver A12 \______ >> |CPU | >> /````` >> device B1 / >> | / >> +==.===='==============.============+ Bus B` >> | `--> driver B11 >> device B2 `-> driver B12 >> >> >> - One or more buses are connected to a CPU (or core) >> - One or more devices are conneted to a Bus >> - Drivers are running instances which manage one or more devices >> - Bus is responsible for identifying devices (and interrupt propogation) >> - Driver is responsible for initializing the device >> >> In [15], model assumes that rte_bus would be the base class using which >> all the bus implementations would instantiate the objects. This patches >> takes a much more basic approach, on the same lines of rte_device/ >> rte_driver and rte_pci_device/rte_pci_driver. >> This is based on various review comments as well as offline (IRC) >> discussions. >> >> - rte_bus is an abstract class which includes basic methods supported by >> all buses. >> - specific implementation, for example for PCI rte_pci_bus, would extend >> this class to form their own buses, with their own bus specific device >> and driver list. >> - >> >> +-----------------+ >> |rte_pci_bus | >> |+---------------+| >> ||rte_bus || >> |+---------------+| >> +-----------------+ >> >> And example implementation would look like: >> >> .--------------->+-------------------+ >> | |rte_pci_bus | >> | | +----------------+| >> | | |rte_bus <------. >> | | | name || | >> | | | scan || | >> | | | probe || | >> | | | attach || | >> | | | detach || | >> | | +----------------+| | >> | | pci_driver_list | | >> | .-------------->pci_device_list | | >> | | | ... | | >> | | +-------------------+ | >> | | | >> | +-------------------+ | >> | |rte_pci_device | | >> '----bus | | >> | +----------------+| | >> | |rte_device || | >> | | bus --------------------------------' >> | | ... || >> | +----------------+| >> | ... | >> +-------------------+ >> >> >> :: Brief about Patch Layout :: >> >> 0001~0002: Introducing the basic Bus model and associated test case >> 0003 : Split the PCI match into a separate function >> 0004~0005: Introduce bus->scan APIs and integrate with EAL >> 0006 : Update the Bus and PCI test cases for scanning/probing >> 0007 : Enable PCI bus and remove code for direct PCI scan/probe from >> EAL >> 0008 : Add device hotplugging over the bus and introduce PCI helpers >> >> >> :: Pending Changes/Caveats :: >> >> 1. This patchset only moves the PCI into a bus. And, that movement is also >> currently part of the EAL (lib/librte_eal/linux) >> Eventual aim is the PCI bus reside in driver/bus/pci >> >> 2. Though the implementation for bus is common for Linux and BSD, the PCI >> bus implementation has been done/tested only for Linux. >> >> 3. RTE_REGISTER_BUS has been declared with contructor priority of 101 >> It is important that Bus is registered *before* drivers are registered. >> Only way I could find to assure that was via >> __attribute(contructor(priority)) of GCC. I am not sure how it would >> behave on other compilers. Any suggestions? >> - One suggestion from David Marchand was to use global bus object >> handles, which I have not implemented for now. If that is common >> choice, I will change in v3. >> >> :: ToDo list :: >> >> - Bump to librte_eal version >> - Documentation continues to have references to some _old_ PCI symbols >> >> :: References :: >> >> [1] http://dpdk.org/ml/archives/dev/2016-November/050186.html >> [2] http://dpdk.org/ml/archives/dev/2016-November/050622.html >> [3] http://dpdk.org/ml/archives/dev/2016-November/050416.html >> [4] http://dpdk.org/ml/archives/dev/2016-November/050567.html >> [5] http://dpdk.org/ml/archives/dev/2016-November/050628.html >> [6] http://dpdk.org/ml/archives/dev/2016-November/050415.html >> [7] http://dpdk.org/ml/archives/dev/2016-November/050443.html >> [8] http://dpdk.org/ml/archives/dev/2016-November/050624.html >> [9] http://dpdk.org/ml/archives/dev/2016-November/050296.html >> [10] http://dpdk.org/ml/archives/dev/2016-December/051349.html >> [12] http://dpdk.org/ml/archives/dev/2016-December/052092.html >> [13] http://dpdk.org/ml/archives/dev/2016-December/052381.html >> [14] http://dpdk.org/ml/archives/dev/2016-December/053302.html >> [15] http://dpdk.org/ml/archives/dev/2016-December/053315.html >> >> :: Version Changes :: >> v6: >> - Rearchitecture to bring bus object parallel to rte_device/driver >> This majorly includes: >> -- rte_pci_bus class and pci_bus as its object for PCI >> -- bus->attach/detach (hotplugging) >> -- removing bus->match as that is local to an implementation >> - rename symbols rte_eal_bus_* to rte_bus_* >> - restructuring patches (order) for simplicity >> - update to test_pci >> >> v5: >> - Fix checkpatch error in Patch 0003 >> >> v4: >> - rebase over master (eac901ce) >> - Fix a bug in test_bus while setup and cleanup >> - rename rte_eal_get_bus to rte_eal_bus_get >> - Add helper (iterator) macros for easy bus,device,driver traversal >> - removed 0001 patch as it is already merged in master >> - fix missing rte_eal_bus_insert_device symbol in map file >> >> v3: >> - rebase over master (c431384c8f) >> - revert patch 0001 changes for checkpatch (container_of macro) >> - qat/rte_qat_cryptodev update for rte_driver->probe >> - test_pci update for using a test_pci_bus for verification >> - some bug fixes based on internal testing. >> -- rte_eal_dev_attach not handling devargs >> -- blacklisting not working >> >> v2: >> - No more bus->probe() >> Now, rte_eal_bus_probe() calls rte_driver->probe based on match output >> - new functions, rte_eal_pci_probe and rte_eal_pci_remove have been >> added as glue code between PCI PMDs and PCI Bus >> `-> PMDs are updated to use these new functions as callbacks for >> rte_driver >> - 'default' keyword has been removed from match and scan >> - Fix for incorrect changes in mlx* and nicvf* >> - Checkpatch fixes >> - Some variable checks have been removed from internal functions; >> functions which are externally visible continue to have such checks >> - Some rearrangement of patches: >> -- changes to drivers have been separated from EAL changes (but this >> does make PCI PMDs non-working for a particular patch) >> >> Shreyansh Jain (8): >> eal/bus: introduce bus abstraction >> test: add basic bus infrastructure tests >> pci: split match and probe function >> eal/bus: support for scanning of bus >> eal: introduce bus scan and probe in EAL >> test: update bus and pci unit test cases >> eal: enable PCI bus >> eal: enable hotplugging of devices on bus >> >> app/test/Makefile | 2 +- >> app/test/test.h | 2 + >> app/test/test_bus.c | 686 ++++++++++++++++++++++++ >> app/test/test_pci.c | 164 ++++-- >> lib/librte_eal/bsdapp/eal/Makefile | 1 + >> lib/librte_eal/bsdapp/eal/eal.c | 13 +- >> lib/librte_eal/bsdapp/eal/eal_pci.c | 13 + >> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 15 +- >> lib/librte_eal/common/Makefile | 2 +- >> lib/librte_eal/common/eal_common_bus.c | 140 +++++ >> lib/librte_eal/common/eal_common_dev.c | 56 +- >> lib/librte_eal/common/eal_common_pci.c | 330 ++++++++---- >> lib/librte_eal/common/eal_private.h | 10 - >> lib/librte_eal/common/include/rte_bus.h | 206 +++++++ >> lib/librte_eal/common/include/rte_dev.h | 1 + >> lib/librte_eal/common/include/rte_pci.h | 161 +++++- >> lib/librte_eal/linuxapp/eal/Makefile | 1 + >> lib/librte_eal/linuxapp/eal/eal.c | 13 +- >> lib/librte_eal/linuxapp/eal/eal_pci.c | 53 +- >> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 15 +- >> 20 files changed, 1646 insertions(+), 238 deletions(-) >> create mode 100644 app/test/test_bus.c >> create mode 100644 lib/librte_eal/common/eal_common_bus.c >> create mode 100644 lib/librte_eal/common/include/rte_bus.h >> > > > All this is excellent, but doesn't go far enough to break the assumptions > of 'struct eth_driver' > That true. But, this is the first step. Next would be: - unlinking eth_device from pci_device (already upstream by Jan) - unlinking eth_driver from pci_driver dependency - Same steps for cryptodev (I will pick this next) - moving buses to drivers/bus And some more minor changes making PCI just one bus exposing services; eth_device/eth_driver being just a type of device provided by DPDK without any linkage to bus actual device belongs to.