[dpdk-dev] [PATCHv3 2/5] drivers: Update driver registration macro usage

Panu Matilainen pmatilai at redhat.com
Tue May 24 08:57:35 CEST 2016


On 05/20/2016 08:24 PM, Neil Horman wrote:
> Modify the PMD_REGISTER_DRIVER macro, adding a name argument to it.  The
> addition of a name argument creates a token that can be used for subsequent
> macros in the creation of unique symbol names to export additional bits of
> information for use by the pmdinfogen tool.  For example:
>
> PMD_REGISTER_DRIVER(ena_driver, ena);
>
[..]
> diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
> index 071b44f..ee9581b 100644
> --- a/drivers/net/bnx2x/bnx2x_ethdev.c
> +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
> @@ -550,5 +550,7 @@ static struct rte_driver rte_bnx2xvf_driver = {
>  	.init = rte_bnx2xvf_pmd_init,
>  };
>
> -PMD_REGISTER_DRIVER(rte_bnx2x_driver);
> -PMD_REGISTER_DRIVER(rte_bnx2xvf_driver);
> +PMD_REGISTER_DRIVER(rte_bnx2x_driver, pci_id_bnx2x_map, bnx2x);
> +DRIVER_EXPORT_PCI_TABLE(bnx2x, pci_id_bnx2x_map);
> +PMD_REGISTER_DRIVER(rte_bnx2xvf_driver, pci_id_bnx2xvf_map, bnx2xvf);
> +DRIVER_EXPORT_PCI_TABLE(bnx2xvf, pci_id_bnx2xvf_map);

There are extra arguments to PMD_REGISTER_DRIVER() here, causing build 
failure. Its easy to miss since bnx2x doesn't get built by default, 
dunno if it was in earlier versions already (if it was, sorry for 
missing it).

	- Panu -


More information about the dev mailing list