From patchwork Fri May 22 16:27:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Power, Ciara" X-Patchwork-Id: 70532 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 95BCCA04A2; Fri, 22 May 2020 18:30:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 180EE1D9CA; Fri, 22 May 2020 18:30:45 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 779FF1D9C6 for ; Fri, 22 May 2020 18:30:43 +0200 (CEST) IronPort-SDR: hZbaOTcRnT/GNB7nmjZdRatj1G5RRmYGag44WUPxiiGY7/YHoW2EVSclOqr4SCkp/rQXjW9Nw+ tHES3fQd+RCA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 09:30:42 -0700 IronPort-SDR: 4JIEsiE4ZUPz522PKPFTvgksBaFA6HhQmUKxbWGlpI2h2AYk8hmHBDtywLZ5MRiy7KYogEiMOj CP9FKLLiwJ9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,422,1583222400"; d="scan'208";a="467233172" Received: from silpixa00399953.ir.intel.com (HELO silpixa00399953.ger.corp.intel.com) ([10.237.222.53]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2020 09:30:41 -0700 From: Ciara Power To: kevin.laatz@intel.com Cc: dev@dpdk.org, Ciara Power Date: Fri, 22 May 2020 17:27:41 +0100 Message-Id: <20200522162741.27672-1-ciara.power@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] doc/guides: fix telemetry register command example X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Kevin Laatz --- doc/guides/prog_guide/telemetry_lib.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/guides/prog_guide/telemetry_lib.rst b/doc/guides/prog_guide/telemetry_lib.rst index d8f5856ee..8563a7200 100644 --- a/doc/guides/prog_guide/telemetry_lib.rst +++ b/doc/guides/prog_guide/telemetry_lib.rst @@ -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