Telemetry command registration fails if the command name contains
characters other than alphanumeric, underscore (_), and forward
slash (/).

The l3fwd-power example previously used "/l3fwd-power/stats"
as telemetry command, which includes a hyphen (-) and causes
registration failure.

This patch fixes the issue by replacing the hyphen with an
underscore, changing the command to "/l3fwd_power/stats"

Fixes: a35919a1139b ("examples/l3fwd-power: use new telemetry")
Cc: [email protected]
Cc: [email protected]

Signed-off-by: Sivaprasad Tummala <[email protected]>
---
 examples/l3fwd-power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index e27b8531b5..f9ce9e6698 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2910,7 +2910,7 @@ main(int argc, char **argv)
                        rte_spinlock_init(&stats[lcore_id].telemetry_lock);
                }
                rte_timer_init(&telemetry_timer);
-               rte_telemetry_register_cmd("/l3fwd-power/stats",
+               rte_telemetry_register_cmd("/l3fwd_power/stats",
                                handle_app_stats,
                                "Returns global power stats. Parameters: None");
                rte_eal_mp_remote_launch(main_telemetry_loop, NULL,
-- 
2.43.0

Reply via email to