4e810a84c859d49fd60aa45bee5489199837bad5
[dpdk.git] / lib / librte_telemetry / rte_telemetry_internal.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4
5 #include <rte_log.h>
6
7 #ifndef _RTE_TELEMETRY_INTERNAL_H_
8 #define _RTE_TELEMETRY_INTERNAL_H_
9
10 /* Logging Macros */
11 extern int telemetry_log_level;
12
13 #define TELEMETRY_LOG(level, fmt, args...) \
14         rte_log(RTE_LOG_ ##level, telemetry_log_level, "%s(): "fmt "\n", \
15                 __func__, ##args)
16
17 #define TELEMETRY_LOG_ERR(fmt, args...) \
18         TELEMETRY_LOG(ERR, fmt, ## args)
19
20 #define TELEMETRY_LOG_WARN(fmt, args...) \
21         TELEMETRY_LOG(WARNING, fmt, ## args)
22
23 #define TELEMETRY_LOG_INFO(fmt, args...) \
24         TELEMETRY_LOG(INFO, fmt, ## args)
25
26 typedef struct telemetry_impl {
27         pthread_t thread_id;
28         int thread_status;
29         uint32_t socket_id;
30 } telemetry_impl;
31
32 #endif