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 183FDA054F; Tue, 2 Mar 2021 02:48:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED3A34014E; Tue, 2 Mar 2021 02:48:07 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 112CE40142 for ; Tue, 2 Mar 2021 02:48:05 +0100 (CET) IronPort-SDR: Tf7CDk+HLKrVzNGuPS6ctQapgNAM4NbOTRV0rhQESjHgSdKWhl/YEEDlmPeVyeWEVlAOneT7ro Q4tqy72JBPyA== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="184217192" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="184217192" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 17:48:05 -0800 IronPort-SDR: TdYhLsIcWjYCwWuJh0nFBiCUFwlAFletStULJO3e2IAi+WTvgpUeQlGhsOmtyZzR9toZItVG4Q pQjyBW1gu9hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="368794821" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2021 17:48:04 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 1 Mar 2021 17:48:04 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 1 Mar 2021 17:48:04 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 1 Mar 2021 17:48:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8BX5BQt+8h2lyxeYXrl5ILyCl/xs2JG0R672fzjSw1JaktzcnHmxO6aRT2NlbLGAwpd7gUNdlDDXn9t2T+alCAjE8IQtPskHEjygO2EBBIEY1wlcR7yh5jBWTQk5VUX7I3gKpJMa5weG/qQ3B7jY1Qo0L+i/XeL3wQHdNZ5wJV1n/x06q1dbRAWyjbqEHjUE1X1KWj/sRt19fYbDpo+WD7JLkuHK071geWi/tbp1v5zm2pHY+Id2ce11OV0jMEdspBl/lk7YT5372h5UI+AlTrbhYz0O2kJCWRPNxJqNDl71t6Ht7aqU0bJHAe133zMxJYRi8umBUzAe5RTnibyhQ== 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=ghpjCXi+13DJ9v+4fnMbW19WnSGBwZiPvQcMdJ+PBkU=; b=W7Fq62S7IRavIrsDKUDUr99vtLGeuW86kHCnp6WDE3Ogv/HXMKWoSt2EwkVvH9LfsMkabH3/NPgw0QQ0ElvtOMXw1TAhHbrcstUffK4edE9PG6KEKWybtf9CerPNvqq0SKrrD51zINlMh4FUSIFSIleMSEH59xuHZf/5ivRemUasKN+C9V46cNzgNuWN2k7ypQ59acYEycc+oerzaxMem6r+TH03gfaMJVB2xFewytI18R++kSenoFKvSqTvXZpWCUS85aOfMOXvZ51TL21eKqXxmD16fL/4JYEqsSv0q4a2DXyYExUiW5iHy0A7/8Bq3fNKzTRCCMNbdCbR1tdNPA== 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=ghpjCXi+13DJ9v+4fnMbW19WnSGBwZiPvQcMdJ+PBkU=; b=ZPL25GkiPLRuLI0DYnA5DMGn3f78sWg0IJ2+NiseJni0MJnlQWKlEJS9PhcqDWbgS24QHWm04Sj2Fa6GJXRh66lN8htlWZqxFkcAK07HKenNbzB2HSauaey+CKca5bG8tM5oQWvxnB/UcjxNczuOikhz7oz1LUvkUBk2h4FdZL4= Received: from CY4PR11MB1750.namprd11.prod.outlook.com (2603:10b6:903:126::8) by CY4PR11MB1414.namprd11.prod.outlook.com (2603:10b6:903:23::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Tue, 2 Mar 2021 01:48:02 +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.3890.028; Tue, 2 Mar 2021 01:48:02 +0000 From: "Li, Xiaoyun" To: Li Zhang , "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" Thread-Topic: [dpdk-dev] [RFC v4 4/4] app/testpmd: add meter pps mode cmd Thread-Index: AQHXDoa/xWnCtGi6nEu0e/qz8Lhcw6pv7aDA Date: Tue, 2 Mar 2021 01:48:02 +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: <20210301103532.184983-5-lizh@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.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: a7bb418a-d8ef-47a9-5d42-08d8dd1d373c x-ms-traffictypediagnostic: CY4PR11MB1414: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:901; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Xw1YuXLFIbcGY6FTBoYnr6vS3xaHxioeunuQLKiNejJI2aOG7N3hK0q0Je6EjOnY0HSB4xsx8bv6Q4W8TSe4thi5WcNCKiwItSfN13HnymVDy1JzFs6k9cU9U9AN3XzNpDJ1sa3y0s0koXjyey0FxXxWjfivy/XzKYA5g+Fk7ZHA3NYGT5sSw02jzYoxgkFgGCnfViwgCpwM/ETglZrTTcAGB9AbRbJVpEWdtXAKGff61sias4lSGyjcQPOK2mS8gQ9ezOR8BP8Ca6M6w099vNnCMtyyMjgqMb1nlSUIGrKxbtlonLB30MgAyqYTwyIsVv3ZHuoOy0CR2cnV/+/XftqQ+OiKxzjxUZMrrEJHebZy+bURJS5L242Rm1K9nFQIL+NzzmlQNIs6HnexZlsrLCfekuGpJzjpl2POqQ53XwbzwEFodKH3qUO9fP6VtNDYUq+y6CBPdiQPdKHZtom1uWXOfLlC1N0oBnREwzjL1UQR916HunYTNUCAc1dDTZF5XL74amoirMYW3XhtnKJVjQ== 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:(376002)(396003)(346002)(136003)(39860400002)(366004)(66476007)(71200400001)(66946007)(83380400001)(86362001)(9686003)(52536014)(76116006)(5660300002)(4326008)(66446008)(64756008)(55016002)(2906002)(478600001)(66556008)(33656002)(316002)(26005)(53546011)(8676002)(110136005)(8936002)(6506007)(186003)(54906003)(7416002)(7696005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?n6/4tLY5xMlCY2pUaDHaLeEM5Cab3Rv0JkLJCiHtbaLTWubYjD/ElYBe/tOf?= =?us-ascii?Q?bJ2ujf53HDt1ilAYf0pMylokRCpNDJhXp31o9LPBhBBb60Qf/IekCdwHbjPJ?= =?us-ascii?Q?glDO7ktQFmf2f/3r2oWjHuQLA8x2GtQyXUbhIu22KfDfPvpGReRJi6sb7EaZ?= =?us-ascii?Q?clfohbPRjagLrWPvnK95kAKQniNfZQyHVSgTOjTsmnRXzbiGcIlkMIchYNKR?= =?us-ascii?Q?UeABkjsl0JQAZ4SmgvPrqeUEGdMgccONWIPfbU1STieYNvW8+qnesx9MZVwe?= =?us-ascii?Q?9xm/tS7I1NVyUR16nwd7GehaHRjIuD6+k0kPnPvLEK/+7ZyicwuURakE3Yiw?= =?us-ascii?Q?EtgzEy+GI6vHti73lZfLHx8xu8bd9+EdXMwV675+EvceG2cGat5oIPmE+8NB?= =?us-ascii?Q?wJQKry+v7YIwne59ihZQjvCS6Zl+3EA6f5RhAAJjA42hS4HmcuhoVt82YyQR?= =?us-ascii?Q?WA+YZshwC2XYKqZUDRFKaQcc9HCZ9OpOVotvX9HuygaeIn9T4t3sa1qkH1WH?= =?us-ascii?Q?Em+3APkpedtq2uEuOhmRNFWfZCEEr5/iFO1+R226ACGHthhQ9aDPCy5u8dWn?= =?us-ascii?Q?NzzE+8KTERprAwKbxZin2saQk3lNOqs4YTH8l06/oibEBlmtYb3YjrBtFIDS?= =?us-ascii?Q?k0nmPpbg20kF8RZlTfttjjlwz5htFvjZBTUiuutuQvJoNFYRN3zkEqwig+gV?= =?us-ascii?Q?MA5rk8Hrp8lB78kxie1Pori4JgEdcdvTHpmn4lSujOKdMckxxf66Yl5qIIcK?= =?us-ascii?Q?dtTprkKOuRxwCG6ISQsQon+jwBBNTPfw1wq+29XcM44gIvEVli1zfgzT6EE+?= =?us-ascii?Q?U9yFBlQ/iSL7YADBMoV1EcEkYuaxxH7XjdmNMHlZ6Mmq/Nu9QPqM2k3E+Jb7?= =?us-ascii?Q?bMh25OwtsngcPTwXuSbcPnxQg0pFg2SqUNmFB1fYgM0cFQlUF/IBvtuB1Q4x?= =?us-ascii?Q?MMaIg3ppG6SJQq0y+VRa/lGiTr6LyjD9vIXOWB9e9dc+QpmoF0XJLCmSii9C?= =?us-ascii?Q?xx5smaGZpaJPfxWeGZ/AnR0vjtoufvbvz15SXrVKetDsINoSjZM56eVHU6Wo?= =?us-ascii?Q?tNBPj3Aqs27mPK0jcG4o7nWfMTdNR/DLnJm9cfgscLI+svy2Sd/fcYjO8GRR?= =?us-ascii?Q?Z3MpZLQUAWLH390BbjHEyKnd3zQz9PEmVdkjaTjSmndVwN1KqbpEhJoUr3eu?= =?us-ascii?Q?dpPztlYNvYYIxma49mvdY5KTln2xr76edEDm10W8RfbQc+ELqk5eoxo0ox93?= =?us-ascii?Q?6jTXg2Ag8EklJhCMYPSNXd7NYL0taboX2DysDGOC4JsgEfdmJVWqrkqTk28y?= =?us-ascii?Q?LP6OwWn81WmEyBjuV5dDJsuL?= x-ms-exchange-transport-forked: True 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: a7bb418a-d8ef-47a9-5d42-08d8dd1d373c X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 01:48:02.1469 (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: E+3j4VKA5EjROoSesNtfRsSNpivtWK1EDFJu2bxVZqF7RmEH5nB7EiSNuDip5dBNkOh8VdyB7t+wXfVxcsO3UQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1414 X-OriginatorOrg: intel.com 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 > -----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 >=20 > Support meter pps mode >=20 > 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(+) >=20 > 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" >=20 > + "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" >=20 > @@ -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 { > }, > }; >=20 > +/* *** 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", helper_str is the hint that users can follow to tap the command. Please fol= low other commands behavior. You can refer to the recent commit 618f0f4ac689f9255eecbef9202e77e35a9a7ceb= which fixes all wrong helper_str in meter commands. > + .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 inde= x > 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). >=20 > +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 > ~~~~~~~~~~~~~~~~~~~~~~~~~ >=20 > -- > 2.21.0