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 16B65A0547; Sun, 7 Feb 2021 03:47:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 400581606CE; Sun, 7 Feb 2021 03:47:37 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 9DDF240147; Sun, 7 Feb 2021 03:47:35 +0100 (CET) IronPort-SDR: e79eZ7bBXvd8YdHaA1Qz+rfroGN5Aer6zLMyIWboL7N/ymgV+ZZ4cxS/8gnrfPUHiZKQvegWS+ hI6uV46VbR9A== X-IronPort-AV: E=McAfee;i="6000,8403,9887"; a="168702376" X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="168702376" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2021 18:47:33 -0800 IronPort-SDR: INPs9mkVuAQY46/855vcQmfyQosC0YSnQoUk+C/PEB4WL2sPc/hWim+Jn/oJOpMUfVj7NtUET/ aMGP9NkkYsvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="485647237" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga001.fm.intel.com with ESMTP; 06 Feb 2021 18:47:33 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 6 Feb 2021 18:47:32 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 6 Feb 2021 18:47:32 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sat, 6 Feb 2021 18:47:32 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sat, 6 Feb 2021 18:47:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DJdvdCZrqde6gzP6Q37247Lyqv5GEU1iqpNgYff6GeoK7paJ1Zuoexz2RaMl45Cq7BlMHBG0nd8Pq244fxpXI+Gy69UfaWjuFJafOURJWMhdES6uJTp5SdWOlv/nLWUBZEuMz4ESe0jZ7TBuZEjgwb4G2ZbDb9sWXbdnw4t6nwn1BNnVVH9HV97yxH8/ZuW0LAKr0ayiPHPf0NAhlS2YtquLF0Yq1PQoo+5zIFfYl5C7k1ALI++AHE8URmDBiHzn8EC9jpbxgx7It0PXge7CDlOLjXFgLmfff515Ui7zvEo5c5WdmRpqxUW6PT4QunLnNwnAxL4Z4xKw46mIhySosA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qsoa6D+SlR7jIADLA9RFc3bHHBv/oEQi5WYzIOLgI+0=; b=ec7B+zBETSHlAY0rZt4HlBBdQ77e+rIm2PHCnLYKmAAYHdQoIHQJntWExHcbdJKdqAgUp0599JZykQ+nfWZ5shbzQFenbJcLvuoV5+KF1fy0yIqNOM03Jb4FbScBjCWvdpQrXv5vypGX4cmt7zYLwLLgWhK37ofBk4FkwM2ptbe/ws2hzLjFh1WTDWYoo0yaU34ukgV6twQ4UZa4xgr5zPLOpf9CPRdV+ImucT5qftroRMTc1dnbBSGfNR9azjVjeIhdC2gAxxUr/CDHvAZ1TGQy/rhv7r1lKEo8jT3WYqtvImDoNMmsiNAvE0kEs8omyNafftjGooPQ8s+GgVNHqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qsoa6D+SlR7jIADLA9RFc3bHHBv/oEQi5WYzIOLgI+0=; b=ZPro2SdwWrWKLasWtr2McM3I4olbBUaRjmPnLLj/j7NY/Zw/8BAU3ewTCk0I+LJJKFdX5519nJ89bIeOiivUFVyf/L2rSrXpFN9LbpUUwAY6Dcvd5zqlMzoyldaWdkPhsljdz/tgiUwmzQzqC4uDj507lJ8WUtyZf8YDHplM6dk= Received: from CY4PR11MB1750.namprd11.prod.outlook.com (2603:10b6:903:126::8) by CY4PR1101MB2133.namprd11.prod.outlook.com (2603:10b6:910:17::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.17; Sun, 7 Feb 2021 02:47:27 +0000 Received: from CY4PR11MB1750.namprd11.prod.outlook.com ([fe80::8fd:c082:f2bc:f6ae]) by CY4PR11MB1750.namprd11.prod.outlook.com ([fe80::8fd:c082:f2bc:f6ae%12]) with mapi id 15.20.3825.021; Sun, 7 Feb 2021 02:47:26 +0000 From: "Li, Xiaoyun" To: "Yigit, Ferruh" , "Lu, Wenzhuo" , "Iremonger, Bernard" , "Singh, Jasvinder" , "Wu, Jingjing" , "Dumitrescu, Cristian" , Adrien Mazarguil CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] app/testpmd: fix meter commands help strings Thread-Index: AQHW+8RbPnnmYX0JlEqJTY9++f3adqpL9+/g Date: Sun, 7 Feb 2021 02:47:26 +0000 Message-ID: References: <20210205133926.779938-1-ferruh.yigit@intel.com> In-Reply-To: <20210205133926.779938-1-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8e39a2bc-3562-4ee5-d5ba-08d8cb12b46c x-ms-traffictypediagnostic: CY4PR1101MB2133: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: foXJb5SFFjOpyc4sySzLqvO90I0JE8+/Zs1Te44dOgY/GxV2Gm57SLHzLXot9zhzcBF7st/t2Pku9JfeuOnRMhg+O/A54wmdaY5FJEz0aEsr7kTIE0iDptMBrvCfJ+At0c+IYfJ9GQJja9jZUHbmRZiq5tyoZ+yIqf4qWpWu7mO4KjgIXzewtLZ0XRDwBRtVInkG2iuLSTq60x/lxQ+DQxKxlkpS+uQA2yVpQo1CcDZchubvmk01QlXgImzarmeqaY7clyMWFg+1XEsiF+Q5ZvAqSDNm/f7OPDiRlYV3OGBm3Ltboc8n6993lV8UMqkuL3kqkcn24BBGhXCw+YhBtyq0JJAYYBkZ7uLWDcVf8iEO13L4ixlTGd2RU9Ptkdxp8pg6SihgtW8zueLRuM/YpGH3RjyY9KZMXpK1j33uCmsKVkJ1YpLLjjCrHkRPBMkvrnPobPDdUu97jEQlf7eDbF0jBRKBvZyGSsAWuKJ4LcMXsDAjwDt0xtl9JuVUvRpSqpaBns6IHhK8wQ6PUcsXP4qJXGZ6CQIEnzzPKAY/YqZfMHudgIAFZsWx9UWYZDcs x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR11MB1750.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(396003)(346002)(136003)(366004)(376002)(52536014)(5660300002)(55016002)(33656002)(64756008)(66556008)(66476007)(66946007)(66446008)(76116006)(4326008)(9686003)(316002)(110136005)(2906002)(54906003)(8936002)(478600001)(7696005)(26005)(71200400001)(186003)(6506007)(53546011)(86362001)(8676002)(83380400001)(921005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?jag0OFHNmIEGr5yY/PrNyVO8DfWqolq91wTfEWL/sZvYZbxafElOxHyE1rfG?= =?us-ascii?Q?NkMaHFksiUEYC6NmPdvRs8YEKk1kV3NhR0dAz66yGTZhLU+spcs5xvfkgs67?= =?us-ascii?Q?b24+5EZY0HV30laDbulS416DojC9thr8WiDHkHbUrNfIrVDMzzGJWX+FxIVD?= =?us-ascii?Q?QadscWRAMS5ZDNWgsF9nkWD+IcMkQz1zdOmOhUjg0KPoN80IWgM3SzAjcGNY?= =?us-ascii?Q?gX0V6Vq08GoZtv9cZXJ6lW8jUyE5HxsSZqBJbZ31TrgH0Vcrd0tfZA4qSB/E?= =?us-ascii?Q?ibna0DDrF6cE0aOH4bP4CGwNABzxHuLsQmPn3sXnh+TI3qF1V3btEUKPthgH?= =?us-ascii?Q?w0jUbtbcQFXkGV5DDJCkAXvXNf0GTaQcO/xeXdNxtPVJNwaSvdBzsNpTOUpA?= =?us-ascii?Q?vxrhzRfT0yvssxS/MX5CBrNy5f4q/eEYoDlRhWdfbfZYPYevaPhJwqZRe5If?= =?us-ascii?Q?vkTC6jcoqcNC02lCBvMncEXq56w9zQU48OG9LerE8S3X3isjOC4r2MyH+jqu?= =?us-ascii?Q?OKxiVKO7vzY/19qoOTG4SPlfP/nj6+ryrrRqYYiZESy1qjNfoAqC0MFhEsKV?= =?us-ascii?Q?skkA4gX2x5gqHLdiI8DdZEjS0R6FNdu3PREzGD1iZeyFvJspm6Dbv+3N6QxA?= =?us-ascii?Q?8cA0O5kO2vfL3tyYGhdCqUJIOAOLxI2k5UsEK4XGD//Wqcr7a5x9Dgd8iM2B?= =?us-ascii?Q?JJ7xnxK7z70ORw4tjb2C9Lc0V3UoAW/76RvuAqPpLKdPPn/kH6dRdtkXQU83?= =?us-ascii?Q?9Ac0xwbV7otPNBOC5+bQ23Xua53qBeMqwBXdJwFgtPSjymcXNvEFi4pUGlZK?= =?us-ascii?Q?IxAqfFdtonWDS7HHXEMK1a6ssH3oYaG1YEIwVd9natS0GTyPKkQCNHm+TeDY?= =?us-ascii?Q?kdqRTkPC8u7nIBM30bTPAHhi5kqyIkai7kxZHVFCTqVNcnz4ZSmnkvwaVpvb?= =?us-ascii?Q?UyQjEeh7ZzBCmzxePYwHPn4pYBLjP+jwotC5XduIofAVQoNLRY1/EPzZLx7Z?= =?us-ascii?Q?WZEJ7nph5NgC7OwGv2h2fqz33FiOY5FF9z5ruuBdq7SAPUG1waPpi0yXAVme?= =?us-ascii?Q?QASmJZcwr09KQ48W2sz7lKGpoCoLrWt8F9rtttYFkwEJzDDKRgi6azYDjsmu?= =?us-ascii?Q?OWo0csYpIJsyl1Rm1q664J0LM5e0/aCB3YZaBsGGuC5OCkm5vUDHHSF736lA?= =?us-ascii?Q?PR74b6hTwTOb337B5OSIAxh9NzWtiDos5Ewmn+NzK490HXsnhC7aA8WO8ZNS?= =?us-ascii?Q?hQNueexk73TLUvrslZ9tuMil1w2W9sDz4B/XNNibyvl+SApa5S0I8RFpL1Rz?= =?us-ascii?Q?AnzCKzL6/ubmxJOP/8COmleU?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1750.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e39a2bc-3562-4ee5-d5ba-08d8cb12b46c X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2021 02:47:26.7847 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NFfldJTE6EEEoLH9Bfp+WL0gVkLPfNRWT8HbPTASr+GOgXSJe28mlL1wKczdn/wJFOfjYkgtaKZv/soIh7o2Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2133 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH] 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" Hi > -----Original Message----- > From: Yigit, Ferruh > Sent: Friday, February 5, 2021 21:39 > To: Lu, Wenzhuo ; Li, Xiaoyun ; > Iremonger, Bernard ; Singh, Jasvinder > ; Wu, Jingjing ; Dumitr= escu, > Cristian ; Adrien Mazarguil > > Cc: Yigit, Ferruh ; dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] app/testpmd: fix meter commands help strings >=20 > Helps strings syntax is "command : description", the 'command' part was m= issing, > updated command help strings. >=20 > 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 >=20 > Signed-off-by: Ferruh Yigit > --- > Cc: jasvinder.singh@intel.com > Cc: cristian.dumitrescu@intel.com >=20 > - "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. > --- > app/test-pmd/cmdline.c | 2 +- > app/test-pmd/cmdline_mtr.c | 32 ++++++++++++++++++-------------- > 2 files changed, 19 insertions(+), 15 deletions(-) > @@ -827,7 +827,9 @@ static void cmd_create_port_meter_parsed(void > *parsed_result, cmdline_parse_inst_t cmd_create_port_meter =3D { > .f =3D cmd_create_port_meter_parsed, > .data =3D NULL, > - .help_str =3D "Create port meter", > + .help_str =3D "create port meter " > + "yes|no R|Y|G|D R|Y|G|D R|Y|G|D " It seems it should be R|Y|G|D|r|y|g|d R|Y|G|D|r|y|g|d R|Y|G|D|r|y|g|d. What about just use as in cmd_help_long_pa= rsed? > + " [ > +...]", > .tokens =3D { > (void *)&cmd_create_port_meter_create, > (void *)&cmd_create_port_meter_port, > cmd_set_port_meter_dscp_table_parsed(void *parsed_result, > cmdline_parse_inst_t cmd_set_port_meter_dscp_table =3D { > .f =3D cmd_set_port_meter_dscp_table_parsed, > .data =3D NULL, > - .help_str =3D "Update port meter dscp table", > + .help_str =3D "set port meter dscp table " > + "[ ... ]", It should be "set port meter dscp table " "[ ... ]"? Because in parse_multi_token_string(), it starts from port_id. Hmmm... The = code seems very messy, not inconsistent. > .tokens =3D { > (void *)&cmd_set_port_meter_dscp_table_set, > (void *)&cmd_set_port_meter_dscp_table_port, > @@ -1276,7 +1279,8 @@ static void > cmd_set_port_meter_policer_action_parsed(void *parsed_result, > cmdline_parse_inst_t cmd_set_port_meter_policer_action =3D { > .f =3D cmd_set_port_meter_policer_action_parsed, > .data =3D NULL, > - .help_str =3D "Set port meter policer action", > + .help_str =3D "set port meter policer action " > + " [ ]", [ ]? Since it seems only 3 actions exist (action_mask & (~0x7UL), check action m= ask part in parse function). And each action seems to be G|Y|R|D|g|y|r|d. hmmm. Messy code... > .tokens =3D { > (void *)&cmd_set_port_meter_policer_action_set, > (void *)&cmd_set_port_meter_policer_action_port, > -- > 2.29.2