1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2016 - 2018 Cavium Inc.
10 extern int qede_logtype_driver;
12 #define DP_ERR(p_dev, fmt, ...) \
13 rte_log(RTE_LOG_ERR, qede_logtype_driver, \
16 (p_dev)->name ? (p_dev)->name : "", \
19 #define DP_NOTICE(p_dev, is_assert, fmt, ...) \
22 rte_log(RTE_LOG_ERR, qede_logtype_driver,\
23 "[QEDE PMD: (%s)]%s:" fmt, \
24 (p_dev)->name ? (p_dev)->name : "", \
28 rte_log(RTE_LOG_NOTICE, qede_logtype_driver,\
29 "[QEDE PMD: (%s)]%s:" fmt, \
30 (p_dev)->name ? (p_dev)->name : "", \
35 #define DP_INFO(p_dev, fmt, ...) \
36 rte_log(RTE_LOG_INFO, qede_logtype_driver, \
39 (p_dev)->name ? (p_dev)->name : "", \
42 #define DP_VERBOSE(p_dev, module, fmt, ...) \
44 if ((p_dev)->dp_module & module) \
45 rte_log(RTE_LOG_DEBUG, qede_logtype_driver, \
48 (p_dev)->name ? (p_dev)->name : "", \
52 extern int qede_logtype_init;
53 #define PMD_INIT_LOG(level, edev, fmt, args...) \
54 rte_log(RTE_LOG_ ## level, qede_logtype_init, \
55 "[qede_pmd: %s] %s() " fmt "\n", \
56 (edev)->name, __func__, ##args)
58 #define PMD_INIT_FUNC_TRACE(edev) PMD_INIT_LOG(DEBUG, edev, " >>")
60 #ifdef RTE_LIBRTE_QEDE_DEBUG_TX
61 #define PMD_TX_LOG(level, q, fmt, args...) \
62 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
63 __func__, q->port_id, q->queue_id, ## args)
65 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
68 #ifdef RTE_LIBRTE_QEDE_DEBUG_RX
69 #define PMD_RX_LOG(level, q, fmt, args...) \
70 RTE_LOG(level, PMD, "%s(): port=%u queue=%u " fmt "\n", \
71 __func__, q->port_id, q->queue_id, ## args)
73 #define PMD_RX_LOG(level, q, fmt, args...) do { } while (0)
76 #endif /* _QEDE_LOGS_H_ */