1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2016 Cavium, Inc
5 #ifndef __THUNDERX_NICVF_LOGS__
6 #define __THUNDERX_NICVF_LOGS__
10 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX
11 #define NICVF_RX_ASSERT(x) assert(x)
13 #define NICVF_RX_ASSERT(x) do { } while (0)
16 #ifdef RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX
17 #define NICVF_TX_ASSERT(x) assert(x)
19 #define NICVF_TX_ASSERT(x) do { } while (0)
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, ">>")
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, ">>")
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, ">>")
37 #define PMD_RX_LOG PMD_DRV_LOG
38 #define PMD_TX_LOG PMD_DRV_LOG
40 extern int nicvf_logtype_init;
41 extern int nicvf_logtype_driver;
42 extern int nicvf_logtype_mbox;
44 #endif /* __THUNDERX_NICVF_LOGS__ */