2 * Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
4 * Copyright (c) 2015-2018 Cavium Inc.
8 * See LICENSE.bnx2x_pmd for copyright and licensing details.
14 extern int bnx2x_logtype_init;
15 #define PMD_INIT_LOG(level, fmt, args...) \
16 rte_log(RTE_LOG_ ## level, bnx2x_logtype_init, \
17 "%s(): " fmt "\n", __func__, ##args)
19 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
21 #ifdef RTE_LIBRTE_BNX2X_DEBUG_RX
22 #define PMD_RX_LOG(level, fmt, args...) \
23 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
25 #define PMD_RX_LOG(level, fmt, args...) do { } while(0)
28 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX
29 #define PMD_TX_LOG(level, fmt, args...) \
30 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
32 #define PMD_TX_LOG(level, fmt, args...) do { } while(0)
35 #ifdef RTE_LIBRTE_BNX2X_DEBUG_TX_FREE
36 #define PMD_TX_FREE_LOG(level, fmt, args...) \
37 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
39 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while(0)
42 extern int bnx2x_logtype_driver;
43 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
44 rte_log(RTE_LOG_ ## level, bnx2x_logtype_driver, \
45 "%s(): " fmt, __func__, ## args)
47 #define PMD_DRV_LOG(level, fmt, args...) \
48 PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
50 #ifdef RTE_LIBRTE_BNX2X_DEBUG_PERIODIC
51 #define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) \
52 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
54 #define PMD_DEBUG_PERIODIC_LOG(level, fmt, args...) do { } while(0)
57 #endif /* _PMD_LOGS_H_ */