1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Cavium, Inc
5 #ifndef __OCTEONTX_LOGS_H__
6 #define __OCTEONTX_LOGS_H__
8 #define PMD_INIT_LOG(level, fmt, args...) \
9 RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ## args)
11 #ifdef RTE_LIBRTE_OCTEONTX_DEBUG_INIT
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
14 #define PMD_INIT_FUNC_TRACE() do { } while (0)
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)
21 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
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)
28 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
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)
35 #define PMD_DRV_LOG(level, fmt, args...) do { } while (0)
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)
42 #define PMD_MBOX_LOG(level, fmt, args...) do { } while (0)
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__)
49 #endif /* __OCTEONTX_LOGS_H__*/