X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx4%2Fmlx4.c;h=71061a720f3918ae151829558d0a9aa1facb9c61;hb=80e6d636fb39cb880b48d58622401b385ff5a0f1;hp=1657ea30c426c5ac2cdb3ea083a6ce6479c7b7d6;hpb=ece45f693a1c50e1f6d0619b4bb859955037ab0b;p=dpdk.git diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 1657ea30c4..71061a720f 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -64,9 +64,6 @@ static rte_spinlock_t mlx4_shared_data_lock = RTE_SPINLOCK_INITIALIZER; /* Process local data for secondary processes. */ static struct mlx4_local_data mlx4_local_data; -/** Driver-specific log messages type. */ -int mlx4_logtype; - /** Configuration structure for device arguments. */ struct mlx4_conf { struct { @@ -1032,10 +1029,9 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) eth_dev->device = &pci_dev->device; rte_eth_copy_pci_info(eth_dev, pci_dev); /* Initialize local interrupt handle for current port. */ - priv->intr_handle = (struct rte_intr_handle){ - .fd = -1, - .type = RTE_INTR_HANDLE_EXT, - }; + memset(&priv->intr_handle, 0, sizeof(struct rte_intr_handle)); + priv->intr_handle.fd = -1; + priv->intr_handle.type = RTE_INTR_HANDLE_EXT; /* * Override ethdev interrupt handle pointer with private * handle instead of that of the parent PCI device used by @@ -1279,16 +1275,14 @@ glue_error: #endif +/* Initialize driver log type. */ +RTE_LOG_REGISTER(mlx4_logtype, pmd.net.mlx4, NOTICE) + /** * Driver initialization routine. */ RTE_INIT(rte_mlx4_pmd_init) { - /* Initialize driver log type. */ - mlx4_logtype = rte_log_register("pmd.net.mlx4"); - if (mlx4_logtype >= 0) - rte_log_set_level(mlx4_logtype, RTE_LOG_NOTICE); - /* * MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we * want to get success errno value in case of calling them