[v2,2/2] eventdev: add standard aliases for telemetry commands

Message ID 20241106163106.1114932-3-bruce.richardson@intel.com (mailing list archive)
State New
Delegated to: Jerin Jacob
Headers
Series small improvements for eventdev telemetry |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Bruce Richardson Nov. 6, 2024, 4:31 p.m. UTC
Most other device classes in DPDK which offer telemetry provide a list
of the devices of that class via "/<class>/list", e.g. /ethdev/list,
/ring/list, /mempool/list. However, eventdev provided that list via
"dev_list" command. For consistency, add "list" as an alias for
"dev_list" - after all the "dev" is part of the initial "/eventdev"
prefix part, so should not need repeating.

Similarly for the "dev_info" command, provide an alias as just "info".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eventdev/rte_eventdev.c | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Patch

diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 23631ff3f6..d3f1ea092f 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -2067,6 +2067,15 @@  RTE_INIT(eventdev_init_telemetry)
 			"Returns list of available eventdevs. Takes no parameters");
 	rte_telemetry_register_cmd("/eventdev/dev_info", handle_dev_info,
 			"Returns basic info about an eventdev. Parameter: DevID");
+
+	/* alias "dev_list" and "dev_info" as just "list" and "info" to match
+	 * other categories, such as ethdev, ring, mempool etc.
+	 */
+	rte_telemetry_register_cmd("/eventdev/list", handle_dev_list,
+			"Returns list of available eventdevs. Takes no parameters");
+	rte_telemetry_register_cmd("/eventdev/info", handle_dev_info,
+			"Returns basic info about an eventdev. Parameter: DevID");
+
 	rte_telemetry_register_cmd("/eventdev/port_list", handle_port_list,
 			"Returns list of available ports. Parameter: DevID");
 	rte_telemetry_register_cmd("/eventdev/queue_list", handle_queue_list,