1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Intel Corporation
8 extern int iavf_logtype_init;
9 #define PMD_INIT_LOG(level, fmt, args...) \
10 rte_log(RTE_LOG_ ## level, iavf_logtype_init, "%s(): " fmt "\n", \
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
14 extern int iavf_logtype_driver;
15 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
16 rte_log(RTE_LOG_ ## level, iavf_logtype_driver, "%s(): " fmt, \
19 #define PMD_DRV_LOG(level, fmt, args...) \
20 PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
21 #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, " >>")
24 #ifdef RTE_LIBRTE_IAVF_DEBUG_RX
25 extern int iavf_logtype_rx;
26 #define PMD_RX_LOG(level, fmt, args...) \
27 rte_log(RTE_LOG_ ## level, iavf_logtype_rx, \
28 "%s(): " fmt "\n", __func__, ## args)
30 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
33 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX
34 extern int iavf_logtype_tx;
35 #define PMD_TX_LOG(level, fmt, args...) \
36 rte_log(RTE_LOG_ ## level, iavf_logtype_tx, \
37 "%s(): " fmt "\n", __func__, ## args)
39 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
42 #ifdef RTE_LIBRTE_IAVF_DEBUG_TX_FREE
43 extern int iavf_logtype_tx_free;
44 #define PMD_TX_FREE_LOG(level, fmt, args...) \
45 rte_log(RTE_LOG_ ## level, iavf_logtype_tx_free, \
46 "%s(): " fmt "\n", __func__, ## args)
48 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
51 #endif /* _IAVF_LOG_H_ */