net/virtio: fix incorrect cast of void *
[dpdk.git] / net / octeontx / octeontx_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Cavium, Inc
3  */
4
5 #ifndef __OCTEONTX_LOGS_H__
6 #define __OCTEONTX_LOGS_H__
7
8 #define PMD_INIT_LOG(level, fmt, args...) \
9         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
10
11 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_INIT
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
13 #else
14 #define PMD_INIT_FUNC_TRACE() do { } while (0)
15 #endif
16
17 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_RX
18 #define PMD_RX_LOG(level, fmt, args...) \
19         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
20 #else
21 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
22 #endif
23
24 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_TX
25 #define PMD_TX_LOG(level, fmt, args...) \
26         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
27 #else
28 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
29 #endif
30
31 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER
32 #define PMD_DRV_LOG(level, fmt, args...) \
33         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
34 #else
35 #define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
36 #endif
37
38 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_MBOX
39 #define PMD_MBOX_LOG(level, fmt, args...) \
40         RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
41 #else
42 #define PMD_MBOX_LOG(level, fmt, args...) do { } while (0)
43 #endif
44
45 #define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__)
46 #define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__)
47 #define octeontx_mbox_log(s, ...) PMD_MBOX_LOG(DEBUG, s, ##__VA_ARGS__)
48
49 #endif /* __OCTEONTX_LOGS_H__*/