1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2017 Cavium, Inc
5 #ifndef __OCTEONTX_LOGS_H__
6 #define __OCTEONTX_LOGS_H__
8 #define PMD_INIT_LOG(level, fmt, args...) \
9 rte_log(RTE_LOG_ ## level, otx_net_logtype_init, \
10 "%s(): " fmt "\n", __func__, ## args)
12 #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, ">>")
14 #define PMD_DRV_LOG(level, fmt, args...) \
15 rte_log(RTE_LOG_ ## level, otx_net_logtype_driver, \
16 "%s(): " fmt "\n", __func__, ## args)
18 #define PMD_MBOX_LOG(level, fmt, args...) \
19 rte_log(RTE_LOG_ ## level, otx_net_logtype_mbox, \
20 "%s(): " fmt "\n", __func__, ## args)
22 #define octeontx_log_info(fmt, args...) \
23 RTE_LOG(INFO, PMD, fmt "\n", ## args)
25 #define octeontx_log_err(s, ...) PMD_INIT_LOG(ERR, s, ##__VA_ARGS__)
26 #define octeontx_log_dbg(s, ...) PMD_DRV_LOG(DEBUG, s, ##__VA_ARGS__)
27 #define octeontx_mbox_log(s, ...) PMD_MBOX_LOG(DEBUG, s, ##__VA_ARGS__)
29 #define PMD_RX_LOG PMD_DRV_LOG
30 #define PMD_TX_LOG PMD_DRV_LOG
32 extern int otx_net_logtype_init;
33 extern int otx_net_logtype_driver;
34 extern int otx_net_logtype_mbox;
36 #endif /* __OCTEONTX_LOGS_H__*/