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 351EDA0A0F; Wed, 7 Apr 2021 22:22:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CBD5140F81; Wed, 7 Apr 2021 22:22:04 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 76074140F7F for ; Wed, 7 Apr 2021 22:22:02 +0200 (CEST) IronPort-SDR: 8oezKSgv1NXUtKcr9EX/OgJSh3yyEmGCISgHhUFfq+cFbBZM1gEQCqAl4PAROlv5jYWCLwgfgt 28hCjT8OJJrA== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="190185690" X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="190185690" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 13:21:50 -0700 IronPort-SDR: 37KQtn4uUlPv/I3bF57X1hrlgLIlpbQr9WY3rs79L44Sp8kNR2xrmJzD85QAlcaSt7cFytJ/0F HH/eDqYAYnfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="418883957" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga007.jf.intel.com with ESMTP; 07 Apr 2021 13:21:50 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 7 Apr 2021 13:21:49 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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; Wed, 7 Apr 2021 13:21:49 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 7 Apr 2021 13:21:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gShicFUbWS489hjZeYNmmrkpJQD1FQjhmDHHIJgOKLnQZ54EqF5nScnkPIFqx50M0HwvoWJi2b6u+cj+wTy2IZ0ScTDbSNv+WIL4M4sObc+cqykAF0c5qI/PM8VGi0wzWz2CXIfTnDr6tShMRgealw+4ispNn8CjR6oBa6lrQfBKXbLtTG/bf083k086GEKFofgTG0XMYePsvkmBELTKoSwC/FJufKfFAQMijY5El0n1hfVsIvGqFC+zPrQIvPOIeYm1j4XFy4EWoTu3ce0LoIss6K6+dpdzHmrqC8lpHWV7X8u3IAEUxT0KhdbkuwFytmdVb8k40yGlpofuQKX0JQ== 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=wQZk+9FlFfeFqkiSbec35bztFVxmsE2vkbAfq0/ocTM=; b=D1yl4P/toF7EKpFSSUAf97KiVIIKGjq8/EO9+UHKc3O+fH+fK/fBTt5cx67dIo2p/JeIYMSoKvB/Yu5NtI19yV32v2Uq6c/+m/TS6T0ilUwzZjT/Zlip3r5ZGG8oNBDYDHWV8cQW6Bid5IcEbzLxPY17j+dyQWWKncqKWfUbRebPjxM47bshafpezRM6YDLB2qb3N/1HvFrul2t7m4UMs8gDkXaxBLYqsnOaKNETjBuiSoXOBlbA9eSiwuaeBENH65eXV1IxZyTCTs+dqs5KS2E4KoVzN1Zw8mg+V1KdHuN1fdg1w4NdWaI6snotN8p8ee3dgao46t/lKFyK0STOkw== 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=wQZk+9FlFfeFqkiSbec35bztFVxmsE2vkbAfq0/ocTM=; b=VaSQPJasiQWpB5jC0ZuBdbMlUvoSoXYp5OWIxlLHiog8FFrWODdIVRckMhT8scDyExvnAGyuJYg/f6nqU123NxSqhaKBG7ApQNQz1CISL8H2HACW+2jFhDTObj7G41CaiYBFM1zJcF1J8zKTLscYG67Y4VaspQ9ekTLSqw7Kzdg= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM5PR11MB1515.namprd11.prod.outlook.com (2603:10b6:4:11::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Wed, 7 Apr 2021 20:21:47 +0000 Received: from DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::b5d2:6f20:3c0:3627]) by DM6PR11MB2796.namprd11.prod.outlook.com ([fe80::b5d2:6f20:3c0:3627%7]) with mapi id 15.20.3999.032; Wed, 7 Apr 2021 20:21:47 +0000 From: "Dumitrescu, Cristian" To: Li Zhang , "dekelp@nvidia.com" , "orika@nvidia.com" , "viacheslavo@nvidia.com" , "matan@nvidia.com" , "shahafs@nvidia.com" , "Li, Xiaoyun" CC: "dev@dpdk.org" , "thomas@monjalon.net" , "rasland@nvidia.com" , "roniba@nvidia.com" Thread-Topic: [PATCH 2/2] app/testpmd: add meter profile packet mode option Thread-Index: AQHXJgt2FUUYxCi5+EyJMOLY5bJKJqqpiw2g Date: Wed, 7 Apr 2021 20:21:47 +0000 Message-ID: References: <20210331085405.1445546-1-lizh@nvidia.com> <20210331085405.1445546-3-lizh@nvidia.com> In-Reply-To: <20210331085405.1445546-3-lizh@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows 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: [109.79.23.215] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b64f1560-da81-42bc-8867-08d8fa02c531 x-ms-traffictypediagnostic: DM5PR11MB1515: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qnd3/qvHlSFLJ9oF1GUWyB1k+DbnLXrAxslUXFIwz0ZEXKv18kVCTJC/X2pn8vnIJR4nsvEWLC99WXNp5tMcDxYUB87XCboy9tFfk440yKwvMoqvIK4HZS6wiokGTJQUAqS72VknEOAUkPM8C7Bij5R6KqshJ7JZM/B0Or5eUiC1Z8J6osNpSfFEMwDzlhG59R7UxurM+bSn92d+LRlbaJiDd2y9Yf7X69yjTVSz0dF+GfC+aZ/H0PqlwU1jc/h0SvBDcm1Y64q1QKlR2c1vX1zmyLE1dAl5+VvGGPPpXQlPYxhUVN+qz6rnx7e07XSSICkhQlczYAYTWbunttqftYNtuVadV1ajPk+M1y3i798/kOyRr9cL1zXaq3viKQ6H5w3lIO661v6zf221YzfACj13LYkoXXmSP1+cLwHNu8oYteuYHZvUXNkagXaoE9kHBOAyJ71ifsfYBU6P83cm8MXJDcaLu+C5ThHbiY4OeY24gNWPtvKZwfamafm9YDchzwsxVP7jxJs6fLUFCXaN0ftEimhIw3zyQmSQOztXa23cekoNlcfRzIVD/uxtv0Y4yFSuqFsynqJlFUPDU+nP1DslkF/Wd77I9pZiDOZZtJsGzQNm6NvgYR86R1OD6flRHzfe148Z1gyBKfCSCbBYHCCO88fjg+cZAQmDcGGTOjI= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2796.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(346002)(396003)(39860400002)(376002)(52536014)(6506007)(33656002)(53546011)(76116006)(5660300002)(4326008)(66946007)(478600001)(186003)(7696005)(38100700001)(55016002)(8936002)(7416002)(86362001)(66556008)(8676002)(66476007)(66446008)(64756008)(30864003)(110136005)(26005)(316002)(71200400001)(2906002)(83380400001)(9686003)(54906003)(6636002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?1BygtVl59yZV1MdnRVC+pRHITceuimdSTO/m3lI0pCU21ShtCZO/eM9NCAU6?= =?us-ascii?Q?+4fyoXbDgW4f2aqGl5tSMiIhEy8wXHmavGG4vVeJLMopCo1G2FihzjU9FdCw?= =?us-ascii?Q?5q4a4adAuZbhCogfwMODfTpByzFS6fr35hV32lsqnLiAz3vH2jn1NhRluMjf?= =?us-ascii?Q?VtuKhRgRxEK9elowkf5MHBfrYp6MUhJ7YylqCjE3q61GiPti+BcnZZLAwU5H?= =?us-ascii?Q?TvJjbA1yNFkbNno0Xfp3Z3hq6lK8eKf5dIBAkjzcqM8DuF+phtULHHfQXnz4?= =?us-ascii?Q?GH1fO70nnuc5KFhseowf1IpRrsLAuO2I4d1jGoWzq9OqEn2uu8ZOin2U47Ej?= =?us-ascii?Q?u2p3JwzlVZAXG4KY/7t2cyWKq4l+mJIJZxG4pR1aMknKXErPmn3bJO+kqbhT?= =?us-ascii?Q?W8CYx3gW02Gq7hdUO8EzY6GQbwjVEhYgIC8q/h3lfcnHpTKsVooCObUtAgOU?= =?us-ascii?Q?VgL0m9MnDNPrFz9DsIwGHzFk8228tb15nNJyH1RRiMU9Wu9nSZsMo0qZonv5?= =?us-ascii?Q?V3pzAXISIKZINjHfBcGvFTkddznQgfEnIOSxvk1hl5EIbZE1Ei/NCwHut+0S?= =?us-ascii?Q?DQVTufw8CfGgR8WO8V6V6qTl0wjpsvp6fh0J91L0SUHjxnGgz9CscC7FqNE1?= =?us-ascii?Q?ZpFKl7izvMDj1XZBJdnnB3ZqQXZgLi3O01FHqFfo6MaNGW5t26ZCPstNuOd7?= =?us-ascii?Q?rigyY+gMjeu43g7OuItrUvUIL83+ppYhDp25HETTWRruYB9vf17zK/9Xdmbw?= =?us-ascii?Q?hg0jNuMy5JiSjI/94nSQw24Nh43DX7+OMve7guVI28C6qs9bVthyR6ar8YQa?= =?us-ascii?Q?P0+DBGTYNo//llPwFzUGbHdWA4ehhkJucw3xoWye9vDZeOp1RGjrHSdqaefz?= =?us-ascii?Q?w2aN6ZExwVZ1aaluAQo1ZPxBwUzf8ArsdAwtTh4BD64X+LsxOxElDk1bDge0?= =?us-ascii?Q?2RIW/TXtDBpvoeC+IthgEF/y3tzHk6g0SBTIvcJER2u73qrmR/hsurqBjWIk?= =?us-ascii?Q?xvhB2DjimCCpqWpchSZwmc50whYRbMyVl1zu3SWhIsoKdLDFmXVbW16dzFAb?= =?us-ascii?Q?iPaA06KCOvSnva/JR4Du4UuNvo94VEHfCZOyCeuV7vZLyMefexKwoYd+0oNq?= =?us-ascii?Q?5PcjdiG4ZzuusIlpFszHo3XUJ+Ap6TOj2oSN3R1n1QOICzRFuOiIk/AkKgQ9?= =?us-ascii?Q?he+bLjKimBUmjtKOwDIe8ItBsDewA9xAT7655huzdWJkiZKxT65YjvNe0L/S?= =?us-ascii?Q?LtieYq/hooVA4IYevxajiQ6LF0T1OBYZ6TzEfAkOk7Rm8gr4pMXzjS+4zAnV?= =?us-ascii?Q?4hEFlADnjSifzk/WZLgaHYSJ?= 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: DM6PR11MB2796.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b64f1560-da81-42bc-8867-08d8fa02c531 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 20:21:47.6922 (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: f6iPFN5SrRZGF7m1JXDDUYc9ox0ufXI+LX7GavEYZ2YhN8PNVmx9HKtGmxzTCSLhzzSQ12iqjceUQjZhPUeIzvGJlRpS0I9YjyVICuXLJm4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1515 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 2/2] app/testpmd: add meter profile packet mode option 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" > -----Original Message----- > From: Li Zhang > Sent: Wednesday, March 31, 2021 9:54 AM > To: dekelp@nvidia.com; orika@nvidia.com; viacheslavo@nvidia.com; > matan@nvidia.com; shahafs@nvidia.com; Dumitrescu, Cristian > ; Li, Xiaoyun > Cc: dev@dpdk.org; thomas@monjalon.net; rasland@nvidia.com; > roniba@nvidia.com > Subject: [PATCH 2/2] app/testpmd: add meter profile packet mode option >=20 > add meter profile packet_mode to the ethernet device. > One example: > add port meter profile rfc2697 (port_id) (profile_id) > (cir) (cbs) (ebs) (packet_mode) >=20 > Signed-off-by: Li Zhang > --- > app/test-pmd/cmdline_mtr.c | 40 +++++++++++++++++++-- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 31 ++++++++-------- > 2 files changed, 54 insertions(+), 17 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c > index bdc9ae8bfe..eff2473e7b 100644 > --- a/app/test-pmd/cmdline_mtr.c > +++ b/app/test-pmd/cmdline_mtr.c > @@ -263,6 +263,18 @@ 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.srtcm_rfc2697_byte_mode_supported %" PRId32 "\n", > + cap.srtcm_rfc2697_byte_mode_supported); > + printf("cap.srtcm_rfc2697_packet_mode_supported %" PRId32 "\n", > + cap.srtcm_rfc2697_packet_mode_supported); > + printf("cap.trtcm_rfc2698_byte_mode_supported %" PRId32 "\n", > + cap.trtcm_rfc2698_byte_mode_supported); > + printf("cap.trtcm_rfc2698_packet_mode_supported %" PRId32 "\n", > + cap.trtcm_rfc2698_packet_mode_supported); > + printf("cap.trtcm_rfc4115_byte_mode_supported %" PRId32 "\n", > + cap.trtcm_rfc4115_byte_mode_supported); > + printf("cap.trtcm_rfc4115_packet_mode_supported %" PRId32 "\n", > + cap.trtcm_rfc4115_packet_mode_supported); > printf("cap.stats_mask %" PRIx64 "\n", cap.stats_mask); > } >=20 > @@ -292,6 +304,7 @@ struct cmd_add_port_meter_profile_srtcm_result { > uint64_t cir; > uint64_t cbs; > uint64_t ebs; > + int packet_mode; > }; >=20 > cmdline_parse_token_string_t cmd_add_port_meter_profile_srtcm_add =3D > @@ -333,6 +346,10 @@ cmdline_parse_token_num_t > cmd_add_port_meter_profile_srtcm_ebs =3D > TOKEN_NUM_INITIALIZER( > struct cmd_add_port_meter_profile_srtcm_result, > ebs, RTE_UINT64); > +cmdline_parse_token_num_t > cmd_add_port_meter_profile_srtcm_packet_mode =3D > + TOKEN_NUM_INITIALIZER( > + struct cmd_add_port_meter_profile_srtcm_result, > + packet_mode, RTE_UINT32); >=20 > static void cmd_add_port_meter_profile_srtcm_parsed(void > *parsed_result, > __rte_unused struct cmdline *cl, > @@ -354,6 +371,7 @@ static void > cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result, > mp.srtcm_rfc2697.cir =3D res->cir; > mp.srtcm_rfc2697.cbs =3D res->cbs; > mp.srtcm_rfc2697.ebs =3D res->ebs; > + mp.packet_mode =3D res->packet_mode; >=20 > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error); > if (ret !=3D 0) { > @@ -365,7 +383,7 @@ static void > cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result, > cmdline_parse_inst_t cmd_add_port_meter_profile_srtcm =3D { > .f =3D cmd_add_port_meter_profile_srtcm_parsed, > .data =3D NULL, > - .help_str =3D "add port meter profile srtcm_rfc2697 > ", > + .help_str =3D "add port meter profile srtcm_rfc2697 > ", > .tokens =3D { > (void *)&cmd_add_port_meter_profile_srtcm_add, > (void *)&cmd_add_port_meter_profile_srtcm_port, > @@ -377,6 +395,7 @@ cmdline_parse_inst_t > cmd_add_port_meter_profile_srtcm =3D { > (void *)&cmd_add_port_meter_profile_srtcm_cir, > (void *)&cmd_add_port_meter_profile_srtcm_cbs, > (void *)&cmd_add_port_meter_profile_srtcm_ebs, > + (void > *)&cmd_add_port_meter_profile_srtcm_packet_mode, > NULL, > }, > }; > @@ -394,6 +413,7 @@ struct cmd_add_port_meter_profile_trtcm_result { > uint64_t pir; > uint64_t cbs; > uint64_t pbs; > + int packet_mode; > }; >=20 > cmdline_parse_token_string_t cmd_add_port_meter_profile_trtcm_add =3D > @@ -439,6 +459,10 @@ cmdline_parse_token_num_t > cmd_add_port_meter_profile_trtcm_pbs =3D > TOKEN_NUM_INITIALIZER( > struct cmd_add_port_meter_profile_trtcm_result, > pbs, RTE_UINT64); > +cmdline_parse_token_num_t > cmd_add_port_meter_profile_trtcm_packet_mode =3D > + TOKEN_NUM_INITIALIZER( > + struct cmd_add_port_meter_profile_trtcm_result, > + packet_mode, RTE_UINT32); >=20 > static void cmd_add_port_meter_profile_trtcm_parsed(void > *parsed_result, > __rte_unused struct cmdline *cl, > @@ -461,6 +485,7 @@ static void > cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result, > mp.trtcm_rfc2698.pir =3D res->pir; > mp.trtcm_rfc2698.cbs =3D res->cbs; > mp.trtcm_rfc2698.pbs =3D res->pbs; > + mp.packet_mode =3D res->packet_mode; >=20 > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error); > if (ret !=3D 0) { > @@ -472,7 +497,7 @@ static void > cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result, > cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm =3D { > .f =3D cmd_add_port_meter_profile_trtcm_parsed, > .data =3D NULL, > - .help_str =3D "add port meter profile trtcm_rfc2698 > ", > + .help_str =3D "add port meter profile trtcm_rfc2698 > ", > .tokens =3D { > (void *)&cmd_add_port_meter_profile_trtcm_add, > (void *)&cmd_add_port_meter_profile_trtcm_port, > @@ -485,6 +510,7 @@ cmdline_parse_inst_t > cmd_add_port_meter_profile_trtcm =3D { > (void *)&cmd_add_port_meter_profile_trtcm_pir, > (void *)&cmd_add_port_meter_profile_trtcm_cbs, > (void *)&cmd_add_port_meter_profile_trtcm_pbs, > + (void > *)&cmd_add_port_meter_profile_trtcm_packet_mode, > NULL, > }, > }; > @@ -502,6 +528,7 @@ struct > cmd_add_port_meter_profile_trtcm_rfc4115_result { > uint64_t eir; > uint64_t cbs; > uint64_t ebs; > + int packet_mode; > }; >=20 > cmdline_parse_token_string_t > cmd_add_port_meter_profile_trtcm_rfc4115_add =3D > @@ -549,6 +576,11 @@ cmdline_parse_token_num_t > cmd_add_port_meter_profile_trtcm_rfc4115_ebs =3D > TOKEN_NUM_INITIALIZER( > struct cmd_add_port_meter_profile_trtcm_rfc4115_result, > ebs, RTE_UINT64); > +cmdline_parse_token_num_t > + cmd_add_port_meter_profile_trtcm_rfc4115_packet_mode =3D > + TOKEN_NUM_INITIALIZER( > + struct cmd_add_port_meter_profile_trtcm_rfc4115_result, > + packet_mode, RTE_UINT32); >=20 > static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed( > void *parsed_result, > @@ -573,6 +605,7 @@ static void > cmd_add_port_meter_profile_trtcm_rfc4115_parsed( > mp.trtcm_rfc4115.eir =3D res->eir; > mp.trtcm_rfc4115.cbs =3D res->cbs; > mp.trtcm_rfc4115.ebs =3D res->ebs; > + mp.packet_mode =3D res->packet_mode; >=20 > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &error); > if (ret !=3D 0) { > @@ -584,7 +617,7 @@ static void > cmd_add_port_meter_profile_trtcm_rfc4115_parsed( > cmdline_parse_inst_t cmd_add_port_meter_profile_trtcm_rfc4115 =3D { > .f =3D cmd_add_port_meter_profile_trtcm_rfc4115_parsed, > .data =3D NULL, > - .help_str =3D "add port meter profile trtcm_rfc4115 > ", > + .help_str =3D "add port meter profile trtcm_rfc4115 > ", > .tokens =3D { > (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_add, > (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_port, > @@ -597,6 +630,7 @@ cmdline_parse_inst_t > cmd_add_port_meter_profile_trtcm_rfc4115 =3D { > (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_eir, > (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_cbs, > (void *)&cmd_add_port_meter_profile_trtcm_rfc4115_ebs, > + (void > *)&cmd_add_port_meter_profile_trtcm_rfc4115_packet_mode, > NULL, > }, > }; > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index f59eb8a27d..b5e52f6b1c 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -2698,14 +2698,15 @@ add port meter profile (srTCM rfc2967) > Add meter profile (srTCM rfc2697) to the ethernet device:: >=20 > testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id) = \ > - (cir) (cbs) (ebs) > + (cir) (cbs) (ebs) (packet_mode) >=20 > where: >=20 > * ``profile_id``: ID for the meter profile. > -* ``cir``: Committed Information Rate (CIR) (bytes/second). > -* ``cbs``: Committed Burst Size (CBS) (bytes). > -* ``ebs``: Excess Burst Size (EBS) (bytes). > +* ``cir``: Committed Information Rate (CIR) (bytes per second or packets= per > second). > +* ``cbs``: Committed Burst Size (CBS) (bytes or packets). > +* ``ebs``: Excess Burst Size (EBS) (bytes or packets). > +* ``packet_mode``: Packets mode for meter profile. >=20 > add port meter profile (trTCM rfc2968) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > @@ -2713,15 +2714,16 @@ add port meter profile (trTCM rfc2968) > Add meter profile (srTCM rfc2698) to the ethernet device:: >=20 > testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id) = \ > - (cir) (pir) (cbs) (pbs) > + (cir) (pir) (cbs) (pbs) (packet_mode) >=20 > where: >=20 > * ``profile_id``: ID for the meter profile. > -* ``cir``: Committed information rate (bytes/second). > -* ``pir``: Peak information rate (bytes/second). > -* ``cbs``: Committed burst size (bytes). > -* ``pbs``: Peak burst size (bytes). > +* ``cir``: Committed information rate (bytes per second or packets per > second). > +* ``pir``: Peak information rate (bytes per second or packets per second= ). > +* ``cbs``: Committed burst size (bytes or packets). > +* ``pbs``: Peak burst size (bytes or packets). > +* ``packet_mode``: Packets mode for meter profile. >=20 > add port meter profile (trTCM rfc4115) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > @@ -2729,15 +2731,16 @@ add port meter profile (trTCM rfc4115) > Add meter profile (trTCM rfc4115) to the ethernet device:: >=20 > testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id) = \ > - (cir) (eir) (cbs) (ebs) > + (cir) (eir) (cbs) (ebs) (packet_mode) >=20 > where: >=20 > * ``profile_id``: ID for the meter profile. > -* ``cir``: Committed information rate (bytes/second). > -* ``eir``: Excess information rate (bytes/second). > -* ``cbs``: Committed burst size (bytes). > -* ``ebs``: Excess burst size (bytes). > +* ``cir``: Committed information rate (bytes per second or packets per > second). > +* ``eir``: Excess information rate (bytes per second or packets per seco= nd). > +* ``cbs``: Committed burst size (bytes or packets). > +* ``ebs``: Excess burst size (bytes or packets). > +* ``packet_mode``: Packets mode for meter profile. >=20 > delete port meter profile > ~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > 2.27.0 This patch should also be part of the unified V2, thanks!