Re: [PATCH 3/9] drivers: no more pdev drivers
From: David Marchand <hidden>
Date: 2016-02-10 11:38:40
On Wed, Feb 10, 2016 at 11:20 AM, Jan Viktorin [off-list ref] wrote:
On Wed, 10 Feb 2016 10:27:14 +0100 David Marchand [off-list ref] wrote:quoted
#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