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 38435A054F; Tue, 2 Mar 2021 04:04:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0FFB4014E; Tue, 2 Mar 2021 04:04:42 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mails.dpdk.org (Postfix) with ESMTP id EE3E140142 for ; Tue, 2 Mar 2021 04:04:40 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 01 Mar 2021 19:04:39 -0800 Received: from HQMAIL107.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 01 Mar 2021 19:04:39 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 01 Mar 2021 19:04:39 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 03:04:39 +0000 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 03:04:30 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.104) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 2 Mar 2021 03:04:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KUz6dCzkz0AjJvaTNpnmGMtwH2iveutz/HPu+rB8fpt0KvHOAX5LY8utfpJrUDgINHXXy6TbEtw1r5E+LdzNmD83q3DH/m+jXMTbzGfhYrkY00LpNaRBbk65IYtLI4QcER4IlwMcBqAwoan5TFa/ca7aiduk+V7R+cUzR+jKTRKZ7Qdfh/QlcxqKffWjirGnAzZFxQWv6FaC19Kca6ycuGg5tJ+cxLQ9tD32i/khZrM/5aAO+2yHlwxjK4jSD2OIAf4PzwlVoW4od3v6O0qDAbfYH/mjYz6Bhk4zmGbbQwtCJ0fr62THVUPQ1z05dygwnaCF6VtCI/PBy1MrIY55rA== 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=ys/j9eljtFHlGAic2YKButMIlX2YXjTyCqv0mdi7A5Y=; b=maOfP6Im7XWJbcjYeUz5XWQZAOvsz99aIC3mRGCq9LJris8yeskIioP4OhLP0lQYIf89MBCvzfpdPO0Bnu7d4YVfxD1Hedi1MF6RvCxSEmYqIk1ujN7xQ77tHlSfeed3tDtge0OEwod/7HX/UXKnw3y/958WEdq/xYIfeMAqtGRbBK5MzCgSRNhvidqwrxwudAmF+5eW4aYXgTtqsqdwZUAEs4KcWzj8/DYjTpMxxHu3nZpl0EWXcjzGSkEV4YDi82LKnaOoMcDF17LlVgvp7LuV05E80yxOcij491bFJbFvK0F+oyVeEAiiJSRUK9LYFYLxp4VMzLmXzrJOvnAUpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM6PR12MB4090.namprd12.prod.outlook.com (2603:10b6:5:217::11) by DM5PR12MB1275.namprd12.prod.outlook.com (2603:10b6:3:75::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Tue, 2 Mar 2021 03:04:29 +0000 Received: from DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::6db7:9c8b:8a98:44b2]) by DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::6db7:9c8b:8a98:44b2%4]) with mapi id 15.20.3890.029; Tue, 2 Mar 2021 03:04:28 +0000 From: Li Zhang To: "Li, Xiaoyun" , Dekel Peled , "Ori Kam" , Slava Ovsiienko , Matan Azrad CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , Raslan Darawsheh , "mb@smartsharesystems.com" , "ajit.khaparde@broadcom.com" , "Jiawei(Jonny) Wang" Thread-Topic: [dpdk-dev] [RFC v4 4/4] app/testpmd: add meter pps mode cmd Thread-Index: AQHXDoa0yh7pklTqJ0+WByD7n4kK1qpv7xsAgAAU0kA= Date: Tue, 2 Mar 2021 03:04:28 +0000 Message-ID: References: <20210125010235.1768333-1-lizh@nvidia.com> <20210301103532.184983-1-lizh@nvidia.com> <20210301103532.184983-5-lizh@nvidia.com> In-Reply-To: Accept-Language: zh-CN, 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=nvidia.com; x-originating-ip: [103.142.141.10] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 85a57a11-287b-46df-450e-08d8dd27e4ff x-ms-traffictypediagnostic: DM5PR12MB1275: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:506; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZMhzG2QC7HoENjOgKbH/j+IrSs+Yt9uDarKC5kgoU1xzHjODCq01hDHmOekES9KRrHEVI8Zse0rZx1dJIMbDeZDk3aibV1xj/LHTwfe4XbthK3cG2x7nSUx4FKwPjtIUUwfvK17pXWk/TMQWg5r6UiyvXtRatAIvPTIhcIphTszRSh4HWtblP2OV+WKLrRKh1098YVE05NtzEebZH5vAh0EemTsnNdwDsPKMIfNFEkrYEpJXBPemTe3u+4l29Q1kWvf0YlwTFuJGRZ/5fhR1WnMH1mFOTAc0jFJBhTcxhacOLpDb5l4WnYC7GM6CXfHY1sE2z/2qGxfz5MPVdtyoNGNu8rPuuDq7UfAK3VyUUSO0mp3gtlxG0Lc7eAbRr33ISryz3wnTy9qWYsr64WV9Df1X2GqQ4CMyisH3aECXAsTFZcDTZ594mAdBUt7V57TWl6dtiF/iUraePaBHUzUr6O13T5duKjz3pcU9POIjPqlARB6kAqJ2HrAydpckbF5cgugqMPu4JvY95AhJW27LuQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4090.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(7696005)(26005)(6506007)(6636002)(66446008)(53546011)(66556008)(83380400001)(66946007)(110136005)(76116006)(8676002)(66476007)(2906002)(8936002)(55016002)(33656002)(64756008)(186003)(5660300002)(478600001)(9686003)(71200400001)(107886003)(316002)(54906003)(52536014)(86362001)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?Q+EqTkFupfAFmAN/FD2fRfrSSVpv5T2vMaFGh8qMCMAV0rRH8XZyHXIOE/dW?= =?us-ascii?Q?g3lOCS3wIdVMiXFnbmlUOt8rX6c5MtTH5kUVn6FUirpsrTvFJi9Rv1cJPvqo?= =?us-ascii?Q?qqdyfuuLjvSKtzgtd/eenaQWS58APK5OtM6pa0W8w4t0FoEgJvXu2HdZhtTL?= =?us-ascii?Q?uS9glvIHSi1FbO07ErI0AfabrQc2/12IFuyQJA1wx3+DL4L90hAapRelLJop?= =?us-ascii?Q?r5GBooCL7+cVgWVh0hGyLrr6SKS/wCLTKzEt2ZqGqpxvxwu3s2PKHvRU32H7?= =?us-ascii?Q?81DnMyNMaM2kF1eRECfpxbu8i7mQaOloScnCO50EbNYBTYhaGNAS6+kB0okx?= =?us-ascii?Q?H8rHSgtIX2R0VgNcIdkj87n6FEUrQTmlxL6jrg2fQ+zBq2qQFYbpZAO8tbWh?= =?us-ascii?Q?U+VAt74q2yuKbLxGQYu3UfSqrj1dzA9ZxJdrQviZCgfyo3m5BjO6PubyfBoH?= =?us-ascii?Q?HEdNPfrqKqyohqsAFjE3g8rVZwaSgvHNBTmE3d3VGAlY3wTCiKzjSp3vlneQ?= =?us-ascii?Q?BqbzlQU5EXe07UPEdJsvwmhC07I1QLa7BkMjZHZdueGt2c+1PlLvBgUfmC7V?= =?us-ascii?Q?pxTGTaeKMYsXrmZssvHZvx+OiCHnmOX+ErxvwZDiW75vWN17zI9vyP6P7xoW?= =?us-ascii?Q?ASTLvB4XiAPghcMsZ1sgxQU6kXCQdo6FzWJHng0tSF/t2MmycftW53RrbhM+?= =?us-ascii?Q?XermoDzzryfm1Wh8frY+g+lyeJo21MkUFrGstj5TBvRG0J9y9mobUyhtYfJ0?= =?us-ascii?Q?N/yDNApV0R36SCJOKgwhY2EDuCbkOilp59lBJxMY9aa8TVbu/1sqPvyXuN9c?= =?us-ascii?Q?DnZZBIZyOHzSun6/0RTzyDRdyJ/nDQKVdn1FC3x5h/HHM1KV3S71tSuZ8JwY?= =?us-ascii?Q?JN8u+3lmArBuFTJeueqcPn4mBwZ0udLmv5ivQ0uF1gk5UZA4KKsi7iDya25g?= =?us-ascii?Q?Y13t78GMYL1LpHNJ3Qr0qOKjCsJErWEZH9qSciHYfG4uQiAgx4taVlQH0dF+?= =?us-ascii?Q?XjswQpzYiVxgn2d4XSV1FfOyuSUMAhblTqDdmHkDTd7Du0yrCLqN2ZserQyB?= =?us-ascii?Q?UD9z8ZY3B48nZ1aiIThjyiRoC3VezAxWPX1NxSZqdhEiY6K3Pa6e3fvw9Fir?= =?us-ascii?Q?vn5Ze2VUauf7OqQRJTDTnPNoYEfVNzqbW5qYlGC+WPOjStWwkPmoYjMV1pxb?= =?us-ascii?Q?KgTzvFWjESv6I0aQnCRVR4FmHQSYc3pzeKH0DKUHhZzFLuOY9avXhb1UXUEq?= =?us-ascii?Q?gYKzlmahuNxE7Tqh2VDque8ALMHonPu5TGQ1mHV4ResL3NUhMTzAOO/fzKVE?= =?us-ascii?Q?jpoLewsanE99zIXlu+7EaiAr?= 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: DM6PR12MB4090.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85a57a11-287b-46df-450e-08d8dd27e4ff X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 03:04:28.7068 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r5UfzMTmrVLrUmW2uU3aR+RKH9kFTxiCXBBSqluFWG1n6wbrKAONanpUcuzG4VuI X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1275 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614654279; bh=ys/j9eljtFHlGAic2YKButMIlX2YXjTyCqv0mdi7A5Y=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=I/f/cekJwPLp2EJE7rTURR0lkmW3M2DEOaNkOlVprSseEvJBnMhz76vLw12jvwyCH DNycoHEbT4usrcQJ3qF22U7S1FsmDrApXu/iUfTrsvpJlHPzsVJuNowPrnqKRmY2Af FYT2L7wZTMfSYe4wQiSQxhInv3x+Uf4VRlCU3DVB6HIHDLknJPuQCzVVpDwscYcI7C qTP4ka0r04KI4WuwVh23+8kkUs47M06hc3uHgRbqGPJ0x1Uzct58nXP6CIT/0WyMc1 /C7MTYsy+g6CDozPntb9gOSzrzkxqiTDBLxf/iPDYpV1FHbj04sCTdlN8OYVGowCAL fWVv/ulXKDvDA== Subject: Re: [dpdk-dev] [RFC v4 4/4] app/testpmd: add meter pps mode cmd 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 Xiao yun, Thanks for your comments. We will follow other commands in our new command's helper_str. Regards, Li Zhang > -----Original Message----- > From: dev On Behalf Of Li, Xiaoyun > Sent: Tuesday, March 2, 2021 9:48 AM > To: Li Zhang ; Dekel Peled ; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad > Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon ; > Raslan Darawsheh ; mb@smartsharesystems.com; > ajit.khaparde@broadcom.com > Subject: Re: [dpdk-dev] [RFC v4 4/4] app/testpmd: add meter pps mode cmd >=20 > Hi >=20 > > -----Original Message----- > > From: dev On Behalf Of Li Zhang > > Sent: Monday, March 1, 2021 18:36 > > To: dekelp@nvidia.com; orika@nvidia.com; viacheslavo@nvidia.com; > > matan@nvidia.com > > Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com; > > mb@smartsharesystems.com; ajit.khaparde@broadcom.com > > Subject: [dpdk-dev] [RFC v4 4/4] app/testpmd: add meter pps mode cmd > > > > Support meter pps mode > > > > Signed-off-by: Li Zhang > > --- > > app/test-pmd/cmdline.c | 4 + > > app/test-pmd/cmdline_mtr.c | 105 ++++++++++++++++++++ > > app/test-pmd/cmdline_mtr.h | 1 + > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 +++ > > 4 files changed, 125 insertions(+) > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > > d274a7cb8c..1a3fc644dc 100644 > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > @@ -698,6 +698,9 @@ static void cmd_help_long_parsed(void > *parsed_result, > > "add port meter profile trtcm_rfc4115 (port_id) > > (profile_id) (cir) (eir) (cbs) (ebs)\n" > > " meter profile add - trtcm rfc 4115\n\n" > > > > + "add port meter profile srtcmp (port_id) (profile_id) > > (cipr) (cpbs) (epbs)\n" > > + " meter profile add - srtcmp packet per second\n\n" > > + > > "del port meter profile (port_id) (profile_id)\n" > > " meter profile delete\n\n" > > > > @@ -17006,6 +17009,7 @@ cmdline_parse_ctx_t main_ctx[] =3D { > > (cmdline_parse_inst_t *)&cmd_show_port_meter_cap, > > (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcm, > > (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_trtcm, > > + (cmdline_parse_inst_t *)&cmd_add_port_meter_profile_srtcmp, > > (cmdline_parse_inst_t *)&cmd_del_port_meter_profile, > > (cmdline_parse_inst_t *)&cmd_create_port_meter, > > (cmdline_parse_inst_t *)&cmd_enable_port_meter, diff --git > > a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c index > > 399ee56e07..3f62240a0d 100644 > > --- a/app/test-pmd/cmdline_mtr.c > > +++ b/app/test-pmd/cmdline_mtr.c > > @@ -295,6 +295,8 @@ static void cmd_show_port_meter_cap_parsed(void > > *parsed_result, > > cap.meter_trtcm_rfc2698_n_max); > > printf("cap.meter_trtcm_rfc4115_n_max %" PRIu32 "\n", > > cap.meter_trtcm_rfc4115_n_max); > > + printf("cap.meter_srtcmp_n_max %" PRIu32 "\n", > > + cap.meter_srtcmp_n_max); > > printf("cap.meter_rate_max %" PRIu64 "\n", cap.meter_rate_max); > > printf("cap.color_aware_srtcm_rfc2697_supported %" PRId32 "\n", > > cap.color_aware_srtcm_rfc2697_supported); > > @@ -302,6 +304,8 @@ static void cmd_show_port_meter_cap_parsed(void > > *parsed_result, > > cap.color_aware_trtcm_rfc2698_supported); > > printf("cap.color_aware_trtcm_rfc4115_supported %" PRId32 "\n", > > cap.color_aware_trtcm_rfc4115_supported); > > + printf("cap.color_aware_srtcmp_supported %" PRId32 "\n", > > + cap.color_aware_srtcmp_supported); > > printf("cap.policer_action_recolor_supported %" PRId32 "\n", > > cap.policer_action_recolor_supported); > > printf("cap.policer_action_drop_supported %" PRId32 "\n", @@ - > 644,6 > > +648,107 @@ cmdline_parse_inst_t > > cmd_add_port_meter_profile_trtcm_rfc4115 =3D { > > }, > > }; > > > > +/* *** Add Port Meter Profile srtcmp *** */ struct > > +cmd_add_port_meter_profile_srtcmp_result { > > + cmdline_fixed_string_t add; > > + cmdline_fixed_string_t port; > > + cmdline_fixed_string_t meter; > > + cmdline_fixed_string_t profile; > > + cmdline_fixed_string_t srtcmp; > > + uint16_t port_id; > > + uint32_t profile_id; > > + uint64_t cir; > > + uint64_t cbs; > > + uint64_t ebs; > > +}; > > + > > +cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcmp_add > =3D > > + TOKEN_STRING_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, add, > "add"); > > +cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcmp_port > =3D > > + TOKEN_STRING_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + port, "port"); > > +cmdline_parse_token_string_t > cmd_add_port_meter_profile_srtcmp_meter =3D > > + TOKEN_STRING_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + meter, "meter"); > > +cmdline_parse_token_string_t > cmd_add_port_meter_profile_srtcmp_profile =3D > > + TOKEN_STRING_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + profile, "profile"); > > +cmdline_parse_token_string_t > cmd_add_port_meter_profile_srtcmp_srtcmp =3D > > + TOKEN_STRING_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + srtcmp, "srtcmp"); > > +cmdline_parse_token_num_t > cmd_add_port_meter_profile_srtcmp_port_id =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + port_id, RTE_UINT16); > > +cmdline_parse_token_num_t > > +cmd_add_port_meter_profile_srtcmp_profile_id > > =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + profile_id, RTE_UINT32); > > +cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcmp_cir =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + cir, RTE_UINT64); > > +cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcmp_cbs =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + cbs, RTE_UINT64); > > +cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcmp_ebs =3D > > + TOKEN_NUM_INITIALIZER( > > + struct cmd_add_port_meter_profile_srtcmp_result, > > + ebs, RTE_UINT64); > > + > > +static void cmd_add_port_meter_profile_srtcmp_parsed(void > *parsed_result, > > + __rte_unused struct cmdline *cl, > > + __rte_unused void *data) > > +{ > > + struct cmd_add_port_meter_profile_srtcmp_result *res =3D > parsed_result; > > + struct rte_mtr_meter_profile mp; > > + struct rte_mtr_error error; > > + uint32_t profile_id =3D res->profile_id; > > + uint16_t port_id =3D res->port_id; > > + int ret; > > + > > + if (port_id_is_invalid(port_id, ENABLED_WARN)) > > + return; > > + > > + /* Private shaper profile params */ > > + memset(&mp, 0, sizeof(struct rte_mtr_meter_profile)); > > + mp.alg =3D RTE_MTR_SRTCMP; > > + mp.srtcmp.cir =3D res->cir; > > + mp.srtcmp.cbs =3D res->cbs; > > + mp.srtcmp.ebs =3D res->ebs; > > + > > + ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error); > > + if (ret !=3D 0) { > > + print_err_msg(&error); > > + return; > > + } > > +} > > + > > +cmdline_parse_inst_t cmd_add_port_meter_profile_srtcmp =3D { > > + .f =3D cmd_add_port_meter_profile_srtcmp_parsed, > > + .data =3D NULL, > > + .help_str =3D "Add port meter profile srtcmp", >=20 > helper_str is the hint that users can follow to tap the command. Please f= ollow > other commands behavior. > You can refer to the recent commit > 618f0f4ac689f9255eecbef9202e77e35a9a7ceb which fixes all wrong helper_str > in meter commands. >=20 > > + .tokens =3D { > > + (void *)&cmd_add_port_meter_profile_srtcmp_add, > > + (void *)&cmd_add_port_meter_profile_srtcmp_port, > > + (void *)&cmd_add_port_meter_profile_srtcmp_meter, > > + (void *)&cmd_add_port_meter_profile_srtcmp_profile, > > + (void *)&cmd_add_port_meter_profile_srtcmp_srtcmp, > > + (void *)&cmd_add_port_meter_profile_srtcmp_port_id, > > + (void *)&cmd_add_port_meter_profile_srtcmp_profile_id, > > + (void *)&cmd_add_port_meter_profile_srtcmp_cir, > > + (void *)&cmd_add_port_meter_profile_srtcmp_cbs, > > + (void *)&cmd_add_port_meter_profile_srtcmp_ebs, > > + NULL, > > + }, > > +}; > > + > > /* *** Delete Port Meter Profile *** */ struct > > cmd_del_port_meter_profile_result { > > cmdline_fixed_string_t del; > > diff --git a/app/test-pmd/cmdline_mtr.h b/app/test-pmd/cmdline_mtr.h > > index > > e69d6da023..01ef85e1e7 100644 > > --- a/app/test-pmd/cmdline_mtr.h > > +++ b/app/test-pmd/cmdline_mtr.h > > @@ -10,6 +10,7 @@ extern cmdline_parse_inst_t > cmd_show_port_meter_cap; > > extern cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm; extern > > cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm; extern > > cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115; > > +extern cmdline_parse_inst_t cmd_add_port_meter_profile_srtcmp; > > extern cmdline_parse_inst_t cmd_del_port_meter_profile; extern > > cmdline_parse_inst_t cmd_create_port_meter; extern > > cmdline_parse_inst_t cmd_enable_port_meter; diff --git > > a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > index 37278d31d6..d11de05583 100644 > > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > @@ -2734,6 +2734,21 @@ where: > > * ``cbs``: Committed burst size (bytes). > > * ``ebs``: Excess burst size (bytes). > > > > +add port meter profile (srTcmp) > > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > + > > +Add meter profile (srTcmp) to the ethernet device:: > > + > > + testpmd> add port meter profile srtcmp (port_id) (profile_id) \ > > + (cir) (cbs) (ebs) > > + > > +where: > > + > > +* ``profile_id``: ID for the meter profile. > > +* ``cpr``: Committed Information Rate (CIR) (packets/second). > > +* ``cbs``: Committed Burst Size (CBS) (packets). > > +* ``ebs``: Excess Burst Size (EBS) (packets). > > + > > delete port meter profile > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > -- > > 2.21.0