xref: /f-stack/dpdk/drivers/net/avp/avp_logs.h (revision d30ea906)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2013-2017 Wind River Systems, Inc.
3  */
4 
5 #ifndef _AVP_LOGS_H_
6 #define _AVP_LOGS_H_
7 
8 #include <rte_log.h>
9 
10 #ifdef RTE_LIBRTE_AVP_DEBUG_RX
11 #define PMD_RX_LOG(level, fmt, args...) \
12 	RTE_LOG(level, PMD, "%s() rx: " fmt, __func__, ## args)
13 #else
14 #define PMD_RX_LOG(level, fmt, args...) do { } while (0)
15 #endif
16 
17 #ifdef RTE_LIBRTE_AVP_DEBUG_TX
18 #define PMD_TX_LOG(level, fmt, args...) \
19 	RTE_LOG(level, PMD, "%s() tx: " fmt, __func__, ## args)
20 #else
21 #define PMD_TX_LOG(level, fmt, args...) do { } while (0)
22 #endif
23 
24 extern int avp_logtype_driver;
25 
26 #define PMD_DRV_LOG(level, fmt, args...) \
27 	rte_log(RTE_LOG_ ## level, avp_logtype_driver, \
28 		"%s(): " fmt, __func__, ## args)
29 
30 #endif /* _AVP_LOGS_H_ */
31