summaryrefslogtreecommitdiff
path: root/drivers/bus/dpaa/rte_dpaa_logs.h
diff options
context:
space:
mode:
authorShreyansh Jain <shreyansh.jain@nxp.com>2017-09-28 17:59:38 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-06 02:49:50 +0200
commitd881b20a199187904486882ecef2a3d97bd06ae5 (patch)
tree2141a484f6d28ade4836e305de601813471e8386 /drivers/bus/dpaa/rte_dpaa_logs.h
parente4a880d54199df93bd5913d5ad944e15e0ea5666 (diff)
downloaddpdk-d881b20a199187904486882ecef2a3d97bd06ae5.zip
dpdk-d881b20a199187904486882ecef2a3d97bd06ae5.tar.gz
dpdk-d881b20a199187904486882ecef2a3d97bd06ae5.tar.xz
bus/dpaa: add DPAA mempool logging macros
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Diffstat (limited to 'drivers/bus/dpaa/rte_dpaa_logs.h')
-rw-r--r--drivers/bus/dpaa/rte_dpaa_logs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h
index cc10937..5335fd8 100644
--- a/drivers/bus/dpaa/rte_dpaa_logs.h
+++ b/drivers/bus/dpaa/rte_dpaa_logs.h
@@ -36,6 +36,7 @@
#include <rte_log.h>
extern int dpaa_logtype_bus;
+extern int dpaa_logtype_mempool;
#define DPAA_BUS_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \
@@ -62,4 +63,23 @@ extern int dpaa_logtype_bus;
#define DPAA_BUS_WARN(fmt, args...) \
DPAA_BUS_LOG(WARNING, fmt, ## args)
+/* Mempool related logs */
+
+#define DPAA_MEMPOOL_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, dpaa_logtype_mempool, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define MEMPOOL_INIT_FUNC_TRACE() DPAA_MEMPOOL_LOG(DEBUG, " >>")
+
+#define DPAA_MEMPOOL_DPDEBUG(fmt, args...) \
+ RTE_LOG_DP(DEBUG, PMD, fmt, ## args)
+#define DPAA_MEMPOOL_DEBUG(fmt, args...) \
+ DPAA_MEMPOOL_LOG(DEBUG, fmt, ## args)
+#define DPAA_MEMPOOL_ERR(fmt, args...) \
+ DPAA_MEMPOOL_LOG(ERR, fmt, ## args)
+#define DPAA_MEMPOOL_INFO(fmt, args...) \
+ DPAA_MEMPOOL_LOG(INFO, fmt, ## args)
+#define DPAA_MEMPOOL_WARN(fmt, args...) \
+ DPAA_MEMPOOL_LOG(WARNING, fmt, ## args)
+
#endif /* _DPAA_LOGS_H_ */