DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] metrics: remove experimental telemetry helper API
@ 2026-10-06 23:31 Stephen Hemminger
  2026-10-07  8:03 ` Bruce Richardson
  2026-10-08  9:17 ` David Marchand
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Hemminger @ 2026-10-06 23:31 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

While investigating experimental functions leftover in DPDK.

The rte_metrics_tel_* functions are dead code. Nothing in the tree
calls them from outside the metrics library itself; they were left
exported by the telemetry library rewrite in 20.05.

Stop exporting them. Delete the header, move the types into the C file
and make the helpers static. The file now only builds when jansson is
present, so the stub branch goes away too.

The legacy commands ports_all_stat_values, global_stat_values and
ports_stats_values_by_name are unchanged.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 doc/guides/rel_notes/release_26_11.rst |   9 +++
 lib/metrics/meson.build                |   6 +-
 lib/metrics/rte_metrics_telemetry.c    | 106 ++++++-------------------
 lib/metrics/rte_metrics_telemetry.h    |  71 -----------------
 4 files changed, 39 insertions(+), 153 deletions(-)
 delete mode 100644 lib/metrics/rte_metrics_telemetry.h

diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
index 934efaaf93..254e9ada64 100644
--- a/doc/guides/rel_notes/release_26_11.rst
+++ b/doc/guides/rel_notes/release_26_11.rst
@@ -195,6 +195,15 @@ Removed Items
   which were based on the legacy pipeline library API.
   The ``pipeline`` example application covers the SWX pipeline API.
 
+* metrics: Removed the experimental telemetry helper API
+  and the ``rte_metrics_telemetry.h`` header:
+  ``rte_metrics_tel_reg_all_ethdev``, ``rte_metrics_tel_encode_json_format``,
+  ``rte_metrics_tel_get_global_stats``, ``rte_metrics_tel_get_port_stats_ids``,
+  ``rte_metrics_tel_get_ports_stats_json`` and ``rte_metrics_tel_extract_data``.
+  These had no users and exposed jansson types in the public header.
+  The legacy telemetry commands ``ports_all_stat_values``,
+  ``global_stat_values`` and ``ports_stats_values_by_name`` are unchanged.
+
 * net/iavf: Removed the ``auto_reconfig`` devarg.
 
   The restoration of the promiscuous and all-multicast settings after a VF reset
diff --git a/lib/metrics/meson.build b/lib/metrics/meson.build
index 6722f666d2..0e32a08dc3 100644
--- a/lib/metrics/meson.build
+++ b/lib/metrics/meson.build
@@ -1,10 +1,12 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-sources = files('rte_metrics.c', 'rte_metrics_telemetry.c')
-headers = files('rte_metrics.h', 'rte_metrics_telemetry.h')
+sources = files('rte_metrics.c')
+headers = files('rte_metrics.h')
 
+# Legacy JSON telemetry commands are only available with jansson.
 if dpdk_conf.has('RTE_HAS_JANSSON')
+    sources += files('rte_metrics_telemetry.c')
     ext_deps += jansson_dep
 endif
 
diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
index f9ec556595..2350ef5041 100644
--- a/lib/metrics/rte_metrics_telemetry.c
+++ b/lib/metrics/rte_metrics_telemetry.c
@@ -2,19 +2,35 @@
  * Copyright(c) 2020 Intel Corporation
  */
 
+#include <jansson.h>
+
 #include <ethdev_driver.h>
-#include <eal_export.h>
 #include <rte_string_fns.h>
 #ifdef RTE_LIB_TELEMETRY
 #include <telemetry_internal.h>
 #endif
 
 #include "rte_metrics.h"
-#include "rte_metrics_telemetry.h"
-
-#ifdef RTE_HAS_JANSSON
 
-struct telemetry_metrics_data tel_met_data;
+enum rte_telemetry_stats_type {
+	PORT_STATS = 0,
+	GLOBAL_STATS = 1
+};
+
+struct telemetry_encode_param {
+	enum rte_telemetry_stats_type type;
+	struct port_param {
+		int num_metric_ids;
+		uint32_t metric_ids[RTE_METRICS_MAX_METRICS];
+		int num_port_ids;
+		uint32_t port_ids[RTE_MAX_ETHPORTS];
+	} pp;
+};
+
+static struct telemetry_metrics_data {
+	int reg_index[RTE_MAX_ETHPORTS];
+	int metrics_register_done;
+} tel_met_data;
 
 int metrics_log_level;
 #define RTE_LOGTYPE_METRICS metrics_log_level
