From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP; 10 Jan 2017 09:58:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,344,1477983600"; d="scan'208";a="51440472" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga005.jf.intel.com with ESMTP; 10 Jan 2017 09:58:39 -0800 To: Stephen Hemminger , dev@dpdk.org References: <20170107181756.1944-1-sthemmin@microsoft.com> <20170107181756.1944-8-sthemmin@microsoft.com> <416d1526-f9d9-fa03-b04d-f63284a2df5d@intel.com> Cc: Stephen Hemminger , Shreyansh Jain From: Ferruh Yigit Message-ID: Date: Tue, 10 Jan 2017 17:58:38 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <416d1526-f9d9-fa03-b04d-f63284a2df5d@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 7/8] ethdev: break ethernet driver and pci_driver connection 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, 10 Jan 2017 17:58:42 -0000 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. > > <...> >