From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v3 11/12] eal: enable PCI bus and PCI test framework Date: Fri, 16 Dec 2016 18:50:42 +0530 Message-ID: <743bc547-7890-5320-4467-7d75d4fd2574@nxp.com> References: <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-1-git-send-email-shreyansh.jain@nxp.com> <1481893853-31790-12-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , To: Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0084.outbound.protection.outlook.com [104.47.34.84]) by dpdk.org (Postfix) with ESMTP id 31180377C for ; Fri, 16 Dec 2016 14:18:04 +0100 (CET) In-Reply-To: <1481893853-31790-12-git-send-email-shreyansh.jain@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Friday 16 December 2016 06:40 PM, Shreyansh Jain wrote: > Register a PCI bus with Scan/match and probe callbacks. Necessary changes > in EAL layer for enabling bus interfaces. PCI devices and drivers now > reside within the Bus object. > > Now that PCI bus handles the scan/probe methods, independent calls to > PCI scan and probe can be removed from the code. > PCI device and driver list are also removed. > > rte_device and rte_driver list continue to exist. As does the VDEV lists. > > Changes to test_pci: > - use a dummy test_pci_bus for all PCI test driver registrations > - this reduces the need for cleaning global list > - add necessary callbacks for invoking scan and probing/matching > using EAL PCI scan code > > Note: With this patch, all PCI PMDs would cease to work because of lack > rte_driver->probe/remove implementations. Next patch would do that. > > Signed-off-by: Shreyansh Jain > --- > app/test/test_pci.c | 154 +++++++++++------ > lib/librte_eal/bsdapp/eal/eal.c | 7 - > lib/librte_eal/bsdapp/eal/eal_pci.c | 52 +++--- > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +- > lib/librte_eal/common/eal_common_pci.c | 212 ++++++++++++++---------- > lib/librte_eal/common/eal_private.h | 14 +- > lib/librte_eal/common/include/rte_pci.h | 53 +++--- > lib/librte_eal/linuxapp/eal/eal.c | 7 - > lib/librte_eal/linuxapp/eal/eal_pci.c | 57 ++++--- > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +- > 10 files changed, 330 insertions(+), 240 deletions(-) > This is a relatively large patch. I would love to split it but currently I am unable to find a nice/clean way. Any suggestions would be really appreciated: This currently does 3 broad things: - Move the PCI device/driver registration to PCI Bus -- So, introduce PCI bus -- change EAL to point to this new bus - remove/refactor existing EAL/*/*pci* code to accommodate this shift - Test PCI framework. I could have split test_pci changes into a new patch, but that breaks compilation after this patchset if test_pci compilation is enabled (disabled by default). Is that acceptable? (if not, I am stuck with keeping this set of changes into a single patch). And, I would appreciate some help in confirming if the changes to test_pci are OK or not from PCI testing perspective. - Shreyansh