2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
12 #define DP_ERR(p_dev, fmt, ...) \
13 rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, \
16 (p_dev)->name ? (p_dev)->name : "", \
19 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
20 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
21 rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
22 "[QEDE PMD: (%s)]%s:" fmt, \
23 (p_dev)->name ? (p_dev)->name : "", \
27 #define DP_NOTICE(p_dev, fmt, ...) do { } while (0)
30 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
31 #define DP_INFO(p_dev, fmt, ...) \
32 rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
35 (p_dev)->name ? (p_dev)->name : "", \
38 #define DP_INFO(p_dev, fmt, ...) do { } while (0)
41 #ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
42 #define DP_VERBOSE(p_dev, module, fmt, ...) \
44 if ((p_dev)->dp_module & module) \
45 rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_PMD, \
48 (p_dev)->name ? (p_dev)->name : "", \
52 #define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
55 #define PMD_INIT_LOG(level, edev, fmt, args...) \
56 rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
57 "[qede_pmd: %s] %s() " fmt "\n", \
58 (edev)->name, __func__, ##args)
60 #ifdef RTE_LIBRTE_QEDE_DEBUG_INIT
61 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
63 #define PMD_INIT_FUNC_TRACE(edev) do { } while (0)
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_ */