From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DAC49A0547; Tue, 9 Feb 2021 15:15:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DC914014E; Tue, 9 Feb 2021 15:15:17 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 8524640147; Tue, 9 Feb 2021 15:15:15 +0100 (CET) IronPort-SDR: Q+VNVrNN0oekrHQL865Kl1bZBGesjBDYUmLrxFslfwXVOiUiO3M+wyC9i/ZqdMaQzbNgVEftaz Kml5ppNPaozA== X-IronPort-AV: E=McAfee;i="6000,8403,9889"; a="179326474" X-IronPort-AV: E=Sophos;i="5.81,165,1610438400"; d="scan'208";a="179326474" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2021 06:15:14 -0800 IronPort-SDR: 8FIikttdQ0b529umy0DS3Dx+hhd5IJJbTCglKs+9BEHHu5iUaIjyIPalVNkEQBoGQ+R/qDDIcq aimt+UFdZ28A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,165,1610438400"; d="scan'208";a="419446369" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.27]) by FMSMGA003.fm.intel.com with ESMTP; 09 Feb 2021 06:15:12 -0800 From: Ferruh Yigit To: Xiaoyun Li , Jasvinder Singh , Jingjing Wu , Adrien Mazarguil , Cristian Dumitrescu Cc: Ferruh Yigit , dev@dpdk.org, stable@dpdk.org Date: Tue, 9 Feb 2021 14:15:06 +0000 Message-Id: <20210209141506.1506473-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205133926.779938-1-ferruh.yigit@intel.com> References: <20210205133926.779938-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] app/testpmd: fix meter commands help strings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Helps strings syntax is "command : description", the 'command' part was missing, updated command help strings. Fixes: 281eeb8afc55 ("app/testpmd: add commands for metering and policing") Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing") Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Cc: jasvinder.singh@intel.com Cc: cristian.dumitrescu@intel.com - "set port meter dscp table" documented with 'port_id' & 'mtr_id', but command itself is not requiring it, can be better to double check the intention in the command. - In command "show port meter stats yes|no", it is not clear what 'yes|no' is, can be better to have a 'clear' keyword there: "show port meter stats clear yes|no" - 'meter' commands seems using many high level commands, that is harder to remember when you take all commands into account: "show port meter ..." "add port meter ..." "del port meter ..." "create port meter ..." "enable port meter ..." "disable port meter ..." "set port meter ..." And some high level commands created just for 'meter'. Instead I think it is better to group the commands, like: "port meter [add,del,create,enable,disable] ..." "show port meter ..." It is already too late but it worth to keep in mind for the possible future update. v2: * Fixed typo, actiono -> action0 * Added more info to help string, like "(possible values)" v3: * Fix the "set port meter dscp table" command according the original intention --- app/test-pmd/cmdline_mtr.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c index 399ee56e07d9..3982787d2093 100644 --- a/app/test-pmd/cmdline_mtr.c +++ b/app/test-pmd/cmdline_mtr.c @@ -312,7 +312,7 @@ static void cmd_show_port_meter_cap_parsed(void *parsed_result, cmdline_parse_inst_t cmd_show_port_meter_cap = { .f = cmd_show_port_meter_cap_parsed, .data = NULL, - .help_str = "Show port meter cap", + .help_str = "show port meter cap ", .tokens = { (void *)&cmd_show_port_meter_cap_show, (void *)&cmd_show_port_meter_cap_port, @@ -408,7 +408,7 @@ static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result, cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm = { .f = cmd_add_port_meter_profile_srtcm_parsed, .data = NULL, - .help_str = "Add port meter profile srtcm (rfc2697)", + .help_str = "add port meter profile srtcm_rfc2697 ", .tokens = { (void *)&cmd_add_port_meter_profile_srtcm_add, (void *)&cmd_add_port_meter_profile_srtcm_port, @@ -515,7 +515,7 @@ static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result, cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm = { .f = cmd_add_port_meter_profile_trtcm_parsed, .data = NULL, - .help_str = "Add port meter profile trtcm (rfc2698)", + .help_str = "add port meter profile trtcm_rfc2698 ", .tokens = { (void *)&cmd_add_port_meter_profile_trtcm_add, (void *)&cmd_add_port_meter_profile_trtcm_port, @@ -627,7 +627,7 @@ static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed( cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 = { .f = cmd_add_port_meter_profile_trtcm_rfc4115_parsed, .data = NULL, - .help_str = "Add port meter profile trtcm (rfc4115)", + .help_str = "add port meter profile trtcm_rfc4115 ", .tokens = { (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add, (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port, @@ -702,7 +702,7 @@ static void cmd_del_port_meter_profile_parsed(void *parsed_result, cmdline_parse_inst_t cmd_del_port_meter_profile = { .f = cmd_del_port_meter_profile_parsed, .data = NULL, - .help_str = "Delete port meter profile", + .help_str = "del port meter profile ", .tokens = { (void *)&cmd_del_port_meter_profile_del, (void *)&cmd_del_port_meter_profile_port, @@ -827,7 +827,10 @@ static void cmd_create_port_meter_parsed(void *parsed_result, cmdline_parse_inst_t cmd_create_port_meter = { .f = cmd_create_port_meter_parsed, .data = NULL, - .help_str = "Create port meter", + .help_str = "create port meter (yes|no) " + "(R|Y|G|D) (R|Y|G|D) (R|Y|G|D) " + " " + "[ ...]", .tokens = { (void *)&cmd_create_port_meter_create, (void *)&cmd_create_port_meter_port, @@ -896,7 +899,7 @@ static void cmd_enable_port_meter_parsed(void *parsed_result, cmdline_parse_inst_t cmd_enable_port_meter = { .f = cmd_enable_port_meter_parsed, .data = NULL, - .help_str = "Enable port meter", + .help_str = "enable port meter ", .tokens = { (void *)&cmd_enable_port_meter_enable, (void *)&cmd_enable_port_meter_port, @@ -957,7 +960,7 @@ static void cmd_disable_port_meter_parsed(void *parsed_result, cmdline_parse_inst_t cmd_disable_port_meter = { .f = cmd_disable_port_meter_parsed, .data = NULL, - .help_str = "Disable port meter", + .help_str = "disable port meter ", .tokens = { (void *)&cmd_disable_port_meter_disable, (void *)&cmd_disable_port_meter_port, @@ -1018,7 +1021,7 @@ static void cmd_del_port_meter_parsed(void *parsed_result, cmdline_parse_inst_t cmd_del_port_meter = { .f = cmd_del_port_meter_parsed, .data = NULL, - .help_str = "Delete port meter", + .help_str = "del port meter ", .tokens = { (void *)&cmd_del_port_meter_del, (void *)&cmd_del_port_meter_port, @@ -1092,7 +1095,7 @@ static void cmd_set_port_meter_profile_parsed(void *parsed_result, cmdline_parse_inst_t cmd_set_port_meter_profile = { .f = cmd_set_port_meter_profile_parsed, .data = NULL, - .help_str = "Set port meter profile", + .help_str = "set port meter profile ", .tokens = { (void *)&cmd_set_port_meter_profile_set, (void *)&cmd_set_port_meter_profile_port, @@ -1166,7 +1169,8 @@ static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result, cmdline_parse_inst_t cmd_set_port_meter_dscp_table = { .f = cmd_set_port_meter_dscp_table_parsed, .data = NULL, - .help_str = "Update port meter dscp table", + .help_str = "set port meter dscp table " + "[ ... ]", .tokens = { (void *)&cmd_set_port_meter_dscp_table_set, (void *)&cmd_set_port_meter_dscp_table_port, @@ -1276,7 +1280,8 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result, cmdline_parse_inst_t cmd_set_port_meter_policer_action = { .f = cmd_set_port_meter_policer_action_parsed, .data = NULL, - .help_str = "Set port meter policer action", + .help_str = "set port meter policer action " + " [ ]", .tokens = { (void *)&cmd_set_port_meter_policer_action_set, (void *)&cmd_set_port_meter_policer_action_port, @@ -1355,7 +1360,7 @@ static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result, cmdline_parse_inst_t cmd_set_port_meter_stats_mask = { .f = cmd_set_port_meter_stats_mask_parsed, .data = NULL, - .help_str = "Set port meter stats mask", + .help_str = "set port meter stats mask ", .tokens = { (void *)&cmd_set_port_meter_stats_mask_set, (void *)&cmd_set_port_meter_stats_mask_port, @@ -1459,7 +1464,7 @@ static void cmd_show_port_meter_stats_parsed(void *parsed_result, cmdline_parse_inst_t cmd_show_port_meter_stats = { .f = cmd_show_port_meter_stats_parsed, .data = NULL, - .help_str = "Show port meter stats", + .help_str = "show port meter stats (yes|no)", .tokens = { (void *)&cmd_show_port_meter_stats_show, (void *)&cmd_show_port_meter_stats_port, -- 2.29.2