@@ -72,8 +88,7 @@ rte_metrics_tel_reg_port_ethdev_to_metrics(uint16_t port_id)
 	return ret;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_reg_all_ethdev, 20.05)
-int32_t
+static int32_t
 rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list)
 {
 	struct driver_index {
@@ -227,8 +242,7 @@ rte_metrics_tel_format_port(uint32_t pid, json_t *ports,
 	return ret;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_encode_json_format, 20.05)
-int32_t
+static int32_t
 rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
 		char **json_buffer)
 {
@@ -281,8 +295,7 @@ rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
 	return 0;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_ports_stats_json, 20.05)
-int32_t
+static int32_t
 rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
 		int *reg_index, char **json_buffer)
 {
@@ -312,8 +325,7 @@ rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
 	return 0;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_port_stats_ids, 20.05)
-int32_t
+static int32_t
 rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep)
 {
 	int p, num_port_ids = 0;
@@ -379,8 +391,7 @@ rte_metrics_tel_stat_names_to_ids(const char * const *stat_names,
 	return 0;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_extract_data, 20.05)
-int32_t
+static int32_t
 rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data)
 {
 	int ret;
@@ -547,68 +558,3 @@ RTE_INIT(metrics_ctor)
 			handle_ports_stats_values_by_name);
 #endif
 }
-
-#else /* !RTE_HAS_JANSSON */
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_reg_all_ethdev, 20.05)
-int32_t
-rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list)
-{
-	RTE_SET_USED(metrics_register_done);
-	RTE_SET_USED(reg_index_list);
-
-	return -ENOTSUP;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_encode_json_format, 20.05)
-int32_t
-rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
-	char **json_buffer)
-{
-	RTE_SET_USED(ep);
-	RTE_SET_USED(json_buffer);
-
-	return -ENOTSUP;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_ports_stats_json, 20.05)
-int32_t
-rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
-	int *reg_index, char **json_buffer)
-{
-	RTE_SET_USED(ep);
-	RTE_SET_USED(reg_index);
-	RTE_SET_USED(json_buffer);
-
-	return -ENOTSUP;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_port_stats_ids, 20.05)
-int32_t
-rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep)
-{
-	RTE_SET_USED(ep);
-
-	return -ENOTSUP;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_extract_data, 20.05)
-int32_t
-rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data)
-{
-	RTE_SET_USED(ep);
-	RTE_SET_USED(data);
-
-	return -ENOTSUP;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_global_stats, 20.05)
-int32_t
-rte_metrics_tel_get_global_stats(struct telemetry_encode_param *ep)
-{
-	RTE_SET_USED(ep);
-
-	return -ENOTSUP;
-}
-
-#endif /* !RTE_HAS_JANSSON */
diff --git a/lib/metrics/rte_metrics_telemetry.h b/lib/metrics/rte_metrics_telemetry.h
deleted file mode 100644
index dd84f5431e..0000000000
--- a/lib/metrics/rte_metrics_telemetry.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Intel Corporation
- */
-
-#ifdef RTE_HAS_JANSSON
-#include <jansson.h>
-#else
-#define json_t void *
-#endif
-
-#include <rte_compat.h>
-#include "rte_metrics.h"
-
-#ifndef _RTE_METRICS_TELEMETRY_H_
-#define _RTE_METRICS_TELEMETRY_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum rte_telemetry_stats_type {
-	PORT_STATS = 0,
-	GLOBAL_STATS = 1
-};
-
-struct telemetry_encode_param {
-	enum rte_telemetry_stats_type type;
-	struct port_param {
-		int num_metric_ids;
-		uint32_t metric_ids[RTE_METRICS_MAX_METRICS];
-		int num_port_ids;
-		uint32_t port_ids[RTE_MAX_ETHPORTS];
-	} pp;
-};
-
-struct telemetry_metrics_data {
-	int reg_index[RTE_MAX_ETHPORTS];
-	int metrics_register_done;
-};
-
-__rte_experimental
-int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done,
-		int *reg_index_list);
-
-__rte_experimental
-int32_t
-rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
-		char **json_buffer);
-
-__rte_experimental
-int32_t
-rte_metrics_tel_get_global_stats(struct telemetry_encode_param *ep);
-
-__rte_experimental
-int32_t
-rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep);
-
-__rte_experimental
-int32_t
-rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
-		int *reg_index, char **json_buffer);
-
-__rte_experimental
-int32_t
-rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] metrics: remove experimental telemetry helper API
  2026-10-06 23:31 [PATCH] metrics: remove experimental telemetry helper API Stephen Hemminger
