From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 7/8] ethdev: break ethernet driver and pci_driver connection Date: Tue, 10 Jan 2017 17:58:38 +0000 Message-ID: References: <20170107181756.1944-1-sthemmin@microsoft.com> <20170107181756.1944-8-sthemmin@microsoft.com> <416d1526-f9d9-fa03-b04d-f63284a2df5d@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Stephen Hemminger , Shreyansh Jain To: Stephen Hemminger , dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id A932F592C for ; Tue, 10 Jan 2017 18:58:41 +0100 (CET) In-Reply-To: <416d1526-f9d9-fa03-b04d-f63284a2df5d@intel.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 1/10/2017 1:59 PM, Ferruh Yigit wrote: > On 1/7/2017 6:17 PM, Stephen Hemminger wrote: >> There are multiple buses and device types now. Therefore it no longer >> makes sense that PCI driver information is part of the Ethernet driver >> structure. >> >> This patch removes pci_driver from eth_driver and introduces a >> new combined structure for use in all existing PMD's. The rationale >> is that although all existing PCI drivers are Ethernet drivers, >> it make sense that future projects may want to support PCI devices >> that are not Ethernet. >> >> It also removes the requirement that driver is first element in >> PCI driver structure. >> >> Signed-off-by: Stephen Hemminger >> --- > > <...> > >> /** >> + * @internal >> + * The structure associated with a PMD PCI Ethernet driver. >> + */ >> +struct rte_pci_eth_driver { >> + struct rte_pci_driver pci_drv; /**< Underlying PCI driver. */ >> + struct eth_driver eth_drv; /**< Ethernet driver. */ >> +}; > > So do we need to add rte_vdev_eth_driver struct for virtual drivers, or > need to add rte_pci_cryptodev_driver struct for pci crypto devices? > > Can this be done in a more generic way? After Shreyansh's patches, there > will be rte_device, rte_driver abstractions, can they be useful? What do you think separating bus (pci) and functionality (eth/crypto) driver structs, to make them less coupled. This makes combining bus / function pairs easily. I will send a patch as reply to this mail, it is not the complete patch, but just to give the idea. It is based on Shreyansh's patchet. > > <...> >