1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
8 #ifndef _RTE_TELEMETRY_INTERNAL_H_
9 #define _RTE_TELEMETRY_INTERNAL_H_
12 extern int telemetry_log_level;
14 #define TELEMETRY_LOG(level, fmt, args...) \
15 rte_log(RTE_LOG_ ##level, telemetry_log_level, "%s(): "fmt "\n", \
18 #define TELEMETRY_LOG_ERR(fmt, args...) \
19 TELEMETRY_LOG(ERR, fmt, ## args)
21 #define TELEMETRY_LOG_WARN(fmt, args...) \
22 TELEMETRY_LOG(WARNING, fmt, ## args)
24 #define TELEMETRY_LOG_INFO(fmt, args...) \
25 TELEMETRY_LOG(INFO, fmt, ## args)
27 typedef struct telemetry_client {
30 TAILQ_ENTRY(telemetry_client) client_list;
33 typedef struct telemetry_impl {
40 int metrics_register_done;
41 TAILQ_HEAD(, telemetry_client) client_list_head;
42 struct telemetry_client *request_client;
43 int register_fail_count;
47 rte_telemetry_parse_client_message(struct telemetry_impl *telemetry, char *buf);
50 rte_telemetry_send_error_response(struct telemetry_impl *telemetry,
54 rte_telemetry_register_client(struct telemetry_impl *telemetry,
55 const char *client_path);
58 rte_telemetry_unregister_client(struct telemetry_impl *telemetry,
59 const char *client_path);