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 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
20 rte_log(RTE_LOG_NOTICE, RTE_LOGTYPE_PMD,\
21 "[QEDE PMD: (%s)]%s:" fmt, \
22 (p_dev)->name ? (p_dev)->name : "", \
26 #ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
28 #define DP_INFO(p_dev, fmt, ...) \
29 rte_log(RTE_LOG_INFO, RTE_LOGTYPE_PMD, \
32 (p_dev)->name ? (p_dev)->name : "", \
35 #define DP_INFO(p_dev, fmt, ...) do { } while (0)
39 #ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
40 #define DP_VERBOSE(p_dev, module, fmt, ...) \
42 if ((p_dev)->dp_module & module) \
43 rte_log(RTE_LOG_DEBUG, RTE_LOGTYPE_PMD, \
46 (p_dev)->name ? (p_dev)->name : "", \
50 #define DP_VERBOSE(p_dev, fmt, ...) do { } while (0)
53 #define PMD_INIT_LOG(level, edev, fmt, args...) \
54 rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
55 "[qede_pmd: %s] %s() " fmt "\n", \
56 (edev)->name, __func__, ##args)
58 #ifdef RTE_LIBRTE_QEDE_DEBUG_INIT
59 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
61 #define PMD_INIT_FUNC_TRACE(edev) do { } while (0)
64 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
65 #define PMD_TX_LOG(level, q, fmt, args...) \
66 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
67 __func__, q->port_id, q->queue_id, ## args)
69 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
72 #ifdef RTE_LIBRTE_QEDE_DEBUG_RX
73 #define PMD_RX_LOG(level, q, fmt, args...) \
74 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
75 __func__, q->port_id, q->queue_id, ## args)
77 #define PMD_RX_LOG(level, q, fmt, args...) do { } while (0)
80 #ifdef RTE_LIBRTE_QEDE_DEBUG_DRIVER
81 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
82 RTE_LOG(level, PMD, "%s(): " fmt, __func__, ## args)
84 #define PMD_DRV_LOG_RAW(level, fmt, args...) do { } while (0)
87 #define PMD_DRV_LOG(level, fmt, args...) \
88 PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
90 #endif /* _QEDE_LOGS_H_ */