From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH 3/9] drivers: no more pdev drivers Date: Wed, 10 Feb 2016 09:51:47 +0100 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" To: Jan Viktorin Return-path: Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com [209.85.214.175]) by dpdk.org (Postfix) with ESMTP id 5223E2A5D for ; Wed, 10 Feb 2016 09:52:07 +0100 (CET) Received: by mail-ob0-f175.google.com with SMTP id is5so18251116obc.0 for ; Wed, 10 Feb 2016 00:52:07 -0800 (PST) In-Reply-To: <20160209180555.3ad379cf@pcviktorin.fit.vutbr.cz> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Feb 9, 2016 at 6:05 PM, Jan Viktorin wrote: > Maybe, a better subject? > > drivers: init pdev drivers in constructors Why not, I will try to find a best one, and if I can't, I will go with this. > On Fri, 29 Jan 2016 15:08:30 +0100 > David Marchand wrote: >> -static int >> -rte_qat_pmd_init(const char *name __rte_unused, const char *params __rte_unused) >> +/* Driver registration */ >> +static void __attribute__((constructor, used)) >> +rte_qat_pmd_init(void) >> { >> PMD_INIT_FUNC_TRACE(); >> rte_eal_pci_register(&rte_qat_pmd.pci_drv); >> - return 0; >> } >> - >> -static struct rte_driver pmd_qat_drv = { >> - .type = PMD_PDEV, >> - .init = rte_qat_pmd_init, >> -}; >> - >> -PMD_REGISTER_DRIVER(pmd_qat_drv); > > What about introducing a macro for this? > > RTE_REGISTER_PCI_DRIVER(rte_qad_pmd); Yes. -- David Marchand