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 EEDA9A0579; Thu, 8 Apr 2021 06:06:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76A9340698; Thu, 8 Apr 2021 06:06:47 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2058.outbound.protection.outlook.com [40.107.243.58]) by mails.dpdk.org (Postfix) with ESMTP id 9AAE040138 for ; Thu, 8 Apr 2021 06:06:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ll5tbAxHad7biHNdNsQXVtovssGvl5buuL4GzL/AQAML1GjbWtJgNTVImTCY10Mi3HeTbzy21vQ7wgL8D+I07meJAtdgABvmQtTovokSbBbBoTcS0PJZ5XjyL7gFql2mhsFCyOo5Xf1tfv0fpSjOzG7gj4eOVE/OtXbkFXCNlA69lCgN9AryvYlHE6PrpWaSA3zSCeZb6RxqmUHchAE8DVrUciZA33dHC/XPxSaTQuttiZ+AtqNM/vMHlhOouCYuK60Oi/dGow1spisBdHiP1FvkqJ3qVEJkRcZuU7R3tpJKZ62G8gRAOkYDEmf+YD5/l86gzNuvj5Xnl2I315oP1Q== 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=9lJu652ZU5swkuFgbB1/dK37Ja2aRHfhJF3DqlREke8=; b=eHkmYNZssl+5K4JZ20yWk+nEMScLS8JyWq5Gpb07+DkiVmQFqU1CbYsRtSYyx9eAePTmOhFFbxgLCndVyFrP3Sl0WjtEK10DGtigRi1c32No3kogYI0MApLf0LYBWQIKEBV/9IxKeDJ6D8NT0b1aR0iZptBSAeDOQF3eP+recoZHoMdtNWmSCM3jROnfRKsKn1oZJj6xv3TWbmHpeWM39pSfbRV1AzjlYgYpJcTU8xspX7Xw3lsONjWIAnbVi2j8s6cXVJDSe4rmSWxop08y/XiqGXu2y8v4+rL0/Aba3FT8zU4cHMFe053g3dmsHArBKTxSnrZQghqemmVjBNQBXg== 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=9lJu652ZU5swkuFgbB1/dK37Ja2aRHfhJF3DqlREke8=; b=e1gPbwsYdBg2ybLGg3cNzJSJN/6gNPNkKxFoW8GhE7yb7/3SLjaXVgKjK4PGk674Bz1EOvTYdsO0M3jGUJ3Vs3t1xeEiUI4bhSqr6VrvtyhWhdNdiLpF2SRJoUhmXWKGhStU5zT/KJiln9p0d70b5s4SvZB2wsZiYQVwYzLtb+QmmeiBzl6IDrvKSBPWw3KFYVtfvaEPBt6QtnK4AjZrrc8R5gTMm46BUJTXLevU/r76azlUgVjI1UjMHU92ykHyty63kXvP7+bKF+YX1QYHmMrd4NRrNFBgOiXVQI+Q7KW/9Bq1q3nSlcF04AERh+5pKXzrSDJnSNXx1MybV38p4A== Received: from DM6PR12MB4090.namprd12.prod.outlook.com (2603:10b6:5:217::11) by DM6PR12MB4329.namprd12.prod.outlook.com (2603:10b6:5:211::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.27; Thu, 8 Apr 2021 04:06:43 +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 04:06:43 +0000 From: Li Zhang To: "Dumitrescu, Cristian" , "dekelp@nvidia.com" , Ori Kam , Slava Ovsiienko , Matan Azrad , Shahaf Shuler , NBU-Contact-Thomas Monjalon , "Yigit, Ferruh" , Andrew Rybchenko , Liron Himi CC: "dev@dpdk.org" , Raslan Darawsheh , Roni Bar Yanai Thread-Topic: [PATCH 1/2] ethdev: add packet mode in meter profile structure Thread-Index: AQHXJkrD3L0+ogx8OEmGLzuCxEgxQqqe4shAgABN/ZCACll7AIAAgg7w Date: Thu, 8 Apr 2021 04:06:43 +0000 Message-ID: References: <20210331085405.1445546-1-lizh@nvidia.com> <20210331085405.1445546-2-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: 31cf9225-6681-49b1-e0a6-08d8fa43b85a x-ms-traffictypediagnostic: DM6PR12MB4329: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Dhjm7un4kNVCNkzZTdexELf5EQHJMOMr/UJRfmg3WViHbu9q24Pdy8XLejTw4NY4ASFav8UEfi/qOgWpj/PhjyB84RSA6yXKEiyYmmtWBhAUu5tTU75nJ99JBODQB0VIyiSETd1WC63mm8Bn8WD58HDtD5jMOHcnC1oISz686u5+g0+nD1llj/IfPWzFi6EU8b2gMzain6ng98K8aPUkuVFwOhP37FFXLiXKfq9kSepL4cKLJqvjg9p05cDwh6PLMBRXRWJdmF2KSD0cKLoEEQYSf1JInXHRn0RNJYDSOowyfYWBNKCj0Ca6IkXsyi+QMG0l43tI5uTY0MU5KXWShuVQjffCDVvnyVg/8GSPQUPhcArvn9sP2h4+lnt4vg8PYBCzqtzdTfeWkQbd8q/bfxKjP7Ri4/nHELiYMrlr3N5f4tZAjCY8ilZ4EVdh1zJ4+vlYyNfwSE3mRyjtbe0NZxBPOQJPyNIgyiEdHE6vqCItyLKwMChKLqew6FJrgwbdeMCrMUzbHgEZDYqjolTgh2ot4CDYKjBkVVBuCmUhrlQgx46ZRlSLE15mK+JHr+AcIXpJ3X/p9U4NsPZrOa/VbERcB26JYz8zqS8Vm6Oliu1FSc3gGYAYuF5A+TNPd8NyQhzK5x+GDuYoeYboTGi+fwNjqE7Z52Hke5T8jGcf9xA+KVWsfr8XvaSDM3XAQXUB6XgwP70JghH+W0vjZPZPTh5nUZ0COhvtL7UbhjOVEWuyJF0gheetIYNfKZBw2zte 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)(366004)(346002)(376002)(5660300002)(921005)(186003)(55016002)(66556008)(316002)(64756008)(66446008)(110136005)(86362001)(107886003)(38100700001)(66476007)(966005)(478600001)(6506007)(9686003)(8676002)(26005)(8936002)(30864003)(2906002)(7696005)(52536014)(83380400001)(71200400001)(33656002)(76116006)(66946007)(54906003)(4326008)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?j6hwCSlA9ZV6R8DxCRLv0dgw+DeAOzGS3N0ogroTACH+d37YCTlF0ZfYyn6v?= =?us-ascii?Q?97XJNisB91jgD4VueGQkSrLU1Pzs7DUXHWlUezcMEUaDV9WCr9QG1aLQievn?= =?us-ascii?Q?Wz8GEjndHZArs33JBnNDzMyJSM49NALsWGuicd641S8X0M+u8S3bSbGb92N3?= =?us-ascii?Q?Hi5zYZw2kqgwEqj09RIM9wpdRoTxA1Bwmq0pwSAoaFcgbb905Ix6z5VZYlFw?= =?us-ascii?Q?aB85Zkk4c5SElLeWhe+0KRDdjPnFKZXSZNh16Dflu+i3Hx0WdgcX13AwmzTT?= =?us-ascii?Q?UM9jCKuWffa5o27NqL9qvyHMSq1PW5OEDbK5uhmbSV6lFr3n5K/0HdNT4vDR?= =?us-ascii?Q?qE5WXZmxSm2o3rNW9bG8dzA6+1MRwK6HIJBOr0N5puS+6ja2Xo+cjXjJWOPC?= =?us-ascii?Q?Asbgd82L/5pKa3uzu9wHGLGqnxyrfBeS46YWWTU5nuntjPBuFyfyL9qvYB3q?= =?us-ascii?Q?y4LVU79GChY1wDndCXldUEhM1ui3Ryi33rA6Uk9+v0eQFntc3gBMEe+nUWxx?= =?us-ascii?Q?bG/MRXX9ae1m5PJccHyRynrBYlCNaQM37wSrvuNqsVLXE6uIUucTJwho2knI?= =?us-ascii?Q?X9q4FanHmwFox5kwzPrKljtkHdqk+T/1o7FonT30n0uJJxiNX86Xg//mcqfH?= =?us-ascii?Q?PDmVwanwzETUEXzMtzBzW3ULZs3lyrvMBrULq+wQjh41IreLwwcUFn+f/20T?= =?us-ascii?Q?71peKKeYdHG9EhrVW8knL4ahH+cMwLE5ILKgcHaSttaKE56afvtFPNjJP+jf?= =?us-ascii?Q?qSyVVHdgq7Ur2Dn3gxL49hscqTSMdbhuMm/9YKvU9RWDxOalHdb1ziSTU52J?= =?us-ascii?Q?gBEupzhQZD5jIW6GnTh6Hk7+0RgIbygskYk5Y1RuQkk7C9/IbnzTlvXD2Bo4?= =?us-ascii?Q?GgK2LYhul9qkdfOeXtcdP3ZzZc7CgRpzMtSlAUhmSFgST3Rw1VFgl93TukAa?= =?us-ascii?Q?hdXscj28/AMpBvKDp00nZDGxUNy/o0KkNtu15v764i/J1N/nUGnZPgzfklhO?= =?us-ascii?Q?MPIjGgy2snBdXPYO9kDHOWms4WrTau0jbdYxxTIyFcJI9UQ0LJd23ssNuLsn?= =?us-ascii?Q?+bdBu6h6T3Vrcm9A+a9RygYQ0xCd2i+YxJK2F1XqNNxBvfCF0/J3XEosvVtS?= =?us-ascii?Q?oF1oe0Se5fjEsO5zyDDMi611z2m0TvgP4YoNjhmFuc4axQr09QEtXEho1Omd?= =?us-ascii?Q?MjDFIiVS2rk1URwISwtde7F/NpQzW24yq3wCcML6yrMWtcI0c2qXKedu+BMY?= =?us-ascii?Q?sXI8hDhH6IU24zUi8uT6I9Y3CmZymkXMTvFn+ZU6Oxy5QWqq8OmkY73ffKDn?= =?us-ascii?Q?t4pV3NxlVhe/yHdJs8bkjau5?= 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: 31cf9225-6681-49b1-e0a6-08d8fa43b85a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 04:06:43.4456 (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: ecSIMx8mzFyc96t43KFJhgWs1u7L98v803tnzrX5Dq/2OUQ9Udzr52t3D2pm7hXj X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4329 Subject: Re: [dpdk-dev] [PATCH 1/2] ethdev: add packet mode in meter profile structure 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, Please help review it, which is a unified V2 that contains all patches. https://patchwork.dpdk.org/project/dpdk/list/?series=3D16183 Thanks! Regards, Li Zhang > -----Original Message----- > From: Dumitrescu, Cristian > Sent: Thursday, April 8, 2021 4:20 AM > To: Li Zhang ; dekelp@nvidia.com; Ori Kam > ; Slava Ovsiienko ; Matan > Azrad ; Shahaf Shuler ; NBU- > Contact-Thomas Monjalon ; Yigit, Ferruh > ; Andrew Rybchenko > ; Liron Himi > Cc: dev@dpdk.org; Raslan Darawsheh ; Roni Bar Yanai > > Subject: RE: [PATCH 1/2] ethdev: add packet mode in meter profile structu= re >=20 > External email: Use caution opening links or attachments >=20 >=20 > > -----Original Message----- > > From: Li Zhang > > Sent: Thursday, April 1, 2021 7:19 AM > > To: Dumitrescu, Cristian ; > > dekelp@nvidia.com; Ori Kam ; Slava Ovsiienko > > ; Matan Azrad ; Shahaf > > Shuler ; NBU-Contact-Thomas Monjalon > > ; Yigit, Ferruh ; Andrew > > Rybchenko ; Liron Himi > > > > Cc: dev@dpdk.org; Raslan Darawsheh ; Roni Bar > > Yanai > > Subject: RE: [PATCH 1/2] ethdev: add packet mode in meter profile > > structure > > > > Hi Dumitrescu and Liron, > > > > I add the check in softnet and mvpp2 drivers in the following patch. > > Please help review it. > > https://patchwork.dpdk.org/project/dpdk/list/?series=3D16036 > > >=20 > As stated in a different email, it is difficult to review this API change= , as it is > split across (at least) two patch sets, one with the API changes and anot= her one > with the driver error checks, also as stated before the numbering of some > patches does not seem right; difficult to tell if I am reviewing the late= st version > or a superseded one. >=20 > Could you please create a unified V2 that contains all patches in one pla= ce? > Thank you! >=20 > > Thanks! > > Regards, > > Li Zhang > > > -----Original Message----- > > > From: Li Zhang > > > Sent: Thursday, April 1, 2021 9:42 AM > > > To: Dumitrescu, Cristian ; > > > dekelp@nvidia.com; Ori Kam ; Slava Ovsiienko > > > ; Matan Azrad ; Shahaf > > > Shuler ; NBU-Contact-Thomas Monjalon > > > ; Yigit, Ferruh ; > > > Andrew Rybchenko > > > Cc: dev@dpdk.org; Raslan Darawsheh ; Roni Bar > > Yanai > > > > > > Subject: RE: [PATCH 1/2] ethdev: add packet mode in meter profile > > structure > > > > > > Hi Dumitrescu, > > > > > > Thank you for your comments. > > > I will add the necessary checks in V2 patches. > > > > > > Regards, > > > Li Zhang > > > > > > > -----Original Message----- > > > > From: Dumitrescu, Cristian > > > > Sent: Thursday, April 1, 2021 12:27 AM > > > > To: Li Zhang ; dekelp@nvidia.com; Ori Kam > > > > ; Slava Ovsiienko ; > > > > Matan Azrad ; Shahaf Shuler > > > > ; NBU- Contact-Thomas Monjalon > > > > ; Yigit, Ferruh ; > > > > Andrew Rybchenko > > > > Cc: dev@dpdk.org; Raslan Darawsheh ; Roni Bar > > > > Yanai > > > > Subject: RE: [PATCH 1/2] ethdev: add packet mode in meter profile > > > > structure > > > > > > > > External email: Use caution opening links or attachments > > > > > > > > > > > > Hi Li, > > > > > > > > > -----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 > > > > > ; Thomas Monjalon > > > > > ; Yigit, Ferruh ; > > > > > Andrew Rybchenko > > > > > Cc: dev@dpdk.org; rasland@nvidia.com; roniba@nvidia.com > > > > > Subject: [PATCH 1/2] ethdev: add packet mode in meter profile > > > > > structure > > > > > > > > > > Currently meter algorithms only supports rate is bytes per second= (BPS). > > > > > Add packet_mode flag in meter profile parameters data structure. > > > > > So that it can meter traffic by packet per second. > > > > > > > > > > When packet_mode is 0, the profile rates and bucket sizes are > > > > > specified in bytes per second and bytes when packet_mode is not > > > > > 0, the profile rates and bucket sizes are specified in packets > > > > > and packets per second. > > > > > > > > > > The below structure will be extended: > > > > > rte_mtr_meter_profile > > > > > rte_mtr_capabilities > > > > > > > > > > Signed-off-by: Li Zhang > > > > > --- > > > > > doc/guides/rel_notes/release_21_05.rst | 7 ++ > > > > > lib/librte_ethdev/rte_mtr.h | 89 ++++++++++++++++++++= ++---- > > > > > 2 files changed, 85 insertions(+), 11 deletions(-) > > > > > > > > > > diff --git a/doc/guides/rel_notes/release_21_05.rst > > > > > b/doc/guides/rel_notes/release_21_05.rst > > > > > index 3c76148b11..c9c15794ad 100644 > > > > > --- a/doc/guides/rel_notes/release_21_05.rst > > > > > +++ b/doc/guides/rel_notes/release_21_05.rst > > > > > @@ -119,6 +119,13 @@ New Features > > > > > * Added command to display Rx queue used descriptor count. > > > > > ``show port (port_id) rxq (queue_id) desc used count`` > > > > > > > > > > +* **Added support for meter PPS profile.** > > > > > + > > > > > + Currently meter algorithms only supports bytes per second(BPS)= . > > > > > + Add packet_mode in the meter profile parameters data > > > > > + structures to support packet per second (PPS) mode. > > > > > + So that it can meter traffic by packet per second. > > > > > + Packet_mode must be 0 when it is bytes mode. > > > > > > > > > > Removed Items > > > > > ------------- > > > > > diff --git a/lib/librte_ethdev/rte_mtr.h > > > > > b/lib/librte_ethdev/rte_mtr.h index e1dc59eb06..52611a90f5 > > > > > 100644 > > > > > --- a/lib/librte_ethdev/rte_mtr.h > > > > > +++ b/lib/librte_ethdev/rte_mtr.h > > > > > @@ -133,46 +133,71 @@ struct rte_mtr_meter_profile { > > > > > union { > > > > > /** Items only valid when *alg* is set to srTCM - R= FC 2697. */ > > > > > struct { > > > > > - /** Committed Information Rate (CIR) > > > > > (bytes/second). */ > > > > > + /** > > > > > + * Committed Information Rate (CIR) > > > > > + * (bytes per second or packets per second)= . > > > > > + */ > > > > > uint64_t cir; > > > > > > > > > > - /** Committed Burst Size (CBS) (bytes). */ > > > > > + /** Committed Burst Size (CBS) (bytes or > > > > > + packets). */ > > > > > uint64_t cbs; > > > > > > > > > > - /** Excess Burst Size (EBS) (bytes). */ > > > > > + /** Excess Burst Size (EBS) (bytes or packe= ts). > > > > > + */ > > > > > uint64_t ebs; > > > > > } srtcm_rfc2697; > > > > > > > > > > /** Items only valid when *alg* is set to trTCM - R= FC 2698. */ > > > > > struct { > > > > > - /** Committed Information Rate (CIR) > > > > > (bytes/second). */ > > > > > + /** > > > > > + * Committed Information Rate (CIR) > > > > > + * (bytes per second or packets per second)= . > > > > > + */ > > > > > uint64_t cir; > > > > > > > > > > - /** Peak Information Rate (PIR) (bytes/seco= nd). */ > > > > > + /** > > > > > + * Peak Information Rate (PIR) > > > > > + * (bytes per second or packets per second)= . > > > > > + */ > > > > > uint64_t pir; > > > > > > > > > > - /** Committed Burst Size (CBS) (byes). */ > > > > > + /** Committed Burst Size (CBS) (bytes or > > > > > + packets). */ > > > > > uint64_t cbs; > > > > > > > > > > - /** Peak Burst Size (PBS) (bytes). */ > > > > > + /** Peak Burst Size (PBS) (bytes or packets= ). > > > > > + */ > > > > > uint64_t pbs; > > > > > } trtcm_rfc2698; > > > > > > > > > > /** Items only valid when *alg* is set to trTCM - R= FC 4115. */ > > > > > struct { > > > > > - /** Committed Information Rate (CIR) > > > > > (bytes/second). */ > > > > > + /** > > > > > + * Committed Information Rate (CIR) > > > > > + * (bytes per second or packets per second)= . > > > > > + */ > > > > > uint64_t cir; > > > > > > > > > > - /** Excess Information Rate (EIR) (bytes/se= cond). */ > > > > > + /** > > > > > + * Excess Information Rate (EIR) > > > > > + * (bytes per second or packets per second)= . > > > > > + */ > > > > > uint64_t eir; > > > > > > > > > > - /** Committed Burst Size (CBS) (byes). */ > > > > > + /** Committed Burst Size (CBS) (bytes or > > > > > + packets). */ > > > > > uint64_t cbs; > > > > > > > > > > - /** Excess Burst Size (EBS) (bytes). */ > > > > > + /** Excess Burst Size (EBS) (bytes or packe= ts). > > > > > + */ > > > > > uint64_t ebs; > > > > > } trtcm_rfc4115; > > > > > }; > > > > > + > > > > > + /** > > > > > + * When zero, the byte mode is enabled for the current > > > > > + profile, so > > > > > the > > > > > + * *rate* and *size* fields are specified in bytes per seco= nd > > > > > + * and bytes, respectively. > > > > > + * When non-zero, the packet mode is enabled for the > > > > > + current > > > > > profile, > > > > > + * so the *rate* and *size* fields are specified in > > > > > + packets per > > second > > > > > + * and packets, respectively. > > > > > + */ > > > > > + int packet_mode; > > > > > }; > > > > > > > > > > /** > > > > > @@ -333,6 +358,48 @@ struct rte_mtr_capabilities { > > > > > */ > > > > > int color_aware_trtcm_rfc4115_supported; > > > > > > > > > > + /** > > > > > + * srTCM rfc2697 byte mode supported. > > > > > + * When non-zero, it indicates that byte mode is supported = for > > > > > + * the srTCM RFC 2697 metering algorithm. > > > > > + */ > > > > > + int srtcm_rfc2697_byte_mode_supported; > > > > > + > > > > > + /** > > > > > + * srTCM rfc2697 packet mode supported. > > > > > + * When non-zero, it indicates that packet mode is supporte= d for > > > > > + * the srTCM RFC 2697 metering algorithm. > > > > > + */ > > > > > + int srtcm_rfc2697_packet_mode_supported; > > > > > + > > > > > + /** > > > > > + * trTCM rfc2698 byte mode supported. > > > > > + * When non-zero, it indicates that byte mode is supported = for > > > > > + * the trTCM RFC 2698 metering algorithm. > > > > > + */ > > > > > + int trtcm_rfc2698_byte_mode_supported; > > > > > + > > > > > + /** > > > > > + * trTCM rfc2698 packet mode supported. > > > > > + * When non-zero, it indicates that packet mode is supporte= d for > > > > > + * the trTCM RFC 2698 metering algorithm. > > > > > + */ > > > > > + int trtcm_rfc2698_packet_mode_supported; > > > > > + > > > > > + /** > > > > > + * trTCM rfc4115 byte mode supported. > > > > > + * When non-zero, it indicates that byte mode is supported = for > > > > > + * the trTCM RFC 4115 metering algorithm. > > > > > + */ > > > > > + int trtcm_rfc4115_byte_mode_supported; > > > > > + > > > > > + /** > > > > > + * trTCM rfc4115 packet mode supported. > > > > > + * When non-zero, it indicates that packet mode is supporte= d for > > > > > + * the trTCM RFC 4115 metering algorithm. > > > > > + */ > > > > > + int trtcm_rfc4115_packet_mode_supported; > > > > > + > > > > > /** Set of supported statistics counter types. > > > > > * @see enum rte_mtr_stats_type > > > > > */ > > > > > -- > > > > > 2.27.0 > > > > > > > > These API updates look good to me, but please add the necessary > > > > checks to the existing drivers implementing the rte_mtr API to > > > > makes sure that profiles with packet_mode set to TRUE are rejected. > > > > > > > > For the Soft NIC driver, this is a simple check in file > > > > drivers/net/softnic/rte_eth_softnic_meter.c, function > > meter_profile_check. > > > > Thanks! > > > > > > > > Regards, > > > > Cristian