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 12:38:20 +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> <20160210112028.7d1004a0@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-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by dpdk.org (Postfix) with ESMTP id 39CCC2E83 for ; Wed, 10 Feb 2016 12:38:40 +0100 (CET) Received: by mail-ob0-f177.google.com with SMTP id wb13so23039560obb.1 for ; Wed, 10 Feb 2016 03:38:40 -0800 (PST) In-Reply-To: <20160210112028.7d1004a0@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 Wed, Feb 10, 2016 at 11:20 AM, Jan Viktorin wrote: > On Wed, 10 Feb 2016 10:27:14 +0100 > David Marchand wrote: >> #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... Well, I suppose we will always have a pci driver embedded in some other internal pmd structure. So we can always expect it to be called pci_drv ... Btw, for drivers like mlx or virtio that need to do some more stuff in their constructor (the iopl stuff for virtio is the most interesting case, since the pci register happens only if iopl succeeded), we might need some RTE_MODULE_INIT for those. But in such a case, I think having RTE_MODULE_INIT in all pmds would make more sense, and RTE_EAL_PCI_REGISTER looks unneeded ? -- David Marchand