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 69C8DA0579; Thu, 8 Apr 2021 04:34:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 082E340698; Thu, 8 Apr 2021 04:34:13 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2055.outbound.protection.outlook.com [40.107.236.55]) by mails.dpdk.org (Postfix) with ESMTP id B085B40138 for ; Thu, 8 Apr 2021 04:34:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UfYWd3wmT5hEp6LvUuEmthExeRER4EF9AUodKwm94SJxqEXLqbgWtFAOLdtbqgNspeGtMu0wVWrXkwWTit6+YG+fBeYEChzeOAjAujyTKbqZpM/R9wbwINhkeMACgYU8CP88xTC+B3Oi/OuNepXXbO7suzhaD6ebYp2o2bo/PV62aPEjKp0Rq6KnJY9FhX9GjzKKC6n3+Fc2AbmxoytPSuHnSOaxMLx/Gw4lQl8GtwT7EulzcaMa5wJ0kpJMA2cQybKRzstd+CbZckZcf9matSvkez3/UAcTTtfU9aNbH6JONDI1Qfd5F6Uh7wqWZrOnuFbDAGg/vQa7mAfpN1jHqg== 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=janr4Eg70oSES94ONEZACUU8KKARUU3CP+hGMOYJp0s=; b=Zm7dZZX8k8MTuv9MxBpaWes2J87FWPfHvgD6AkaFaASeQ/W0nzPTjnesa1de+ZFfUdq95/9woySnoPl64pQVXz8ToT0+nK3JbQtw3iMzwK+1cIU+nxWa8I2a3f1cMHpjSWSX1ICehU8VTyEZiOwMNILm+P4KLF7zTs12J5PWAuPoCBvdQw/8HsZuIxpAvz0nQJWyFaFJPqpEAmc/oxzeDLy0+P7g65xNCxqRe/rCj5kmPBa/JYNaVR8BNlniFrpnuiEroOBU9kx5JFiUIpAxF6lwVC4481WtmFbchAo/hSBcka7GWnOOSK20mP2FB73QHVcLU4U0KDtiDxwFzbXhTQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=janr4Eg70oSES94ONEZACUU8KKARUU3CP+hGMOYJp0s=; b=RWzsVRdbpmnI+AK/invsKvw3OeeKCy0k+w6GMB7h/dlKWxNdOJRm/t7Ksa3pLeqYcHfYHGncuoayEthHNPN+Pp4JjWwPXbtGLa8n6ra0ODrsdJSw5vs3jhkcyaDxFPC2Sk9afA+qwFH8LQCOuDGU6kMiZHwX2giHC5XksruvSbGcLnVmMwSeiJd/s/RJfE+e/vWkjoFkTq0VcikXEGghasu2F8wEqwR+4vE6R4AON6M3HL6CpTPn4h1+7YVCAqAYIvO8yoS07dFOvWClw8guxVrrtWPUiUfTkRO7B9fFCRNVRAkhj2ui+lo0jiXEjIvbI+QiKNv13hG+iVaKHxC/Tw== 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.4020.16; Thu, 8 Apr 2021 02:34:10 +0000 Received: from DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::fd19:da7e:347b:87da]) by DM6PR12MB4090.namprd12.prod.outlook.com ([fe80::fd19:da7e:347b:87da%4]) with mapi id 15.20.3999.034; Thu, 8 Apr 2021 02:34:10 +0000 From: Li Zhang To: "Dumitrescu, Cristian" , "dekelp@nvidia.com" , Ori Kam , Slava Ovsiienko , Matan Azrad , Shahaf Shuler , "Li, Xiaoyun" CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , Raslan Darawsheh , Roni Bar Yanai Thread-Topic: [PATCH 2/2] app/testpmd: add meter profile packet mode option Thread-Index: AQHXK+sN6hemxUm6TEGljRaaGp2yyaqp5waQ Date: Thu, 8 Apr 2021 02:34:09 +0000 Message-ID: References: <20210331085405.1445546-1-lizh@nvidia.com> <20210331085405.1445546-3-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: [139.227.253.12] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d0479ea2-315a-4725-5f34-08d8fa36ca34 x-ms-traffictypediagnostic: DM5PR12MB1275: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YIXfj+7bDZiMr5kITgqgtfDxwJ6u1sPaVY3w0GUhaQJUlWlC3DZO8hholoAaepowIYi4iaZ0gJchWG+BODusH2J386rxl6cI3XyUGWGXK90+zHUyULhlJ3CN0SvTbqiKmzJAyW2E7dCucncNfUqei1REOEXj56tHtWFFHDIygM70JJ7s4ru/4zdOyB0Yp0+VszC/43DNh6sUDdNHqlNkCMrUKZiwo+l0gXwlC0ZtGj+oQN4O7PUZpEKqSXVzYXh3Zw7JMyhY2haBlsqsCZOMKPFhSoN/NiiWUczcDBRhwwAiuY1ou2SHDwIYUs59B0z2m8Ex9tgv36fUo3v44ysqw93IaCzpU9xUD/LgCnmTCDpjZZG1NbGRqBHIzKe2IcwRJCovG0K0KPquRVhohlLyw1y3YiFQXPefCs31wWuSxdoalHg2YmP9oQfrFYSSMXtU9QZH5JUdJezWlIGa+OQBmkuHnJMYRZ0A/qHhcZ8ZuIbl/doxZTdsAt/hxDSwM9s+G3UR7xQs0zSnZsA7rjjAoHztvsPeKN2TTLUjs2fnbfSa9COgyaEscl2n56sLen6c7aHTAbKkeOA65943fIcXIJ202CHtvjfM12krjYENt1mR73xCusfrWFqK/Rfv5K5vcnSUO+WNtbajGWiMtpUDPqmA99c4zr9v7e/yp5+gO1Y= 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)(366004)(136003)(376002)(346002)(396003)(39860400002)(86362001)(30864003)(478600001)(7696005)(8936002)(4326008)(6506007)(52536014)(53546011)(107886003)(186003)(66946007)(5660300002)(8676002)(64756008)(38100700001)(66476007)(66556008)(316002)(9686003)(54906003)(71200400001)(26005)(2906002)(76116006)(33656002)(55016002)(66446008)(110136005)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?sfrz16lauFyEtoMICFQlTSPvE/swUd45W3bN6bjBZqKJnr5X7e86I1W2hkSD?= =?us-ascii?Q?tUhV9haELJ4xyKjKCA0TVnyCby3MOzn9ydjU7L5v7BSLcbUgD7enJv3WRtVq?= =?us-ascii?Q?28eYHeXz/QJmgG1Tt/XEKswKo6LSAC7oxQwG1BuCmWqxuOXKyPdPZu7zCxsP?= =?us-ascii?Q?lJa2LyEUQyPZEO7cK5sbANdc/3RP7tai4a9LU4awjhSiUDPhsk8+HCeIQ2Vb?= =?us-ascii?Q?o/VKBL93o3WPzMUG+dbWGSbb/o01g9lc+65wzYkfYpjXrJy9vnaXkghvuZSx?= =?us-ascii?Q?fGNUWGNamSX4AyEq5RH0EWCg3bOTQARsYRNrYfzKB9XmtEyfack3WIqK5xy+?= =?us-ascii?Q?lBUh5wSWj6i1EuVU/lXxk5HOb+lnvLbA3+RKNcU0hIL9TXA8vSX0ajE2w/3z?= =?us-ascii?Q?RkPBMAIs8UcEbKH68dJsPqfiQDsBwfVwVtmeCpVTdS+3EUJZY2TtOrE5a1np?= =?us-ascii?Q?IXtGXvH5s65fXSyieGneUm29uFeDQMKo93NA9b2nslC5OiRyy1LhGIdcbjW5?= =?us-ascii?Q?3WCbEZD2FE0TC9/Y3ck8IXw1Cv42GZue/od1/IcI4zvtyETq4hSBWS3IV7+B?= =?us-ascii?Q?HH1KtiqoPHz8mXmNly57Bns2nACZCLxIaLTMOlyIuxwvSWo00O7YkdIUsLMm?= =?us-ascii?Q?xtZt/L8V+PkkBU5B1c518I+KqButhw0wUUYgMSl6EBfCZjl2JZxRdfpxoMwF?= =?us-ascii?Q?NFW4MGZMA9dG2ZuPWsXbcdZqQ28KG9HKbHxPHhhpvJStakmC0HXb6+V5N/H8?= =?us-ascii?Q?lWZ5qTMZRSmdo/ilqRCeSid3aPn0ZI96V747xjYZLYkr+Z81ZmicWcaHiA9C?= =?us-ascii?Q?xQhxnThR+2BL90sL0xuNtCebhZAaAI79TsmmUcExYEBT2oGmHdyx4jC2vWPt?= =?us-ascii?Q?/K9DYGD/1Gp/y0ZJmzsuwomGs+w/KEqlSD9736/kmybVRCGUnd7qPd48CCIZ?= =?us-ascii?Q?h8cl7tXRhRM297KygzT7MdboGfPTVICRYTDUCvlxY2HhnblMYXbTVWbTJv1e?= =?us-ascii?Q?sE991YMlPvU7ncqXmgwmbiAC6VU+Ya/cBQN8gcql/Wcmvu1uZ1zUw+kTosSI?= =?us-ascii?Q?mFskIDwTC7kLNZ6v9COE378gmXWfWzdG+ymAezZIP6WKU6oSMYnwB99zUEJr?= =?us-ascii?Q?iKzy8KFM1r8+npFZRisH1bfPGkVJoi5lss/ptCX4Q3Hb2DLed1wLxchJlhbg?= =?us-ascii?Q?qGJ98NeTEH1EbE3girGLAXfBQPLZS2247aI23YHdHVoT5V6cPxiRgAaAVVjw?= =?us-ascii?Q?Os8IagbvYDSoxPMHrgxmamenwbZ7Sk0qSVv3MgYM1/jqfGHiThJSUhwlDkIA?= =?us-ascii?Q?oaMv9kPR/IZkz+jgf0uQ1GUT?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4090.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0479ea2-315a-4725-5f34-08d8fa36ca34 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 02:34:09.8362 (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: qEk1BxB0fm1Z6AekNJ0fUe0pUGJT26xQduEN/Xk3oksbx11STUq8wXSs+CNf6bjZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1275 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" Hi Cristian > -----Original Message----- > From: Dumitrescu, Cristian > Sent: Thursday, April 8, 2021 4:18 AM > To: Li Zhang ; dekelp@nvidia.com; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad ; Shahaf Shuler ; Li, > Xiaoyun > Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon ; > Raslan Darawsheh ; Roni Bar Yanai > > Subject: RE: [PATCH 2/2] app/testpmd: add meter profile packet mode optio= n >=20 > External email: Use caution opening links or attachments >=20 >=20 > > -----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 > > > > 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) > > > > 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(-) > > > > 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); } > > > > @@ -292,6 +304,7 @@ struct cmd_add_port_meter_profile_srtcm_result { > > uint64_t cir; > > uint64_t cbs; > > uint64_t ebs; > > + int packet_mode; > > }; > > > > 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); > > > > 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; > > > > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &erro= r); > > 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; > > }; > > > > 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); > > > > 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; > > > > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &erro= r); > > 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; > > }; > > > > 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); > > > > 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; > > > > ret =3D rte_mtr_meter_profile_add(port_id, profile_id, &mp, &erro= r); > > 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:: > > > > testpmd> add port meter profile srtcm_rfc2697 (port_id) (profile_id= ) \ > > - (cir) (cbs) (ebs) > > + (cir) (cbs) (ebs) (packet_mode) > > > > where: > > > > * ``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. > > > > 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:: > > > > testpmd> add port meter profile trtcm_rfc2698 (port_id) (profile_id= ) \ > > - (cir) (pir) (cbs) (pbs) > > + (cir) (pir) (cbs) (pbs) (packet_mode) > > > > where: > > > > * ``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 seco= nd). > > +* ``cbs``: Committed burst size (bytes or packets). > > +* ``pbs``: Peak burst size (bytes or packets). > > +* ``packet_mode``: Packets mode for meter profile. > > > > 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:: > > > > testpmd> add port meter profile trtcm_rfc4115 (port_id) (profile_id= ) \ > > - (cir) (eir) (cbs) (ebs) > > + (cir) (eir) (cbs) (ebs) (packet_mode) > > > > where: > > > > * ``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 se= cond). > > +* ``cbs``: Committed burst size (bytes or packets). > > +* ``ebs``: Excess burst size (bytes or packets). > > +* ``packet_mode``: Packets mode for meter profile. > > > > delete port meter profile > > ~~~~~~~~~~~~~~~~~~~~~~~~~ > > -- > > 2.27.0 >=20 > There is already a patch from this series numbered PATCH 2/2. Does this > belong to the same series? >=20 > It is not easy to review this set of patches related to the packet mode a= ddition > to the API, as it is split across multiple patch series and the numbering= is > confusing. I am not sure I am replying to the latest version or a superse= ded one. >=20 > Could you please create a unified V2 that contains both the series with t= he API > changes and the series with the necessary error checks in the drivers? Sure, will send V2 patch include the API and necessary error checks. Regards, Li Zhang