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 BEA8DA0A0F; Wed, 7 Apr 2021 22:20:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59689140F81; Wed, 7 Apr 2021 22:20:23 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 9B259140F7F for ; Wed, 7 Apr 2021 22:20:21 +0200 (CEST) IronPort-SDR: RAPVE8/2+5wHK2sVyF/Lcyy5uPVDE+zjT26WGHzIzfOEy1Pw0B0nDEtHRp1KbjN8ideqSSQWLK eAQ4mItun+yg== X-IronPort-AV: E=McAfee;i="6000,8403,9947"; a="213787531" X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="213787531" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 13:20:20 -0700 IronPort-SDR: 9B0PWMqUEBgzxSLCoc2YD14RH2x4d0smLBjbuX+8Dqlq3v+q726o0LO8TQDg3sIV9Z7kbv8NOV BNyRK/Kg4zJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,204,1613462400"; d="scan'208";a="458510121" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga001.jf.intel.com with ESMTP; 07 Apr 2021 13:20:19 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) 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:20:19 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) 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:20:19 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (134.134.137.103) 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:20:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aObpkXsG3iOV/DfhmmcP4MIZVNBkqrYHIihvQJ2ONeUd7t6P9x82xKuyJ0/tHNKqnO6K4Ck4J+cmD9msgAJEpZWR4HB8eGX9Y4uqji37G3PTVnUNev59d47nnx2e8OAI8ewKo3wSu9u/+VKkYkeG61fherTZ/gHGRqmlClVANMUL1IVkYmPf08mmInDyc9QM+ofaUW6Ao85KGqynq9vj0Ho6LDhisTgz6+SSsj80jjTL2O9Wie80gmbP13zyA11fv3S0mXuebv+SyWj5j8WvHs7tqTIYQ3X8Stz0SmFtpp+yGPLmQGK9nSRJ4GZbAEPCr2TY/o2/gDu+JCWlGu1Vag== 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=xsA4WcFeSxEFumou7lzJP6T69yxAhSG0KoKZx4BUjSI=; b=mU+6p25MiYI8W06jtb54uUsInqlT/M3RJxHUtd1DRaorJAlojsVgy9Q/Hy+0+8WJmh5DcWI/i7XDRGlGooDlApERTFUlY/24odk7+ZtSDgx6Az+tbX2ksywLXaQRR1t2SL6q6JSHKatBmi204veWNx6X5EeGAM0YUfcqFw6rYo/JFfdGu3/7nEODoL+vI6ZDgPIjsIQnbLQHY9tkPQqTV7NiFiiwkxBYOoyIMcVNSMYG18M3VTEslhhXYCKMlCOTB7ecJzUD7v0RRlZUdwZrwUR4X8JpE9IOQrUDh4kugeM/ElCyvxSEMNIgo8Syx/z1BrZzvUxjCzEkWesuTqU8UQ== 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=xsA4WcFeSxEFumou7lzJP6T69yxAhSG0KoKZx4BUjSI=; b=CSEzDC+VKOS9h/ETOpbbraFCv0p9YG2imoaQunP33GHAcQY4GHc977G/AN3sDclP2a2a0RUf9x2AATeidPbOGy2Twr6Hbny4aK2aWy2ey5FDtEYwkjw4DxvkMYAA5HiezhTvHvzOVfLdZ66dzCX/hN9GWA9NdtMgiUzBFUOzbBA= Received: from DM6PR11MB2796.namprd11.prod.outlook.com (2603:10b6:5:c8::23) by DM6PR11MB2905.namprd11.prod.outlook.com (2603:10b6:5:62::18) 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:20:15 +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:20:15 +0000 From: "Dumitrescu, Cristian" 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 Thread-Topic: [PATCH 1/2] ethdev: add packet mode in meter profile structure Thread-Index: AQHXJgtzItj7J15qL0SvsWarq8sAsaqeSCjggACcGgCAAE2RgIAKWDyA Date: Wed, 7 Apr 2021 20:20:14 +0000 Message-ID: References: <20210331085405.1445546-1-lizh@nvidia.com> <20210331085405.1445546-2-lizh@nvidia.com> In-Reply-To: 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: bace9c4a-c097-4c1e-bffb-08d8fa028de8 x-ms-traffictypediagnostic: DM6PR11MB2905: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,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: VnhI4bA4eEcvPsObgJyZ5Mv/r2MB8XYKjSuLB+PxtpxdjhyJNX/wG4ECKZXRSRMgM8uF3516iZBHLJ0Tb4HyIrwczyYi1hZjx4G6DyeGJt8YZ8LXeF6TmfFYw75VxOKreQjcVJMUYrq+AcczhqonBKRo20M8uaoxerAs+Pds7A1SXv2JuvKJPGZYOu05Uc6PY3XRtv9v9dAS+S6e+zdfsnwEy9RR4xLMr5gBwqeuVspd6FLtpm45OQsOSilPA20+hwuTfZQnBAen0d9Z2IdJpT40Q0D887YwwSebyCWi39VKzkko4olbGoJ0XE4Uc8/hSDWRFrT/+SumeTG33pmSnBgTuufoH3lcPv33n8lItBkHSSuiCQpTH0n2KfeqTIC8Vyi3Tr8+gmtjJ8OMarhURDyiWmN1Hfz2FOOwEHRPYKAHiAcOr0y1LQQuOBtoTWKnP+fWcPG/8oI1+bXk482Q06+H7M1X68VdC8lJhg3DoWklEXTZCTJF9+uiso1sMZMO0E6SHV/k2bgPM4vK3sDREjvPdwscHA7YeskJyNa4LdFovs+H0qxDZRlIeZ1GTZ8WgEocqiR9aRrULKJxi8AePo7rtD2BexJISear9Q0M3c9Ez5S0S/+u5Jfp6VL81XJzm1ekqZFjA3lbcM7IEMl5feNpdo+80eO+Ipny4LpTCN5ejBrNfuB0X67TDaqb72PZRZXvoz21Hemp3Gi3VCbwawhUc70rNT2Ii6qOYqvDEQmOJ+4YAVraYkuaXduNzQb8 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)(376002)(346002)(39860400002)(396003)(366004)(9686003)(55016002)(5660300002)(26005)(316002)(186003)(54906003)(2906002)(52536014)(8936002)(8676002)(110136005)(4326008)(38100700001)(66556008)(66946007)(66446008)(83380400001)(64756008)(76116006)(53546011)(66476007)(478600001)(7416002)(6506007)(921005)(966005)(71200400001)(7696005)(86362001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?WRSJqEfX8SLA1QhnCC849QhIBl4XeM/pe6dZW668gTJ3n32miSothHX6ETQY?= =?us-ascii?Q?lZCgg2DW9WXAJxkElzTaI2jLPlc8icBjpaXVSbM9QspYSzKkvdx8XE0kEFgb?= =?us-ascii?Q?cYvST/SLvlBT7QDBIXXuG7HTV4hom9oTrogBwIeaBejz2ostR04d/TmBPjIv?= =?us-ascii?Q?ngOM0JDumQ2U9myPxJ+YAeYY4ISKfqs2/vNyGxkK+bb0V55ek5Qz6rzbSDo3?= =?us-ascii?Q?xBM+X4Nx3mo4rbcT6DeSzynLmFZ4ElH8VtBZx6yckNioqyFABUz4y1L+r7zb?= =?us-ascii?Q?bGUOqfwNezoeuOzBb8fuO8o8DnnRmBZTlc53Bq7z1jFypYz1NUl0NOKe12GA?= =?us-ascii?Q?wakM/OREmaKMri8dxQBOFrZWW2DcaCW2o7wjGW66qjxu+vgTjRf8cOkqL/m6?= =?us-ascii?Q?h3cd+DYXbqPXUSg1cnAnce6fZNTf/NUwfWY5ieZiQMqtuqjsg6ki8o+uoGQo?= =?us-ascii?Q?9sKRtgB1xou/LNVI2JLmkKbjoFMpDGpR0ijSsVAqa/1Gzky1Hb/jqyp1P4RY?= =?us-ascii?Q?sf8JVk2EVXJ9T391kFhr7K+oqVIpFt3QOBU5nC8MAe8PxPogLm2gPf1drvsf?= =?us-ascii?Q?/oCHhlX0euz9JIBvYKmwUdbV2a7qUbVOd2A5ABl4ThOZxHe0ZkuVAOXUnqtM?= =?us-ascii?Q?j2Rl4jGUaCS13+AgcYGdRRunkD2wdnlF/Srs+OdTb0PoZxXLEP/NhQfbeRYp?= =?us-ascii?Q?Nl9UG1z2iUNhJ4k/Z8simBEDeTfoHn98jTQhVX0Ni+LlU6rx01zyZTErvND+?= =?us-ascii?Q?0trzqaOm7nbvY+hh01+p8iVcyKq9fmhxYFQg/QDdjHL94q496qyXO7oTPOJv?= =?us-ascii?Q?Aqa4OyTJ8B3+1t264oaz98jnRXAQ8LU/PUJ55MY3jDJ5zBinQKVD8wvnjj5v?= =?us-ascii?Q?aXbqxUdVnd2Toy2LIRQJ93FjoXaHQUMMxxADebphbEDcEglPyzsMGq1GA1aL?= =?us-ascii?Q?oXFslE/spmNbESdKVGy5Iu1w28ze+/Urv+KbytbCF7d3+vOaX6vcajtqaYbI?= =?us-ascii?Q?ZYpkYpnK9AOPMwKNrVNxN4jTPW9G9po3o/EnNOFX0TuO/Eco9vvClrdEAJk+?= =?us-ascii?Q?etNFs05okzNl9HCcrKmaUK4cR+cfBHbcIWYtVzblAnYk9RkmEzirpr+4Yi5E?= =?us-ascii?Q?xQerHva5Y4j2oEK83PKncY1I21IrFTUlRuWQh+hkwLxKyGEjkccmbdD6iYnm?= =?us-ascii?Q?ocq5NfxdvWITyRm6dqO8kMWkoH+YpgvRitTgDkbWICE7vmtgnledGV5vUqu3?= =?us-ascii?Q?AvX6jVeIYRjmb+zR8RntjAYIf6A8Nkwj7QpxMrM5MqawVlhCkctSXUTdz0Yc?= =?us-ascii?Q?V69rdlxn52K5zU2vOwVkGWMz?= 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: bace9c4a-c097-4c1e-bffb-08d8fa028de8 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2021 20:20:14.9895 (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: HETbphAHaoM9qUCYm0qnxLpQLxcXHBFPaJNVIfFTyENBsJewGMQGBODHItuTWnwKk1WrOFCeq+Al9IjIhc0d1kKhoZiNifvhitbZNSeb8Uc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2905 X-OriginatorOrg: intel.com 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" > -----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 structu= re >=20 > Hi Dumitrescu and Liron, >=20 > 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 a= nd another one with the driver error checks, also as stated before the numb= ering of some patches does not seem right; difficult to tell if I am review= ing the latest version or a superseded one.=20 Could you please create a unified V2 that contains all patches in one place= ? Thank you! > 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(B= PS). > > > > 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 - RFC= 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 packets= ). > > > > + */ > > > > uint64_t ebs; > > > > } srtcm_rfc2697; > > > > > > > > /** Items only valid when *alg* is set to trTCM - RFC= 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/second= ). */ > > > > + /** > > > > + * 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 - RFC= 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/seco= nd). */ > > > > + /** > > > > + * 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 packets= ). > > > > + */ > > > > 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 second > > > > + * 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 p= er > 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 fo= r > > > > + * 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 supported = 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 fo= r > > > > + * 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 supported = 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 fo= r > > > > + * 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 supported = 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 check= s > > > 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