@ 2026-10-07  8:03 ` Bruce Richardson
  2026-10-07  8:26   ` David Marchand
  2026-10-07 15:32   ` Stephen Hemminger
  2026-10-08  9:17 ` David Marchand
  1 sibling, 2 replies; 5+ messages in thread
From: Bruce Richardson @ 2026-10-07  8:03 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev

On Tue, Oct 06, 2026 at 04:31:44PM -0700, Stephen Hemminger wrote:
> While investigating experimental functions leftover in DPDK.
> 
> The rte_metrics_tel_* functions are dead code. Nothing in the tree
> calls them from outside the metrics library itself; they were left
> exported by the telemetry library rewrite in 20.05.
> 
> Stop exporting them. Delete the header, move the types into the C file
> and make the helpers static. The file now only builds when jansson is
> present, so the stub branch goes away too.
> 
> The legacy commands ports_all_stat_values, global_stat_values and
> ports_stats_values_by_name are unchanged.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  doc/guides/rel_notes/release_26_11.rst |   9 +++
>  lib/metrics/meson.build                |   6 +-
>  lib/metrics/rte_metrics_telemetry.c    | 106 ++++++-------------------
>  lib/metrics/rte_metrics_telemetry.h    |  71 -----------------
>  4 files changed, 39 insertions(+), 153 deletions(-)
>  delete mode 100644 lib/metrics/rte_metrics_telemetry.h
> 

In the process, should we post a deprecation notice for the whole
metrics-based legacy telemetry system? It's been superceded for many years
now and it has a lot of limitations: supporting ethdev only, having
globally registered stats (so if you have two different NIC types, you get
a list of all stats names for both whatever port you query), and probably
more beside. That would allow us to remove a large enough chunk of code in
a future release.

/Bruce

> diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst
> index 934efaaf93..254e9ada64 100644
> --- a/doc/guides/rel_notes/release_26_11.rst
> +++ b/doc/guides/rel_notes/release_26_11.rst
> @@ -195,6 +195,15 @@ Removed Items
>    which were based on the legacy pipeline library API.
>    The ``pipeline`` example application covers the SWX pipeline API.
>  
> +* metrics: Removed the experimental telemetry helper API
> +  and the ``rte_metrics_telemetry.h`` header:
> +  ``rte_metrics_tel_reg_all_ethdev``, ``rte_metrics_tel_encode_json_format``,
> +  ``rte_metrics_tel_get_global_stats``, ``rte_metrics_tel_get_port_stats_ids``,
> +  ``rte_metrics_tel_get_ports_stats_json`` and ``rte_metrics_tel_extract_data``.
> +  These had no users and exposed jansson types in the public header.
> +  The legacy telemetry commands ``ports_all_stat_values``,
> +  ``global_stat_values`` and ``ports_stats_values_by_name`` are unchanged.
> +
>  * net/iavf: Removed the ``auto_reconfig`` devarg.
>  
>    The restoration of the promiscuous and all-multicast settings after a VF reset
> diff --git a/lib/metrics/meson.build b/lib/metrics/meson.build
> index 6722f666d2..0e32a08dc3 100644
> --- a/lib/metrics/meson.build
> +++ b/lib/metrics/meson.build
> @@ -1,10 +1,12 @@
>  # SPDX-License-Identifier: BSD-3-Clause
>  # Copyright(c) 2017 Intel Corporation
>  
> -sources = files('rte_metrics.c', 'rte_metrics_telemetry.c')
> -headers = files('rte_metrics.h', 'rte_metrics_telemetry.h')
> +sources = files('rte_metrics.c')
> +headers = files('rte_metrics.h')
>  
> +# Legacy JSON telemetry commands are only available with jansson.
>  if dpdk_conf.has('RTE_HAS_JANSSON')
> +    sources += files('rte_metrics_telemetry.c')
>      ext_deps += jansson_dep
>  endif
>  
> diff --git a/lib/metrics/rte_metrics_telemetry.c b/lib/metrics/rte_metrics_telemetry.c
> index f9ec556595..2350ef5041 100644
> --- a/lib/metrics/rte_metrics_telemetry.c
> +++ b/lib/metrics/rte_metrics_telemetry.c
> @@ -2,19 +2,35 @@
>   * Copyright(c) 2020 Intel Corporation
>   */
>  
> +#include <jansson.h>
> +
>  #include <ethdev_driver.h>
> -#include <eal_export.h>
>  #include <rte_string_fns.h>
>  #ifdef RTE_LIB_TELEMETRY
>  #include <telemetry_internal.h>
>  #endif
>  
>  #include "rte_metrics.h"
> -#include "rte_metrics_telemetry.h"
> -
> -#ifdef RTE_HAS_JANSSON
>  
> -struct telemetry_metrics_data tel_met_data;
> +enum rte_telemetry_stats_type {
> +	PORT_STATS = 0,
> +	GLOBAL_STATS = 1
> +};
> +
> +struct telemetry_encode_param {
> +	enum rte_telemetry_stats_type type;
> +	struct port_param {
> +		int num_metric_ids;
> +		uint32_t metric_ids[RTE_METRICS_MAX_METRICS];
> +		int num_port_ids;
> +		uint32_t port_ids[RTE_MAX_ETHPORTS];
> +	} pp;
> +};
> +
> +static struct telemetry_metrics_data {
> +	int reg_index[RTE_MAX_ETHPORTS];
> +	int metrics_register_done;
> +} tel_met_data;
>  
>  int metrics_log_level;
>  #define RTE_LOGTYPE_METRICS metrics_log_level
> @@ -72,8 +88,7 @@ rte_metrics_tel_reg_port_ethdev_to_metrics(uint16_t port_id)
>  	return ret;
>  }
>  
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_reg_all_ethdev, 20.05)
> -int32_t
> +static int32_t
>  rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list)
>  {
>  	struct driver_index {
> @@ -227,8 +242,7 @@ rte_metrics_tel_format_port(uint32_t pid, json_t *ports,
>  	return ret;
>  }
>  
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_encode_json_format, 20.05)
> -int32_t
> +static int32_t
>  rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
>  		char **json_buffer)
>  {
> @@ -281,8 +295,7 @@ rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
>  	return 0;
>  }
>  
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_ports_stats_json, 20.05)
> -int32_t
> +static int32_t
>  rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
>  		int *reg_index, char **json_buffer)
>  {
> @@ -312,8 +325,7 @@ rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
>  	return 0;
>  }
>  
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_port_stats_ids, 20.05)
> -int32_t
> +static int32_t
>  rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep)
>  {
>  	int p, num_port_ids = 0;
> @@ -379,8 +391,7 @@ rte_metrics_tel_stat_names_to_ids(const char * const *stat_names,
>  	return 0;
>  }
>  
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_extract_data, 20.05)
> -int32_t
> +static int32_t
>  rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data)
>  {
>  	int ret;
> @@ -547,68 +558,3 @@ RTE_INIT(metrics_ctor)
>  			handle_ports_stats_values_by_name);
>  #endif
>  }
> -
> -#else /* !RTE_HAS_JANSSON */
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_reg_all_ethdev, 20.05)
> -int32_t
> -rte_metrics_tel_reg_all_ethdev(int *metrics_register_done, int *reg_index_list)
> -{
> -	RTE_SET_USED(metrics_register_done);
> -	RTE_SET_USED(reg_index_list);
> -
> -	return -ENOTSUP;
> -}
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_encode_json_format, 20.05)
> -int32_t
> -rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
> -	char **json_buffer)
> -{
> -	RTE_SET_USED(ep);
> -	RTE_SET_USED(json_buffer);
> -
> -	return -ENOTSUP;
> -}
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_ports_stats_json, 20.05)
> -int32_t
> -rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
> -	int *reg_index, char **json_buffer)
> -{
> -	RTE_SET_USED(ep);
> -	RTE_SET_USED(reg_index);
> -	RTE_SET_USED(json_buffer);
> -
> -	return -ENOTSUP;
> -}
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_port_stats_ids, 20.05)
> -int32_t
> -rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep)
> -{
> -	RTE_SET_USED(ep);
> -
> -	return -ENOTSUP;
> -}
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_extract_data, 20.05)
> -int32_t
> -rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data)
> -{
> -	RTE_SET_USED(ep);
> -	RTE_SET_USED(data);
> -
> -	return -ENOTSUP;
> -}
> -
> -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_metrics_tel_get_global_stats, 20.05)
> -int32_t
> -rte_metrics_tel_get_global_stats(struct telemetry_encode_param *ep)
> -{
> -	RTE_SET_USED(ep);
> -
> -	return -ENOTSUP;
> -}
> -
> -#endif /* !RTE_HAS_JANSSON */
> diff --git a/lib/metrics/rte_metrics_telemetry.h b/lib/metrics/rte_metrics_telemetry.h
> deleted file mode 100644
> index dd84f5431e..0000000000
> --- a/lib/metrics/rte_metrics_telemetry.h
> +++ /dev/null
> @@ -1,71 +0,0 @@
> -/* SPDX-License-Identifier: BSD-3-Clause
> - * Copyright(c) 2020 Intel Corporation
> - */
> -
> -#ifdef RTE_HAS_JANSSON
> -#include <jansson.h>
> -#else
> -#define json_t void *
> -#endif
> -
> -#include <rte_compat.h>
> -#include "rte_metrics.h"
> -
> -#ifndef _RTE_METRICS_TELEMETRY_H_
> -#define _RTE_METRICS_TELEMETRY_H_
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -enum rte_telemetry_stats_type {
> -	PORT_STATS = 0,
> -	GLOBAL_STATS = 1
> -};
> -
> -struct telemetry_encode_param {
> -	enum rte_telemetry_stats_type type;
> -	struct port_param {
> -		int num_metric_ids;
> -		uint32_t metric_ids[RTE_METRICS_MAX_METRICS];
> -		int num_port_ids;
> -		uint32_t port_ids[RTE_MAX_ETHPORTS];
> -	} pp;
> -};
> -
> -struct telemetry_metrics_data {
> -	int reg_index[RTE_MAX_ETHPORTS];
> -	int metrics_register_done;
> -};
> -
> -__rte_experimental
> -int32_t rte_metrics_tel_reg_all_ethdev(int *metrics_register_done,
> -		int *reg_index_list);
> -
> -__rte_experimental
> -int32_t
> -rte_metrics_tel_encode_json_format(struct telemetry_encode_param *ep,
> -		char **json_buffer);
> -
> -__rte_experimental
> -int32_t
> -rte_metrics_tel_get_global_stats(struct telemetry_encode_param *ep);
> -
> -__rte_experimental
> -int32_t
> -rte_metrics_tel_get_port_stats_ids(struct telemetry_encode_param *ep);
> -
> -__rte_experimental
> -int32_t
> -rte_metrics_tel_get_ports_stats_json(struct telemetry_encode_param *ep,
> -		int *reg_index, char **json_buffer);
> -
> -__rte_experimental
> -int32_t
> -rte_metrics_tel_extract_data(struct telemetry_encode_param *ep, json_t *data);
> -
> -#ifdef __cplusplus
> -}
> -#endif
> -
> -#endif
> -- 
> 2.53.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] metrics: remove experimental telemetry helper API
  2026-10-07  8:03 ` Bruce Richardson
@ 2026-10-07  8:26   ` David Marchand
  2026-10-07 15:32   ` Stephen Hemminger
  1 sibling, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-10-07  8:26 UTC (permalink / raw)
  To: Bruce Richardson, Stephen Hemminger; +Cc: dev

On Wed, 7 Oct 2026 at 10:04, Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Tue, Oct 06, 2026 at 04:31:44PM -0700, Stephen Hemminger wrote:
> > While investigating experimental functions leftover in DPDK.
> >
> > The rte_metrics_tel_* functions are dead code. Nothing in the tree
> > calls them from outside the metrics library itself; they were left
> > exported by the telemetry library rewrite in 20.05.

Indeed, this patch is a continuation of 07c1b6925b65 ("telemetry:
invert dependency on metrics library").

> >
> > Stop exporting them. Delete the header, move the types into the C file
> > and make the helpers static. The file now only builds when jansson is
> > present, so the stub branch goes away too.
> >
> > The legacy commands ports_all_stat_values, global_stat_values and
> > ports_stats_values_by_name are unchanged.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> >  doc/guides/rel_notes/release_26_11.rst |   9 +++
> >  lib/metrics/meson.build                |   6 +-
> >  lib/metrics/rte_metrics_telemetry.c    | 106 ++++++-------------------
> >  lib/metrics/rte_metrics_telemetry.h    |  71 -----------------
> >  4 files changed, 39 insertions(+), 153 deletions(-)
> >  delete mode 100644 lib/metrics/rte_metrics_telemetry.h

This cleanup lgtm, I'll do some checks but it seems mergeable as is.


> In the process, should we post a deprecation notice for the whole
> metrics-based legacy telemetry system? It's been superceded for many years
> now and it has a lot of limitations: supporting ethdev only, having
> globally registered stats (so if you have two different NIC types, you get
> a list of all stats names for both whatever port you query), and probably
> more beside. That would allow us to remove a large enough chunk of code in
> a future release.

+1


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] metrics: remove experimental telemetry helper API
  2026-10-07  8:03 ` Bruce Richardson
  2026-10-07  8:26   ` David Marchand
@ 2026-10-07 15:32   ` Stephen Hemminger
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2026-10-07 15:32 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Wed, 7 Oct 2026 09:03:23 +0100
Bruce Richardson <bruce.richardson@intel.com> wrote:

