CONFIG_RTE_LIBRTE_AVP_PMD=n
CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n
CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n
-CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y
CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
#
#include "avp_logs.h"
+int avp_logtype_driver;
static int avp_dev_create(struct rte_pci_device *pci_dev,
struct rte_eth_dev *eth_dev);
RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd);
RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map);
+
+RTE_INIT(avp_init_log);
+static void
+avp_init_log(void)
+{
+ avp_logtype_driver = rte_log_register("pmd.avp.driver");
+ if (avp_logtype_driver >= 0)
+ rte_log_set_level(avp_logtype_driver, RTE_LOG_NOTICE);
+}
#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
-#ifdef RTE_LIBRTE_AVP_DEBUG_DRIVER
+extern int avp_logtype_driver;
+
#define PMD_DRV_LOG(level, fmt, args...) \
- RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
-#else
-#define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
-#endif
+ rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
+ "%s(): " fmt, __func__, ## args)
#endif /* _AVP_LOGS_H_ */