1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
10 extern int e1000_logtype_init;
12 #define PMD_INIT_LOG(level, fmt, args...) \
13 rte_log(RTE_LOG_ ## level, e1000_logtype_init, \
14 "%s(): " fmt "\n", __func__, ##args)
16 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
18 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
19 extern int e1000_logtype_rx;
20 #define PMD_RX_LOG(level, fmt, args...) \
21 rte_log(RTE_LOG_ ## level, e1000_logtype_rx, \
22 "%s(): " fmt "\n", __func__, ## args)
24 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
27 #ifdef RTE_LIBRTE_E1000_DEBUG_TX
28 extern int e1000_logtype_tx;
29 #define PMD_TX_LOG(level, fmt, args...) \
30 rte_log(RTE_LOG_ ## level, e1000_logtype_tx, \
31 "%s(): " fmt "\n", __func__, ## args)
33 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
36 #ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE
37 extern int e1000_logtype_tx_free;
38 #define PMD_TX_FREE_LOG(level, fmt, args...) \
39 rte_log(RTE_LOG_ ## level, e1000_logtype_tx_free, \
40 "%s(): " fmt "\n", __func__, ## args)
42 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
45 extern int e1000_logtype_driver;
46 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
47 rte_log(RTE_LOG_ ## level, e1000_logtype_driver, "%s(): " fmt, \
50 #define PMD_DRV_LOG(level, fmt, args...) \
51 PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
54 /* log init function shared by e1000 and igb drivers */
55 void e1000_igb_init_log(void);
57 #endif /* _E1000_LOGS_H_ */