From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0059.outbound.protection.outlook.com [104.47.42.59]) by dpdk.org (Postfix) with ESMTP id 9B168F94C for ; Tue, 17 Jan 2017 06:05:41 +0100 (CET) Received: from CY1PR03CA0042.namprd03.prod.outlook.com (10.174.128.52) by CY1PR0301MB0748.namprd03.prod.outlook.com (10.160.159.154) 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:39 +0000 Received: from BN1AFFO11FD040.protection.gbl (2a01:111:f400:7c10::111) by CY1PR03CA0042.outlook.office365.com (2603:10b6:600::52) 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:38 +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 BN1AFFO11FD040.mail.protection.outlook.com (10.58.52.251) 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:37 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v0H55Ynw016719; Mon, 16 Jan 2017 22:05:35 -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: <3ef80b33-81ee-7563-ea8d-9fe6e1168138@nxp.com> Date: Tue, 17 Jan 2017 10:39:03 +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: 131291031378954615; (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)(336005)(7916002)(39450400003)(39840400002)(39860400002)(39380400002)(39850400002)(39400400002)(39410400002)(2980300002)(1109001)(1110001)(339900001)(189002)(377454003)(199003)(24454002)(50466002)(81166006)(65826007)(8676002)(8936002)(6916009)(2950100002)(69596002)(305945005)(86362001)(230700001)(36756003)(81156014)(97736004)(189998001)(6306002)(31696002)(30001)(5660300001)(15395725005)(6666003)(2906002)(5890100001)(4326007)(83506001)(4001350100001)(85426001)(54356999)(77096006)(23746002)(105606002)(38730400001)(65806001)(50986999)(229853002)(92566002)(65956001)(104016004)(68736007)(33646002)(230783001)(64126003)(106466001)(356003)(31686004)(47776003)(626004)(76176999)(110136003)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0748; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD040; 1:Ck2+u12jr869X68jFJWrHu3BLn2PQH09U7mL9K5eiGdguAnXkJ9eI7s9zaKM6TL6EY3wDP1UMZkajcUhmB604WZppsNnLuxty/0ayZQXUoKh4z8VQnh7LTl6GMYd3L4LgDw0+BnFfAulLAwCTTXTiSFCiLqC/8cHZ6ymtaV5sc5s3tXO+zWs8g5nt1zqEBui5Q0q3LOMYv6ALdYx8uuQzwyXI9X7UJO77YkJOnTcbp9JXEs0KWKYg/1RtbYriRO230vtmxivI/0YUb8U+780+ZuGfdZYNN1LBbDJzr8Y9UHUgQcUEY7ospq0f9QBbGaCfFXviHoI2DMZM4jUDdOKI1O+QpsymXZJLgdmcOe5lMtcCt8Lv3GZeNrpTQytoafkm9Q3Y75/ZeN5jqXh6iWPYQ91GIRGGodzbCf5t1vu4BNPsquo3aFCGP/exyvy+11XnhGdPVhzcFXiSJ2sBVpP6/VykeIsFXFPn1ti779Cr9O4LTZimeSECHViPcm5wF0fdHmBWUluHy24T1BqNFobCclwpWgLzbqRNSqSUno7Cmg/x5GsOwC9uv7GBVb1ZOzC X-MS-Office365-Filtering-Correlation-Id: b23a1ea1-3b36-4d81-2819-08d43e9679fe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0748; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0748; 3:Xt+a3mCSzb74B95KF30EAIYIzm3Fn8ce2sjpqgdq8H0RbwZWWGeGDIbFxmBcOG0RkPnmIXcRuJLWxi7TYKOJdfO4RxlSPgUGfgIIGKy21lOqOPDInOSqQBRRuCdvX9z/6Q05SCpNpV5zr0G6nmkphy1l7uF3s8jLjtsE+n4Idb+L8MRLIN34ty3puNzUhuBJ01jQVOgJ3nEgzzRxKYEZTo+MabUmbpkwHOYR7pGgMft2EXnLZhr2sNxb9BFabbwr9ea5b5g3eVk6Bq57MltO2E66lqA+xgm2TvB4tBub/GvGeTCiE4HH+8ZFLp3Qp9bmKGBSHlnOxzHJ1QDirH45VNVXxPxSOPq4K6o8Yzi1m4TNjWNR+YicQiDgtLf0iSpK X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0748; 25:qdq/oTT4ul8lxPxcouZqSvFsQgchzcDjgM+fUPMwQCTXx4J6Ab8LHW4m9XFpX5jtCzW4L0GPFofx+FsgsfXbtyGkV8/GZ9ZrEivZkK7uk48O8IemwrThK2wCNwmTVZ9ibErvbxj0uda6Po+Hckz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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)(13024025)(13015025)(13023025)(13018025)(13017025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123556025)(20161123563025)(20161123559025)(20161123565025); SRVR:CY1PR0301MB0748; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0748; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0748; 4:WaA+rwsWPXIV3MDGdaJZTEZ1RPI6QKupuPB6+GAlwYayqgHJ+luapTB/lsM0DW8LH8BuGP7kfNFdnFg66nM66wpEEEZp1L+krC8BNZRBEkK0oz0NhULhP+WgE35ADc7e1MoKnQ7rQS33wquGHKF45qK1aHlxF0Yhl4d4LiIB58EnOEziZk9pxQoDWhEQlNLAA8tkP+YiS61NDt/IFASNdtfsaXNmOU8r4KmKYaAXUprTYu/gEyDDw+tF/MrCf7rAq4z+g6WObxIp8wFlB6AIQm/DARZ8/xv8p+C08qIQekff/+i4q0FrCPZL06sEcx1ANFTdYnMR96jM9BZRR3mF7ndJt6CRR3dWnoxz65gSPiJDseMahb5IK3NxDz8tUDj/hXH2JqcZqR+W08Mptaju0qEMQk85fyV+PSKm3eM67J5MuEGisMD1FMxiCq2kUpM17QWBpFg3QRMftMSZpwltSgG7hheGpoDvOjIKrYh9cgDLezYkXrZlXpwt7QygNJpWWzW94MvEpswovtGqVRfNoCISkrr1NScWJ2Wuc9/e7NxnpJCJTrOhxwN4PuOP4VcAiAD7ZImGyhsKurnlek6JE29cpuxI4khIJtpD7aSdKO9A4Ri2JhNr0ZuX1IZ4Q+iSIJqwA2hU2rIMFBW+8lWyQ9fcmF672FTIjvOTRfxR3Iw2vKnlV7K2m7m65BvxsdHFCghgcgYa41S6ZAa3/H8uOxJ7lMo09AkwwloZH3lluIl10RyJkyxvgwCo1HgmpZok X-Forefront-PRVS: 01901B3451 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR0301MB0748; 23:bfz8a9JDpl6FGvF7S3eTRd6JJqMYenK1vqF?= =?Windows-1252?Q?NJHPiPqqUraRwniqsuhtWs53AEvmax0XX3IxEkMZZvkN/PgSoYS1ZL21?= =?Windows-1252?Q?Sw0KEaM/oUuA4kQaVpBmRnIhVjJC6G4Q9Svvn1Lv3fkmi87xNZelUYpN?= =?Windows-1252?Q?BP9oo2zVd7uOSLpg13GM1FsDKpM6HZKFhxHkTObvG1+t41pa28xN3Wna?= =?Windows-1252?Q?fMS0u3xSWz3IkajmVyAtSiWCRGzOUp5Zy2Eh+K8vBf6C3iD1vAhD8Gxs?= =?Windows-1252?Q?mSWciqFg136v4ntf1iGkqeFBQ0p2etHDhDy9FoS/5AjmWP5C13M5eZmO?= =?Windows-1252?Q?EDn4Yf1tIDiice3UBK47xjEfbA9viuZFPFutAUn22R+kPekTlahdkTLX?= =?Windows-1252?Q?7X6p+6ab4iIya5n+soKwts1rzGigYxf8H1cDybZKv2QCcX4NRAtsQRnl?= =?Windows-1252?Q?WUrnB7oeF/sMITicKumyxY4AUkWbRCYztZCzA9gA7Uc8XDNRODrfdeNm?= =?Windows-1252?Q?X2q274X7GrJ4B3WP4Umc/kNqFk4wd6hVkcXWCU0P+gErY1EJl3sfXnMs?= =?Windows-1252?Q?t2pbK9ljYxrJWrKcZaExdG4MK1iWRXf3RrBuOVmo6LGj2+eZD0txvd+D?= =?Windows-1252?Q?xjd+1r36iFYKhwK9vMv4LtwOelr9PN8KVNmtr8bo36CdTRulcWRdHQgq?= =?Windows-1252?Q?hSX8vWqw6rLwiBXfcX9iazuxbKo0bAfOPhi0o5/P+0yABaIUeyja8zTh?= =?Windows-1252?Q?vM4UzqL8QwOm/kSK+LWmR2J/5gR3ouUoMNSVimPSxpuU+de0bjlLKk+s?= =?Windows-1252?Q?iIamUhnX6tT20pXnGyNtqAM+vYhrW88KXxltJdOAjycPj6iV5aHmv10m?= =?Windows-1252?Q?wBdf8gm09o1ZI11xfisYnrPyVr3cL38+AmEPYUKvwNpAxmTtMKfv1DhI?= =?Windows-1252?Q?nTubdM/V4gsZiemOTxqHteBTZ/gQhxlmu10qrHX4rg4idFq2HWcfFuVn?= =?Windows-1252?Q?Wcr48gpPj92ST5b0BYcXS9/X8W53kswYWPaCWTRbJePs2W/oUcgAAgz6?= =?Windows-1252?Q?OqvX8wQXyRLLtu8e8t4+jIpNoEzW4/8gZRp/4vD2fz7+ZxQoe44hQkvr?= =?Windows-1252?Q?SHkdJwea+mYvjg9o759NPtZlA1AqEOcaUe+ChJO8yVBLUUc3BlnoNzKQ?= =?Windows-1252?Q?5xgYn1XcA3QGgEcG1v4AnOafwjhaGwYY49CbwJ2EFK5fyGXW9q4CCQ9L?= =?Windows-1252?Q?rjrZOCZiU3AvjjvQ5QCwgIb9yG5bJnJV0YmA6L0sTlW0jH0dbLGD7Udx?= =?Windows-1252?Q?RbN1IJknF7zmnwnkyhCb1SKFklzd2xvOto7Olvz0LplrK9QoC5DDQeDJ?= =?Windows-1252?Q?LqHF/+f/jROQzEGr+uoIZNa+Cn5ciiYY2P941QkNbezzJLLViaSAyqVx?= =?Windows-1252?Q?HO1iRyT81OdNi89YnD/dB9s8790tDPUxP63d91/J0wSnbLZVQIN2pcTU?= =?Windows-1252?Q?/32Ee8nr7M/8qy7rUvIWjLKxUxC5lKbSXOhkZZQOlXdTC51UUe04EBFV?= =?Windows-1252?Q?IS14Uj10aF9jzpcDEui+3gzgnGCsoZOJpzvHF7dtcOupp61oAP+AVPEr?= =?Windows-1252?Q?X5UCVGLiXS7Pb9clwlFye4eyRN/wLXqpq6G/H+nQDIa5BBw9FA3yhf0s?= =?Windows-1252?Q?xWp/1YPmGGW/XvvO/leqYTpyp5udGCrAFWo72TxErPFptu1PZw448x8C?= =?Windows-1252?Q?ONVKfKlBZJsC1o5Z1eQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0748; 6:oM+5j7Q05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br0ue8hYGeHPX3yIklk0Z2LRB9nNgoBx4KRVxqwmlM1Ik02Ymw9FzVzZH4AMDkRqWnyIBM94Lf/U9kAQAHYqGoUuTc0aOXIxxlhHWmvJilYp8DFRzvdBpZkHpiLvKJ3VWP4ntAuCpMUw8RUPdFsJUf/3eL3Qc1h0C/XN4Ps3VQNcKjR2vAE5pN8kHGjacl42tAbSAd14iLC485mkMsH64Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2017 05:05:37.5834 (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: CY1PR0301MB0748 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:42 -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 is true. But, this is the first step of many steps. 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.