1 /* SPDX-License-Identifier: BSD-3-Clause
5 #ifndef _DPAA2_PMD_LOGS_H_
6 #define _DPAA2_PMD_LOGS_H_
8 extern int dpaa2_logtype_pmd;
10 #define DPAA2_PMD_LOG(level, fmt, args...) \
11 rte_log(RTE_LOG_ ## level, dpaa2_logtype_pmd, "dpaa2_net: " \
14 #define DPAA2_PMD_DEBUG(fmt, args...) \
15 rte_log(RTE_LOG_DEBUG, dpaa2_logtype_pmd, "dpaa2_net: %s(): "\
16 fmt "\n", __func__, ##args)
18 #define PMD_INIT_FUNC_TRACE() DPAA2_PMD_DEBUG(">>")
20 #define DPAA2_PMD_CRIT(fmt, args...) \
21 DPAA2_PMD_LOG(CRIT, fmt, ## args)
22 #define DPAA2_PMD_INFO(fmt, args...) \
23 DPAA2_PMD_LOG(INFO, fmt, ## args)
24 #define DPAA2_PMD_ERR(fmt, args...) \
25 DPAA2_PMD_LOG(ERR, fmt, ## args)
26 #define DPAA2_PMD_WARN(fmt, args...) \
27 DPAA2_PMD_LOG(WARNING, fmt, ## args)
29 /* DP Logs, toggled out at compile time if level lower than current level */
30 #define DPAA2_PMD_DP_LOG(level, fmt, args...) \
31 RTE_LOG_DP(level, PMD, fmt, ## args)
33 #define DPAA2_PMD_DP_DEBUG(fmt, args...) \
34 DPAA2_PMD_DP_LOG(DEBUG, fmt, ## args)
35 #define DPAA2_PMD_DP_INFO(fmt, args...) \
36 DPAA2_PMD_DP_LOG(INFO, fmt, ## args)
37 #define DPAA2_PMD_DP_WARN(fmt, args...) \
38 DPAA2_PMD_DP_LOG(WARNING, fmt, ## args)
40 #endif /* _DPAA2_PMD_LOGS_H_ */