crypto/qat: improve security instance setup
[dpdk.git] / drivers / net / thunderx / nicvf_logs.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016 Cavium, Inc
3  */
4
5 #ifndef __THUNDERX_NICVF_LOGS__
6 #define __THUNDERX_NICVF_LOGS__
7
8 #include <assert.h>
9
10 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX
11 #define NICVF_RX_ASSERT(x) assert(x)
12 #else
13 #define NICVF_RX_ASSERT(x) do { } while (0)
14 #endif
15
16 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX
17 #define NICVF_TX_ASSERT(x) assert(x)
18 #else
19 #define NICVF_TX_ASSERT(x) do { } while (0)
20 #endif
21
22 #define PMD_INIT_LOG(level, fmt, args...) \
23         rte_log(RTE_LOG_ ## level, nicvf_logtype_init, \
24                         "%s(): " fmt "\n", __func__, ## args)
25 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
26
27 #define PMD_DRV_LOG(level, fmt, args...) \
28         rte_log(RTE_LOG_ ## level, nicvf_logtype_driver, \
29                         "%s(): " fmt "\n", __func__, ## args)
30 #define PMD_DRV_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
31
32 #define PMD_MBOX_LOG(level, fmt, args...) \
33         rte_log(RTE_LOG_ ## level, nicvf_logtype_mbox, \
34                         "%s(): " fmt "\n", __func__, ## args)
35 #define PMD_MBOX_FUNC_TRACE() PMD_DRV_LOG(DEBUG, ">>")
36
37 #define PMD_RX_LOG PMD_DRV_LOG
38 #define PMD_TX_LOG PMD_DRV_LOG
39
40 extern int nicvf_logtype_init;
41 extern int nicvf_logtype_driver;
42 extern int nicvf_logtype_mbox;
43
44 #endif /* __THUNDERX_NICVF_LOGS__ */