xref: /dpdk/lib/stack/stack_pvt.h (revision 0f1dc8cb671203d52488fd66936f2fe6dcca03cc)
199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
299a2dd95SBruce Richardson  * Copyright(c) 2019 Intel Corporation
399a2dd95SBruce Richardson  */
499a2dd95SBruce Richardson 
599a2dd95SBruce Richardson #ifndef _STACK_PVT_H_
699a2dd95SBruce Richardson #define _STACK_PVT_H_
799a2dd95SBruce Richardson 
899a2dd95SBruce Richardson #include <rte_log.h>
999a2dd95SBruce Richardson 
1099a2dd95SBruce Richardson extern int stack_logtype;
1197433132SDavid Marchand #define RTE_LOGTYPE_STACK stack_logtype
1299a2dd95SBruce Richardson 
13*0f1dc8cbSTyler Retzlaff #define STACK_LOG(level, ...) \
14*0f1dc8cbSTyler Retzlaff 	RTE_LOG_LINE_PREFIX(level, STACK, "%s(): ", __func__, __VA_ARGS__)
1599a2dd95SBruce Richardson 
16*0f1dc8cbSTyler Retzlaff #define STACK_LOG_ERR(...) \
17*0f1dc8cbSTyler Retzlaff 	STACK_LOG(ERR, __VA_ARGS__)
1899a2dd95SBruce Richardson 
19*0f1dc8cbSTyler Retzlaff #define STACK_LOG_WARN(...) \
20*0f1dc8cbSTyler Retzlaff 	STACK_LOG(WARNING, __VA_ARGS__)
2199a2dd95SBruce Richardson 
22*0f1dc8cbSTyler Retzlaff #define STACK_LOG_INFO(fmt, ...) \
23*0f1dc8cbSTyler Retzlaff 	STACK_LOG(INFO, __VA_ARGS__)
2499a2dd95SBruce Richardson 
2599a2dd95SBruce Richardson #endif /* _STACK_PVT_H_ */
26