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:41 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2017-10-06 02:49:50 +0200
commita960306c0681b0e7d8514e073af9144054c8c317 (patch)
tree6b4e1e70634ab9f5976284e0ddccf5b4438a3f14 /drivers/bus/dpaa/rte_dpaa_logs.h
parent107fd30eb3946550f48cc2e4a773a69db8d91db0 (diff)
downloaddpdk-a960306c0681b0e7d8514e073af9144054c8c317.zip
dpdk-a960306c0681b0e7d8514e073af9144054c8c317.tar.gz
dpdk-a960306c0681b0e7d8514e073af9144054c8c317.tar.xz
bus/dpaa: add DPAA PMD 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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/bus/dpaa/rte_dpaa_logs.h b/drivers/bus/dpaa/rte_dpaa_logs.h
index 5335fd8..037c96b 100644
--- a/drivers/bus/dpaa/rte_dpaa_logs.h
+++ b/drivers/bus/dpaa/rte_dpaa_logs.h
@@ -37,6 +37,7 @@
extern int dpaa_logtype_bus;
extern int dpaa_logtype_mempool;
+extern int dpaa_logtype_pmd;
#define DPAA_BUS_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, dpaa_logtype_bus, "%s(): " fmt "\n", \
@@ -82,4 +83,25 @@ extern int dpaa_logtype_mempool;
#define DPAA_MEMPOOL_WARN(fmt, args...) \
DPAA_MEMPOOL_LOG(WARNING, fmt, ## args)
+/* PMD related logs */
+
+#define DPAA_PMD_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "%s(): " fmt "\n", \
+ __func__, ##args)
+
+#define PMD_INIT_FUNC_TRACE() DPAA_PMD_LOG(DEBUG, " >>")
+
+#define DPAA_PMD_DEBUG(fmt, args...) \
+ DPAA_PMD_LOG(DEBUG, fmt, ## args)
+#define DPAA_PMD_ERR(fmt, args...) \
+ DPAA_PMD_LOG(ERR, fmt, ## args)
+#define DPAA_PMD_INFO(fmt, args...) \
+ DPAA_PMD_LOG(INFO, fmt, ## args)
+#define DPAA_PMD_WARN(fmt, args...) \
+ DPAA_PMD_LOG(WARNING, fmt, ## args)
+
+/* DP Logs, toggled out at compile time if level lower than current level */
+#define DPAA_DP_LOG(level, fmt, args...) \
+ RTE_LOG_DP(level, PMD, fmt, ## args)
+
#endif /* _DPAA_LOGS_H_ */