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 #define MAX_METRICS 256
29 typedef struct telemetry_client {
32 TAILQ_ENTRY(telemetry_client) client_list;
35 typedef struct telemetry_impl {
41 int reg_index[RTE_MAX_ETHPORTS];
42 int metrics_register_done;
43 TAILQ_HEAD(, telemetry_client) client_list_head;
44 struct telemetry_client *request_client;
45 int register_fail_count;
48 enum rte_telemetry_parser_actions {
53 enum rte_telemetry_stats_type {
59 struct telemetry_encode_param {
60 enum rte_telemetry_stats_type type;
64 uint32_t metric_ids[MAX_METRICS];
66 uint32_t port_ids[RTE_MAX_ETHPORTS];
70 uint32_t metric_ids[MAX_METRICS];
76 rte_telemetry_parse_client_message(
struct telemetry_impl *telemetry,
char *buf);
79 rte_telemetry_send_error_response(
struct telemetry_impl *telemetry,
83 rte_telemetry_register_client(
struct telemetry_impl *telemetry,
84 const char *client_path);
87 rte_telemetry_unregister_client(
struct telemetry_impl *telemetry,
88 const char *client_path);
96 rte_telemetry_is_port_active(
int port_id);
99 rte_telemetry_send_ports_stats_values(
struct telemetry_encode_param *ep,
100 struct telemetry_impl *telemetry);
103 rte_telemetry_socket_messaging_testing(
int index,
int socket);
106 rte_telemetry_send_global_stats_values(
struct telemetry_encode_param *ep,
107 struct telemetry_impl *telemetry);
110 rte_telemetry_parser_test(
struct telemetry_impl *telemetry);
TAILQ_HEAD(vdev_driver_list, rte_vdev_driver)