session: fix workers race to allocate lookup table
[vpp.git] / src / vnet / dev / log.h
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright (c) 2023 Cisco Systems, Inc.
3  */
4
5 #ifndef _VNET_DEV_LOG_H_
6 #define _VNET_DEV_LOG_H_
7
8 #define log_debug(dev, f, ...)                                                \
9   vlib_log (VLIB_LOG_LEVEL_DEBUG, dev_log.class, "%U" f, format_vnet_dev_log, \
10             dev, clib_string_skip_prefix (__func__, "vnet_dev_"),             \
11             ##__VA_ARGS__)
12 #define log_notice(dev, f, ...)                                               \
13   vlib_log (VLIB_LOG_LEVEL_NOTICE, dev_log.class, "%U" f,                     \
14             format_vnet_dev_log, dev, 0, ##__VA_ARGS__)
15 #define log_warn(dev, f, ...)                                                 \
16   vlib_log (VLIB_LOG_LEVEL_WARNING, dev_log.class, "%U" f,                    \
17             format_vnet_dev_log, dev, 0, ##__VA_ARGS__)
18 #define log_err(dev, f, ...)                                                  \
19   vlib_log (VLIB_LOG_LEVEL_ERR, dev_log.class, "%U" f, format_vnet_dev_log,   \
20             dev, 0, ##__VA_ARGS__)
21
22 #endif /* _VNET_DEV_LOG_H_ */