> On Tue, Oct 06, 2026 at 04:31:44PM -0700, Stephen Hemminger wrote:
> > While investigating experimental functions leftover in DPDK.
> > 
> > The rte_metrics_tel_* functions are dead code. Nothing in the tree
> > calls them from outside the metrics library itself; they were left
> > exported by the telemetry library rewrite in 20.05.
> > 
> > Stop exporting them. Delete the header, move the types into the C file
> > and make the helpers static. The file now only builds when jansson is
> > present, so the stub branch goes away too.
> > 
> > The legacy commands ports_all_stat_values, global_stat_values and
> > ports_stats_values_by_name are unchanged.
> > 
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> >  doc/guides/rel_notes/release_26_11.rst |   9 +++
> >  lib/metrics/meson.build                |   6 +-
> >  lib/metrics/rte_metrics_telemetry.c    | 106 ++++++-------------------
> >  lib/metrics/rte_metrics_telemetry.h    |  71 -----------------
> >  4 files changed, 39 insertions(+), 153 deletions(-)
> >  delete mode 100644 lib/metrics/rte_metrics_telemetry.h
> >   
> 
> In the process, should we post a deprecation notice for the whole
> metrics-based legacy telemetry system? It's been superceded for many years
> now and it has a lot of limitations: supporting ethdev only, having
> globally registered stats (so if you have two different NIC types, you get
> a list of all stats names for both whatever port you query), and probably
> more beside. That would allow us to remove a large enough chunk of code in
> a future release.
> 
> /Bruce


