net/bnxt: fix FW version query
[dpdk.git] / drivers / net / i40e / i40e_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4
5 #ifndef _I40E_LOGS_H_
6 #define _I40E_LOGS_H_
7
8 extern int i40e_logtype_init;
9 #define PMD_INIT_LOG(level, fmt, args...) \
10         rte_log(RTE_LOG_ ## level, i40e_logtype_init, "%s(): " fmt "\n", \
11                 __func__, ##args)
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
13
14 #ifdef RTE_LIBRTE_I40E_DEBUG_RX
15 extern int i40e_logtype_rx;
16 #define PMD_RX_LOG(level, fmt, args...)                 \
17         rte_log(RTE_LOG_ ## level, i40e_logtype_rx,     \
18                 "%s(): " fmt "\n", __func__, ## args)
19 #else
20 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
21 #endif
22
23 #ifdef RTE_LIBRTE_I40E_DEBUG_TX
24 extern int i40e_logtype_tx;
25 #define PMD_TX_LOG(level, fmt, args...)                 \
26         rte_log(RTE_LOG_ ## level, i40e_logtype_tx,     \
27                 "%s(): " fmt "\n", __func__, ## args)
28 #else
29 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
30 #endif
31
32 #ifdef RTE_LIBRTE_I40E_DEBUG_TX_FREE
33 extern int i40e_logtype_tx_free;
34 #define PMD_TX_FREE_LOG(level, fmt, args...)                    \
35         rte_log(RTE_LOG_ ## level, i40e_logtype_tx_free,        \
36                 "%s(): " fmt "\n", __func__, ## args)
37 #else
38 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
39 #endif
40
41 extern int i40e_logtype_driver;
42 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
43         rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
44                 __func__, ## args)
45
46 #define PMD_DRV_LOG(level, fmt, args...) \
47         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
48
49 #endif /* _I40E_LOGS_H_ */