drivers/net: fix exposing internal headers
[dpdk.git] / drivers / net / iavf / iavf_log.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4
5 #ifndef _IAVF_LOG_H_
6 #define _IAVF_LOG_H_
7
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", \
11                 __func__, ## args)
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>")
13
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, \
17                 __func__, ## args)
18
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, " >>")
22
23
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)
29 #else
30 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
31 #endif
32
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)
38 #else
39 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
40 #endif
41
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)
47 #else
48 #define PMD_TX_FREE_LOG(level, fmt, args...) do { } while (0)
49 #endif
50
51 #endif /* _IAVF_LOG_H_ */