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 0D68CA0A0F; Wed, 7 Apr 2021 22:17:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1345140F81; Wed, 7 Apr 2021 22:17:36 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 725B2140F7F for ; Wed, 7 Apr 2021 22:17:35 +0200 (CEST) IronPort-SDR: qFvfp68jIfvtCjZs2Jtfqs9XCFjAiZUYrU+4u4EpHahd9R8y/1G3huwAeeSoNOLQrqGXrkeBzA qhi/+FHFu3bg== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="254729252" X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="254729252" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 13:17:34 -0700 IronPort-SDR: 7eGdnq6mngjNN3XBTZFL2gp66B2YwMcOmutVacoxiVcoZx40liRzspQ9AJbTxpzKAJ95WWN98x womK+0eA20XA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="379961382" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga003.jf.intel.com with ESMTP; 07 Apr 2021 13:17:33 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) 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:17:33 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) 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:17:33 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.46) by edgegateway.intel.com (134.134.137.100) 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:17:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WHZf4aV2RpglsX8AJFf2ba4cyWGq39PjyDOIJZKpK/gbiPqw35mzt8pyCIgjYgLytXMLR7ybzBmE8tvEzRQsyc7PLSygX524Ts5nGm9wHRQYwmCgYvDpHCKeDa62WAj92jDM1cAiURppfdINvMjpNOHMDk8+Vb2ZBNaRXMWwpuiMuncIbVK9juGSGRDnyxHFdGUliIeefVIh5AfabEMUKUJKwr3wnhF3R8CiAIRcD8jQWHhXrq13/Y6YXjTJFVu9BB9RcFniOm/P1YkO79tXMCwWTmELeAQxtvKF56Rlq11BwTGguC5GbDLC2zYLOWbG6Dy+EMIQ5URga6e86zm8ug== 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=hiXHNVNV5h31tlJcA4WkvCayF/DZwD3ds/6AGR+jJ2Y=; b=ZYBYCOwK+ZJUpcAN9/OeiJczi0Obqi2UONMqLqEtMLtpKfn4R+7HXbhCM2qjBMLGa8xydcJv5hI6NPCp7CfpiY6vCxzgUGRvm+X43GIW4oD8a6aPN+WUWakUwenVv18v3XuduzsZIoG71/vGpiyOX3zS/GGK9KsKknRHTfmaFw3Lvi0jwaKA4OUB+aCyVr0dfuXN5e8Ne8OQtevl2swceZ5B4nGaX96K/mZi3Ui55rq3PT0wnk/Za+oMN/2f6Eqtm+FL9oIZ2NYmoFnTAQFFW9T0sF8gGa1CymLbepKse6AygXQJqaUIP/SuX+LBhinFkehoqSDxdIBjrY86txtgTg== 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=hiXHNVNV5h31tlJcA4WkvCayF/DZwD3ds/6AGR+jJ2Y=; b=oMEZl8NVy/CqkJIrUx8OXInpSHNe72pvzyRD9T+Kx6b8EacAcJMqmP/awyirPv4ZKWxnjD27g9zs3mt0bnMJ3kIsAm9CMaEnY5xHxHdcnVrIdhbBIQUj6PQU49MttI1FBt60gwWof8HLOhwIF3LzpE15Vv07UtZdd1Yli6wlUcU= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM5PR1101MB2137.namprd11.prod.outlook.com (2603:10b6:4:50::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.32; Wed, 7 Apr 2021 20:17:32 +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:17:31 +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+EyJMOLY5bJKJqqpiPAg Date: Wed, 7 Apr 2021 20:17:31 +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: eaa80c0f-f2d0-4877-5758-08d8fa022cb3 x-ms-traffictypediagnostic: DM5PR1101MB2137: 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: pUBS2buQeYPKG2E9b2BaWFGT09V9auXGQUCrJlZqQso1LHGHoKKinps47+o4qjeO7t9bEZSsi/+nlux9MuXPOvf8wL6vTrfBupFw04hsPa5496NIQGpwu9MjjMxZKRSKfZVW20ywceKD05zqT8oaHUDvqjBQIIZC/bjhcG6bGb4nMuZWqNDxqIPCMFXeFXIWAUyww4KjmCiyEmcHNz7RnpMA+Ps2gPSyEkLB1E17l5OAP0h+uwG6RB6gHdArXsBKygNoDnp0yOZg+k2+yVZn7XBcgh0Q8Mbe42ZaVepUB96trE04Jd8FCJ8ptAS+NLpSqQQm9EaKXoNZmbf9zUkEqjUhOhPZR0HbL21u2z9lmqLKerLbsz1xAzcFQGmx+WVkNHsz0RIvMRK5xFpvMv8TNDiF9TG+mz4EW/UejN+gNeXczqHU7mmm9CHkKDxJy6e09wpw1Upy+JQuZyNlEt9GslApLgc7YZ7g4AJbRzdQMj0CcRJG0Czv1NHoVRPp44/do3zP0QJ15mVGbUYeO62rSmkG8uyfvPwHGxWgMJKKg8iAaz+3fPPYyDTe2oM+a9dY5/8uwQi5VzxFYhKclhRlKHirXOLllpZAiGvX/pBAoN1o+17LGTXNc6tWOMeI9qw8C2ourM/H9uGi3zBygrf/oZkEZ7Dp4Nj4gR1Dr8iW1H8= 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:(39860400002)(376002)(136003)(396003)(366004)(346002)(9686003)(478600001)(71200400001)(6636002)(54906003)(86362001)(8676002)(52536014)(33656002)(186003)(53546011)(316002)(4326008)(110136005)(7696005)(64756008)(66556008)(66476007)(66946007)(2906002)(7416002)(76116006)(38100700001)(66446008)(83380400001)(30864003)(8936002)(5660300002)(26005)(6506007)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?zFh3Yd0FWQ+wD6Po0hXEw0L7n+XBYFX0eIimzDWShC+riq/WPIhfghCW6ZOP?= =?us-ascii?Q?dEvlj6zCuVvPx1ceEELVKdwzOdvwSfmNsAVe2segPRfkL/xib15maW+c+B3x?= =?us-ascii?Q?R47dnfxvogYb/kA82yj8vPkQVGOWAxIIV81kLUK3KOQRbcFSyOgXXUaTMnsN?= =?us-ascii?Q?GPm9DoX2ilGKqzw7jS0HIhbOwSRLMp30fIgr3I5LLWy4gTzLIkF1eqYiILkX?= =?us-ascii?Q?/eoaME7wETf3881tmT+01luzgebzpJugLGgzglYwW1jamOU4FZ+7GwkulgAi?= =?us-ascii?Q?7g0pt3AfziFVws4YgTDVwXuetn4w5/YTqQw+IIzedptc94U2QbMmJQaH2Oa8?= =?us-ascii?Q?GXeO013YIHIiHAaLgmdmDh35xlJxBW9yn3SAF5imK/ip0pF9yN3JtRZfkfDy?= =?us-ascii?Q?uitW7glJAMfGhEGSjfzA1Eyn4TbcBQh5UeI8MJOd4s37V9+vbOeCCSIocjR4?= =?us-ascii?Q?yH7/7Z9aMj4YU5XOgqalGDiiECQGYqmW2r0PLUEObq7BOkM+/K3oITwqfK74?= =?us-ascii?Q?bhWk3WVk6R8K5UDJjCq15enGSnX+sSnf+pYOBSFVYYnHmR2h8zFcpWuzgmKW?= =?us-ascii?Q?zqeHwunLqIRqv49btXP8+QocpatsG4kwBq+3PT+Wv9vj3gYAB7JuLX9QgV0f?= =?us-ascii?Q?jwFZGPXohvWs0d0+u5n6+1hmcsC6iXrGkxukMVXkJMruH6WBN7vxModvOD0s?= =?us-ascii?Q?531x5vVDNUD+KEUvCi8o+daNjtW69BYaxut7CPLCWvipFMwUBSkhuXNrBHsy?= =?us-ascii?Q?S8jHyZgpBbK69X1lBnGTzKKqsbfgVfjh1krv27X4RN35Rss+6SyebP8E8QfN?= =?us-ascii?Q?fzITIm1ACJ0zdPtp3SqvA80v717JioTF8M1y8Eq0WAWiYKLpy8p4PX0Xu/iJ?= =?us-ascii?Q?hJGRB4o6VOGt0OpH2tp2SSSvKRREddbQgFMmVn5UHc+u5/czXeOFmqabw2A6?= =?us-ascii?Q?7kUE9Gi/OGcEr/A5La9sGxGhYJK1DSQ9JNmtH5509sqQXTkEd2irW/NJeO4O?= =?us-ascii?Q?mukDG/rR49mjazpDXgIUl3FklJxZj+S3Lv1Ak7MvDZFzL7KvlpP/ETQEdIT0?= =?us-ascii?Q?eavRQskGheul8NKv3TsdjttVkhwy/+/5lqNAAbYV9SxIMSBudXR/iIbHdqxg?= =?us-ascii?Q?ge++cEcWd1hs0zmkQBgWHF1B6Mqxiyog4doRpbSn0y8Nrn0KRb3EOxca27Zb?= =?us-ascii?Q?n1gt6Kz01/coLTKcvuDVro+pojvqykGb/TqW40IHy0MIz3wpX9xtPfhoWcSs?= =?us-ascii?Q?XU8rPGIT2KblzNMq4p2DTJ5p+1BFOA8USvLl2nNBKDNjqQRwmlB1Vrc8zho7?= =?us-ascii?Q?deeYusFfHbdXV/5aHj+Jy8Ro?= 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: eaa80c0f-f2d0-4877-5758-08d8fa022cb3 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 20:17:31.9044 (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: Wmy9jIIxgePP/F4dAS7Zwi+yfP5pwK+/JxHYDzYwqzZ5TiSqhUWWI8Z4OLV/wTjd4XO0avxoY15m3giB/OY1I3OLSsQ5Y3IimxKIznE/mdY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2137 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 There is already a patch from this series numbered PATCH 2/2. Does this bel= ong to the same series? It is not easy to review this set of patches related to the packet mode add= ition to the API, as it is split across multiple patch series and the numbe= ring is confusing. I am not sure I am replying to the latest version or a s= uperseded one. Could you please create a unified V2 that contains both the series with the= API changes and the series with the necessary error checks in the drivers?