#include <rte_debug.h>
-#ifdef RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG
-#define fpavf_log_info(fmt, args...) \
- RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
-#define fpavf_log_dbg(fmt, args...) \
- RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
-
-#define mbox_log_info(fmt, args...) \
- RTE_LOG(INFO, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
-#define mbox_log_dbg(fmt, args...) \
- RTE_LOG(DEBUG, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
-#else
-#define fpavf_log_info(fmt, args...)
-#define fpavf_log_dbg(fmt, args...)
-#define mbox_log_info(fmt, args...)
-#define mbox_log_dbg(fmt, args...)
-#endif
+#define FPAVF_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf,\
+ "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+#define MBOX_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ## level, octeontx_logtype_fpavf_mbox,\
+ "%s() line %u: " fmt "\n", __func__, __LINE__, ## args)
+
+#define fpavf_log_info(fmt, ...) FPAVF_LOG(INFO, fmt, ##__VA_ARGS__)
+#define fpavf_log_dbg(fmt, ...) FPAVF_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define fpavf_log_err(fmt, ...) FPAVF_LOG(ERR, fmt, ##__VA_ARGS__)
#define fpavf_func_trace fpavf_log_dbg
-#define fpavf_log_err(fmt, args...) \
- RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+
+#define mbox_log_info(fmt, ...) MBOX_LOG(INFO, fmt, ##__VA_ARGS__)
+#define mbox_log_dbg(fmt, ...) MBOX_LOG(DEBUG, fmt, ##__VA_ARGS__)
+#define mbox_log_err(fmt, ...) MBOX_LOG(ERR, fmt, ##__VA_ARGS__)
#define mbox_func_trace mbox_log_dbg
-#define mbox_log_err(fmt, args...) \
- RTE_LOG(ERR, PMD, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+
+extern int octeontx_logtype_fpavf;
+extern int octeontx_logtype_fpavf_mbox;
#endif /* __OCTEONTX_POOL_LOGS_H__*/