Right that was going as follow on patch, but can add it on to this.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] metrics: remove experimental telemetry helper API
  2026-10-06 23:31 [PATCH] metrics: remove experimental telemetry helper API Stephen Hemminger
  2026-10-07  8:03 ` Bruce Richardson
@ 2026-10-08  9:17 ` David Marchand
  1 sibling, 0 replies; 5+ messages in thread
From: David Marchand @ 2026-10-08  9:17 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Bruce Richardson

On Wed, 7 Oct 2026 at 01:33, Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> While investigating experimental functions leftover in DPDK.
>
> The rte_metrics_tel_* functions are dead code. Nothing in the tree
> calls them from outside the metrics library itself; they were left
> exported by the telemetry library rewrite in 20.05.
>
> Stop exporting them. Delete the header, move the types into the C file
> and make the helpers static. The file now only builds when jansson is
> present, so the stub branch goes away too.
>
> The legacy commands ports_all_stat_values, global_stat_values and
> ports_stats_values_by_name are unchanged.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-08  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 23:31 [PATCH] metrics: remove experimental telemetry helper API Stephen Hemminger
2026-10-07  8:03 ` Bruce Richardson
2026-10-07  8:26   ` David Marchand
2026-10-07 15:32   ` Stephen Hemminger
2026-10-08  9:17 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox