2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
12 extern int qede_logtype_driver;
14 #define DP_ERR(p_dev, fmt, ...) \
15 rte_log(RTE_LOG_ERR, qede_logtype_driver, \
18 (p_dev)->name ? (p_dev)->name : "", \
21 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
24 rte_log(RTE_LOG_ERR, qede_logtype_driver,\
25 "[QEDE PMD: (%s)]%s:" fmt, \
26 (p_dev)->name ? (p_dev)->name : "", \
30 rte_log(RTE_LOG_NOTICE, qede_logtype_driver,\
31 "[QEDE PMD: (%s)]%s:" fmt, \
32 (p_dev)->name ? (p_dev)->name : "", \
37 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
38 #define DP_INFO(p_dev, fmt, ...) \
39 rte_log(RTE_LOG_INFO, qede_logtype_driver, \
42 (p_dev)->name ? (p_dev)->name : "", \
45 #define DP_INFO(p_dev, fmt, ...) do { } while (0)
48 #define DP_VERBOSE(p_dev, module, fmt, ...) \
50 if ((p_dev)->dp_module & module) \
51 rte_log(RTE_LOG_DEBUG, qede_logtype_driver, \
54 (p_dev)->name ? (p_dev)->name : "", \
58 extern int qede_logtype_init;
59 #define PMD_INIT_LOG(level, edev, fmt, args...) \
60 rte_log(RTE_LOG_ ## level, qede_logtype_init, \
61 "[qede_pmd: %s] %s() " fmt "\n", \
62 (edev)->name, __func__, ##args)
64 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
66 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
67 #define PMD_TX_LOG(level, q, fmt, args...) \
68 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
69 __func__, q->port_id, q->queue_id, ## args)
71 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
74 #ifdef RTE_LIBRTE_QEDE_DEBUG_RX
75 #define PMD_RX_LOG(level, q, fmt, args...) \
76 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
77 __func__, q->port_id, q->queue_id, ## args)
79 #define PMD_RX_LOG(level, q, fmt, args...) do { } while (0)
82 #endif /* _QEDE_LOGS_H_ */