[dpdk-dev] [PATCH v9 06/25] eal: introduce init macros
David Marchand
david.marchand at 6wind.com
Mon Sep 12 09:15:07 CEST 2016
On Wed, Sep 7, 2016 at 4:07 PM, Shreyansh Jain <shreyansh.jain at nxp.com> wrote:
> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
> index fa74962..cf673e4 100644
> --- a/lib/librte_eal/common/include/rte_pci.h
> +++ b/lib/librte_eal/common/include/rte_pci.h
> @@ -470,6 +470,16 @@ void rte_eal_pci_dump(FILE *f);
> */
> void rte_eal_pci_register(struct rte_pci_driver *driver);
>
> +/** Helper for PCI device registeration from driver (eth, crypto) instance */
Typo: registration
> +#define DRIVER_REGISTER_PCI(nm, pci_drv) \
> +RTE_INIT(pciinitfn_ ##nm); \
> +static void pciinitfn_ ##nm(void) \
> +{ \
> + (pci_drv).name = RTE_STR(nm);\
> + rte_eal_pci_register(&pci_drv); \
> +}\
> +DRIVER_EXPORT_NAME(nm, __COUNTER__)
Checkpatch complains about a missing space.
--
David Marchand
More information about the dev
mailing list