1 /* SPDX-License-Identifier: BSD-3-Clause
5 #ifndef _DPAA2_HW_MEMPOOL_LOGS_H_
6 #define _DPAA2_HW_MEMPOOL_LOGS_H_
8 extern int dpaa2_logtype_mempool;
10 #define DPAA2_MEMPOOL_LOG(level, fmt, args...) \
11 rte_log(RTE_LOG_ ## level, dpaa2_logtype_mempool, \
12 "mempool/dpaa2: " fmt "\n", ##args)
14 /* Debug logs are with Function names */
15 #define DPAA2_MEMPOOL_DEBUG(fmt, args...) \
16 rte_log(RTE_LOG_DEBUG, dpaa2_logtype_mempool, \
17 "mempool/dpaa2: %s(): " fmt "\n", __func__, ##args)
19 #define DPAA2_MEMPOOL_INFO(fmt, args...) \
20 DPAA2_MEMPOOL_LOG(INFO, fmt, ## args)
21 #define DPAA2_MEMPOOL_ERR(fmt, args...) \
22 DPAA2_MEMPOOL_LOG(ERR, fmt, ## args)
23 #define DPAA2_MEMPOOL_WARN(fmt, args...) \
24 DPAA2_MEMPOOL_LOG(WARNING, fmt, ## args)
26 /* DP Logs, toggled out at compile time if level lower than current level */
27 #define DPAA2_MEMPOOL_DP_LOG(level, fmt, args...) \
28 RTE_LOG_DP(level, PMD, fmt, ## args)
30 #define DPAA2_MEMPOOL_DP_DEBUG(fmt, args...) \
31 DPAA2_MEMPOOL_DP_LOG(DEBUG, fmt, ## args)
32 #define DPAA2_MEMPOOL_DP_INFO(fmt, args...) \
33 DPAA2_MEMPOOL_DP_LOG(INFO, fmt, ## args)
34 #define DPAA2_MEMPOOL_DP_WARN(fmt, args...) \
35 DPAA2_MEMPOOL_DP_LOG(WARNING, fmt, ## args)
37 #endif /* _DPAA2_HW_MEMPOOL_LOGS_H_ */