int ixgbe_logtype_init;
int ixgbe_logtype_driver;
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
+int ixgbe_logtype_rx;
+#endif
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
+int ixgbe_logtype_tx;
+#endif
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE
+int ixgbe_logtype_tx_free;
+#endif
+
/*
* The set of PCI devices this driver supports
*/
ixgbe_logtype_driver = rte_log_register("pmd.net.ixgbe.driver");
if (ixgbe_logtype_driver >= 0)
rte_log_set_level(ixgbe_logtype_driver, RTE_LOG_NOTICE);
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
+ ixgbe_logtype_rx = rte_log_register("pmd.net.ixgbe.rx");
+ if (ixgbe_logtype_rx >= 0)
+ rte_log_set_level(ixgbe_logtype_rx, RTE_LOG_DEBUG);
+#endif
+
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
+ ixgbe_logtype_tx = rte_log_register("pmd.net.ixgbe.tx");
+ if (ixgbe_logtype_tx >= 0)
+ rte_log_set_level(ixgbe_logtype_tx, RTE_LOG_DEBUG);
+#endif
+
+#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE
+ ixgbe_logtype_tx_free = rte_log_register("pmd.net.ixgbe.tx_free");
+ if (ixgbe_logtype_tx_free >= 0)
+ rte_log_set_level(ixgbe_logtype_tx_free, RTE_LOG_DEBUG);
+#endif
}
#define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
#ifdef RTE_LIBRTE_IXGBE_DEBUG_RX
-#define PMD_RX_LOG(level, fmt, args...) \
- RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+extern int ixgbe_logtype_rx;
+#define PMD_RX_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, ixgbe_logtype_rx, \
+ "%s(): " fmt "\n", __func__, ## args)
#else
-#define PMD_RX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_RX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX
-#define PMD_TX_LOG(level, fmt, args...) \
- RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+extern int ixgbe_logtype_tx;
+#define PMD_TX_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx, \
+ "%s(): " fmt "\n", __func__, ## args)
#else
-#define PMD_TX_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_LOG(level, fmt, args...) do { } while (0)
#endif
#ifdef RTE_LIBRTE_IXGBE_DEBUG_TX_FREE
-#define PMD_TX_FREE_LOG(level, fmt, args...) \
- RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
+extern int ixgbe_logtype_tx_free;
+#define PMD_TX_FREE_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, ixgbe_logtype_tx_free, \
+ "%s(): " fmt "\n", __func__, ## args)
#else
-#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
+#define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
#endif
extern int ixgbe_logtype_driver;
struct ixgbe_ethertype_filter ethertype_filter;
if (!hw->mac.ops.set_ethertype_anti_spoofing) {
- RTE_LOG(INFO, PMD, "ether type anti-spoofing is not"
- " supported.\n");
+ PMD_DRV_LOG(INFO, "ether type anti-spoofing is not supported.\n");
return;
}
i = ixgbe_ethertype_filter_lookup(filter_info,
IXGBE_ETHERTYPE_FLOW_CTRL);
if (i >= 0) {
- RTE_LOG(ERR, PMD, "A ether type filter"
- " entity for flow control already exists!\n");
+ PMD_DRV_LOG(ERR, "A ether type filter entity for flow control already exists!\n");
return;
}
i = ixgbe_ethertype_filter_insert(filter_info,
ðertype_filter);
if (i < 0) {
- RTE_LOG(ERR, PMD, "Cannot find an unused ether type filter"
- " entity for flow control.\n");
+ PMD_DRV_LOG(ERR, "Cannot find an unused ether type filter entity for flow control.\n");
return;
}
vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(vf));
- RTE_LOG(INFO, PMD, "VF %u: disabling multicast promiscuous\n", vf);
+ PMD_DRV_LOG(INFO, "VF %u: disabling multicast promiscuous\n", vf);
vmolr &= ~IXGBE_VMOLR_MPE;
break;
}
- RTE_LOG(ERR, PMD, "Negotiate invalid api version %u from VF %d\n",
+ PMD_DRV_LOG(ERR, "Negotiate invalid api version %u from VF %d\n",
api_version, vf);
return -1;
switch (eth_conf->txmode.mq_mode) {
case ETH_MQ_TX_NONE:
case ETH_MQ_TX_DCB:
- RTE_LOG(ERR, PMD, "PF must work with virtualization for VF %u"
+ PMD_DRV_LOG(ERR, "PF must work with virtualization for VF %u"
", but its tx mode = %d\n", vf,
eth_conf->txmode.mq_mode);
return -1;
break;
default:
- RTE_LOG(ERR, PMD, "PF work with invalid mode = %d\n",
+ PMD_DRV_LOG(ERR, "PF work with invalid mode = %d\n",
eth_conf->txmode.mq_mode);
return -1;
}
fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL);
if (!(fctrl & IXGBE_FCTRL_UPE)) {
/* VF promisc requires PF in promisc */
- RTE_LOG(ERR, PMD,
+ PMD_DRV_LOG(ERR,
"Enabling VF promisc requires PF in promisc\n");
return -1;
}