xref: /dpdk/lib/stack/stack_pvt.h (revision 7a335720)
1*99a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
2*99a2dd95SBruce Richardson  * Copyright(c) 2019 Intel Corporation
3*99a2dd95SBruce Richardson  */
4*99a2dd95SBruce Richardson 
5*99a2dd95SBruce Richardson #ifndef _STACK_PVT_H_
6*99a2dd95SBruce Richardson #define _STACK_PVT_H_
7*99a2dd95SBruce Richardson 
8*99a2dd95SBruce Richardson #include <rte_log.h>
9*99a2dd95SBruce Richardson 
10*99a2dd95SBruce Richardson extern int stack_logtype;
11*99a2dd95SBruce Richardson 
12*99a2dd95SBruce Richardson #define STACK_LOG(level, fmt, args...) \
13*99a2dd95SBruce Richardson 	rte_log(RTE_LOG_ ##level, stack_logtype, "%s(): "fmt "\n", \
14*99a2dd95SBruce Richardson 		__func__, ##args)
15*99a2dd95SBruce Richardson 
16*99a2dd95SBruce Richardson #define STACK_LOG_ERR(fmt, args...) \
17*99a2dd95SBruce Richardson 	STACK_LOG(ERR, fmt, ## args)
18*99a2dd95SBruce Richardson 
19*99a2dd95SBruce Richardson #define STACK_LOG_WARN(fmt, args...) \
20*99a2dd95SBruce Richardson 	STACK_LOG(WARNING, fmt, ## args)
21*99a2dd95SBruce Richardson 
22*99a2dd95SBruce Richardson #define STACK_LOG_INFO(fmt, args...) \
23*99a2dd95SBruce Richardson 	STACK_LOG(INFO, fmt, ## args)
24*99a2dd95SBruce Richardson 
25*99a2dd95SBruce Richardson #endif /* _STACK_PVT_H_ */
26