1 /* SPDX-License-Identifier: BSD-3-Clause
5 #ifndef __DPAA2_CMDIF_LOGS_H__
6 #define __DPAA2_CMDIF_LOGS_H__
12 extern int dpaa2_cmdif_logtype;
14 #define DPAA2_CMDIF_LOG(level, fmt, args...) \
15 rte_log(RTE_LOG_ ## level, dpaa2_cmdif_logtype, "dpaa2_cmdif: " \
18 #define DPAA2_CMDIF_DEBUG(fmt, args...) \
19 rte_log(RTE_LOG_DEBUG, dpaa2_cmdif_logtype, "dpaa2_cmdif: %s(): " \
20 fmt "\n", __func__, ## args)
22 #define DPAA2_CMDIF_FUNC_TRACE() DPAA2_CMDIF_DEBUG(">>")
24 #define DPAA2_CMDIF_INFO(fmt, args...) \
25 DPAA2_CMDIF_LOG(INFO, fmt, ## args)
26 #define DPAA2_CMDIF_ERR(fmt, args...) \
27 DPAA2_CMDIF_LOG(ERR, fmt, ## args)
28 #define DPAA2_CMDIF_WARN(fmt, args...) \
29 DPAA2_CMDIF_LOG(WARNING, fmt, ## args)
31 /* DP Logs, toggled out at compile time if level lower than current level */
32 #define DPAA2_CMDIF_DP_LOG(level, fmt, args...) \
33 RTE_LOG_DP(level, PMD, "dpaa2_cmdif: " fmt "\n", ## args)
35 #define DPAA2_CMDIF_DP_DEBUG(fmt, args...) \
36 DPAA2_CMDIF_DP_LOG(DEBUG, fmt, ## args)
37 #define DPAA2_CMDIF_DP_INFO(fmt, args...) \
38 DPAA2_CMDIF_DP_LOG(INFO, fmt, ## args)
39 #define DPAA2_CMDIF_DP_WARN(fmt, args...) \
40 DPAA2_CMDIF_DP_LOG(WARNING, fmt, ## args)
46 #endif /* __DPAA2_CMDIF_LOGS_H__ */