net/qede: fix few log messages
[dpdk.git] / drivers / net / nfp / nfp_net.c
index 198db67..e5bfde6 100644 (file)
@@ -43,7 +43,7 @@
 #include <rte_common.h>
 #include <rte_log.h>
 #include <rte_debug.h>
-#include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
 #include <rte_ethdev_pci.h>
 #include <rte_dev.h>
 #include <rte_ether.h>
@@ -1472,7 +1472,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
        struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
        nfp_net_link_update(dev, 0);
-       _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL, NULL);
+       _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
        nfp_net_dev_link_status_print(dev);
 
@@ -3085,6 +3085,9 @@ nfpu_error:
        return ret;
 }
 
+int nfp_logtype_init;
+int nfp_logtype_driver;
+
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
        {
                RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
@@ -3158,6 +3161,17 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
 RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
 
+RTE_INIT(nfp_init_log);
+static void
+nfp_init_log(void)
+{
+       nfp_logtype_init = rte_log_register("pmd.net.nfp.init");
+       if (nfp_logtype_init >= 0)
+               rte_log_set_level(nfp_logtype_init, RTE_LOG_NOTICE);
+       nfp_logtype_driver = rte_log_register("pmd.net.nfp.driver");
+       if (nfp_logtype_driver >= 0)
+               rte_log_set_level(nfp_logtype_driver, RTE_LOG_NOTICE);
+}
 /*
  * Local variables:
  * c-file-style: "Linux"