From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id B37AB37A6 for ; Wed, 10 Feb 2016 11:19:06 +0100 (CET) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3q0cWZ2GzWz8hF; Wed, 10 Feb 2016 11:19:06 +0100 (CET) Date: Wed, 10 Feb 2016 11:20:28 +0100 From: Jan Viktorin To: David Marchand Message-ID: <20160210112028.7d1004a0@pcviktorin.fit.vutbr.cz> In-Reply-To: References: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> <1454076516-21591-4-git-send-email-david.marchand@6wind.com> <20160209180555.3ad379cf@pcviktorin.fit.vutbr.cz> Organization: RehiveTech MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 3/9] drivers: no more pdev drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 10:19:06 -0000 On Wed, 10 Feb 2016 10:27:14 +0100 David Marchand wrote: > On Wed, Feb 10, 2016 at 9:51 AM, David Marchand > wrote: > > On Tue, Feb 9, 2016 at 6:05 PM, Jan Viktorin wrote: > >> What about introducing a macro for this? > >> > >> RTE_REGISTER_PCI_DRIVER(rte_qad_pmd); > > > > Yes. > > The only problem here, is that rte_qad_pmd is a crypto structure (same > problem with ethdev), so I can't just pass it to eal. > I can't just pass the pci driver, for the cases where multiple drivers > are registered in a single file (look at ixgbe driver). > > So, how about : > > In rte_pci.h : > > #define RTE_EAL_PCI_REGISTER(name, d)\ > void pciinitfn_ ##name(void);\ > void __attribute__((constructor, used)) pciinitfn_ ##name(void)\ > {\ > rte_eal_pci_register(d);\ I meant rte_eal_pci_register(&(d)->pci_drv);\ Perhaps, my assumption that a PCI driver is always referred as pci_drv is wrong... > } > > Then, in qat driver : > RTE_EAL_PCI_REGISTER(qat, &rte_qat_pmd.pci_drv); > However, I think that this is a detail. Passing rte_pci_driver is good. Regards Jan -- Jan Viktorin E-mail: Viktorin@RehiveTech.com System Architect Web: www.RehiveTech.com RehiveTech Brno, Czech Republic