ethdev: support flow aging
[dpdk.git] / lib / librte_telemetry / rte_telemetry_parser.c
index e76382a..e8c269e 100644 (file)
 #include <rte_ethdev.h>
 
 #include "rte_telemetry_internal.h"
+#include "rte_telemetry_parser.h"
 
 typedef int (*command_func)(struct telemetry_impl *, int, json_t *);
 
 struct rte_telemetry_command {
-       char *text;
+       const char *text;
        command_func fn;
 } command;
 
@@ -251,7 +252,7 @@ eperm_fail:
        return -1;
 }
 
-int32_t
+static int32_t
 rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry,
         int action, json_t *data)
 {
@@ -355,7 +356,7 @@ fail:
        return -1;
 }
 
-int32_t
+static int32_t
 rte_telemetry_command_global_stat_values(struct telemetry_impl *telemetry,
         int action, json_t *data)
 {
@@ -442,7 +443,7 @@ fail:
        return -1;
 }
 
-int32_t
+static int32_t
 rte_telemetry_command_ports_stats_values_by_name(struct telemetry_impl
        *telemetry, int action, json_t *data)
 {
@@ -455,9 +456,9 @@ rte_telemetry_command_ports_stats_values_by_name(struct telemetry_impl
        size_t index;
        json_t *value;
 
+       memset(&ep, 0, sizeof(ep));
        ep.pp.num_port_ids = json_array_size(port_ids_json);
        ep.pp.num_metric_ids = num_stat_names;
-       memset(&ep, 0, sizeof(ep));
        if (telemetry == NULL) {
                TELEMETRY_LOG_ERR("Invalid telemetry argument");
                return -1;
@@ -605,7 +606,7 @@ rte_telemetry_parse_command(struct telemetry_impl *telemetry, int action,
        return -1;
 }
 
-int32_t __rte_experimental
+int32_t
 rte_telemetry_parse(struct telemetry_impl *telemetry, char *socket_rx_data)
 {
        int ret, action_int;