doc/guides: fix telemetry register command example
PATCH 1/1 doc/guides: fix telemetry register command example
The example shown for registering telemetry commands was previously missing the help text parameter.
Fixes 24cd1b529f35 ("doc: update telemetry guides")
Signed-off-by Ciara Power <[email protected]>
--- doc/guides/prog_guide/telemetry_lib.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
doc/guides/prog_guide/telemetry_lib.rst +9 -5
@@ -21,14 +21,18 @@ Registering Commands Libraries and applications must register commands to make their information available via the Telemetry library. This involves providing a string command -in the required format ("/library/command"), and the callback function that -will handle formatting the information when required. An example showing ethdev -commands being registered is shown below: +in the required format ("/library/command"), the callback function that +will handle formatting the information when required, and help text for the +command. An example showing ethdev commands being registered is shown below: .. code-block:: c - rte_telemetry_register_cmd("/ethdev/list", handle_port_list); - rte_telemetry_register_cmd("/ethdev/xstats", handle_port_xstats); + rte_telemetry_register_cmd("/ethdev/list", handle_port_list, + "Returns list of available ethdev ports. Takes no parameters"); + rte_telemetry_register_cmd("/ethdev/xstats", handle_port_xstats, + "Returns the extended stats for a port. Parameters: int port_id"); + rte_telemetry_register_cmd("/ethdev/link_status", handle_port_link_status, + "Returns the link status for a port. Parameters: int port_id"); Formatting JSON response
Signature · 1 line
2.17.1
Quoted 9 lines · Ciara Power
The example shown for registering telemetry commands was previously missing the help text parameter.
Fixes 24cd1b529f35 ("doc: update telemetry guides")Signed-off-by Ciara Power <[email protected]>--- doc/guides/prog_guide/telemetry_lib.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Reviewed-by Kevin Laatz <[email protected]>
Thomas Monjalon
Applied22/05/2020 18:44, Laatz, Kevin:
Quoted 9 lines · Ciara Power
Quoted 6 lines
The example shown for registering telemetry commands was previously missing the help text parameter.
Fixes 24cd1b529f35 ("doc: update telemetry guides")Signed-off-by Ciara Power <[email protected]>Reviewed-by Kevin Laatz <[email protected]>
Applied, thanks