net/bnxt: add Truflow flush-timer to alloc table scope
[dpdk.git] / drivers / net / netvsc / hn_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause */
2
3 #ifndef _HN_LOGS_H_
4 #define _HN_LOGS_H_
5
6 #include <rte_log.h>
7
8 extern int hn_logtype_init;
9 extern int hn_logtype_driver;
10
11 #define PMD_INIT_LOG(level, fmt, args...) \
12         rte_log(RTE_LOG_ ## level, hn_logtype_init, "%s(): " fmt "\n",\
13                 __func__, ## args)
14 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
15
16 #ifdef RTE_LIBRTE_NETVSC_DEBUG_RX
17 #define PMD_RX_LOG(level, fmt, args...) \
18         rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
19                 "%s() rx: " fmt "\n", __func__, ## args)
20 #else
21 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
22 #endif
23
24 #ifdef RTE_LIBRTE_NETVSC_DEBUG_TX
25 #define PMD_TX_LOG(level, fmt, args...) \
26         rte_log(RTE_LOG_ ## level, hn_logtype_driver, \
27                 "%s() tx: " fmt "\n", __func__, ## args)
28 #else
29 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
30 #endif
31
32 #define PMD_DRV_LOG(level, fmt, args...) \
33         rte_log(RTE_LOG_ ## level, hn_logtype_driver, "%s(): " fmt "\n", \
34                 __func__, ## args)
35
36 #endif /* _HN_LOGS_H_ */