net/bnxt: add Truflow flush-timer to alloc table scope
[dpdk.git] / drivers / net / fm10k / fm10k_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2013-2015 Intel Corporation
3  */
4
5 #ifndef _FM10K_LOGS_H_
6 #define _FM10K_LOGS_H_
7
8 #include <rte_log.h>
9
10 extern int fm10k_logtype_init;
11 #define PMD_INIT_LOG(level, fmt, args...) \
12         rte_log(RTE_LOG_ ## level, fm10k_logtype_init, \
13                 "%s(): " fmt "\n", __func__, ##args)
14
15 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
16
17 #ifdef RTE_LIBRTE_FM10K_DEBUG_RX
18 extern int fm10k_logtype_rx;
19 #define PMD_RX_LOG(level, fmt, args...)                 \
20         rte_log(RTE_LOG_ ## level, fm10k_logtype_rx,    \
21                 "%s(): " fmt "\n", __func__, ## args)
22 #else
23 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
24 #endif
25
26 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX
27 extern int fm10k_logtype_tx;
28 #define PMD_TX_LOG(level, fmt, args...)                 \
29         rte_log(RTE_LOG_ ## level, fm10k_logtype_tx,    \
30                 "%s(): " fmt "\n", __func__, ## args)
31 #else
32 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
33 #endif
34
35 #ifdef RTE_LIBRTE_FM10K_DEBUG_TX_FREE
36 extern int fm10k_logtype_tx_free;
37 #define PMD_TX_FREE_LOG(level, fmt, args...)                    \
38         rte_log(RTE_LOG_ ## level, fm10k_logtype_tx_free,       \
39                 "%s(): " fmt "\n", __func__, ## args)
40 #else
41 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
42 #endif
43
44 extern int fm10k_logtype_driver;
45 #define PMD_DRV_LOG_RAW(level, fmt, args...) \
46         rte_log(RTE_LOG_ ## level, fm10k_logtype_driver, "%s(): " fmt, \
47                 __func__, ## args)
48
49 #define PMD_DRV_LOG(level, fmt, args...) \
50         PMD_DRV_LOG_RAW(level, fmt "\n", ## args)
51
52 #endif /* _FM10K_LOGS_H_ */