summaryrefslogtreecommitdiffstats
path: root/drivers/mempool/octeontx/octeontx_pool_logs.h
blob: 958651924159e1a50e2d9fb6f435334faea0a353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2017 Cavium, Inc
 */

#ifndef	__OCTEONTX_POOL_LOGS_H__
#define	__OCTEONTX_POOL_LOGS_H__

#include <rte_debug.h>

#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 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

extern int octeontx_logtype_fpavf;
extern int octeontx_logtype_fpavf_mbox;

#endif /* __OCTEONTX_POOL_LOGS_H__*/