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