1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2010-2018 Intel Corporation 3 */ 4 5 #ifndef _IFPGA_LOGS_H_ 6 #define _IFPGA_LOGS_H_ 7 8 #include <rte_log.h> 9 10 extern int ifpga_bus_logtype; 11 12 #define IFPGA_LOG(level, fmt, args...) \ 13 rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \ 14 __func__, ##args) 15 16 #define IFPGA_BUS_LOG(level, fmt, args...) \ 17 rte_log(RTE_LOG_ ## level, ifpga_bus_logtype, "%s(): " fmt "\n", \ 18 __func__, ##args) 19 20 #define IFPGA_BUS_FUNC_TRACE() IFPGA_BUS_LOG(DEBUG, ">>") 21 22 #define IFPGA_BUS_DEBUG(fmt, args...) \ 23 IFPGA_BUS_LOG(DEBUG, fmt, ## args) 24 #define IFPGA_BUS_INFO(fmt, args...) \ 25 IFPGA_BUS_LOG(INFO, fmt, ## args) 26 #define IFPGA_BUS_ERR(fmt, args...) \ 27 IFPGA_BUS_LOG(ERR, fmt, ## args) 28 #define IFPGA_BUS_WARN(fmt, args...) \ 29 IFPGA_BUS_LOG(WARNING, fmt, ## args) 30 31 #endif /* _IFPGA_BUS_LOGS_H_ */ 32