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 A2402A054F; Tue, 2 Mar 2021 13:29:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EC144014E; Tue, 2 Mar 2021 13:29:35 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 1CC1640142 for ; Tue, 2 Mar 2021 13:29:32 +0100 (CET) IronPort-SDR: EQ60CciDTiHLs5fkYwWbgyTITN/6p/ak725ay8nJPGDl9ViVVJGybX0GBCCwq2tCRW0Juae5bJ E3J7p+82fG7Q== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="183398427" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="183398427" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 04:29:31 -0800 IronPort-SDR: 5V9NZY9bizfTWt4w3tEbjFQq0pS29CoLepWU/BrP5fK5Nj+wIewC2NUymMouKiDZi5qX5m1ofV RjFGUeX4eePQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="427470202" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga004.fm.intel.com with ESMTP; 02 Mar 2021 04:29:31 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 2 Mar 2021 04:29:30 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 2 Mar 2021 04:29:30 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) 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; Tue, 2 Mar 2021 04:29:29 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kl8boKy5uzmfau9UlVqLrIZezDHt9t0D68JqW8STqutT8IaPg7bOJuNou3TAwdQjsNnkbWVZRsrDXOWXRoGtuYYhBaMHY1VxxBkQFVPJbvFOcwNJaiNv1oxr2Nw0JqSruoVO70WGVLpYulUCbFKbQ6dcLKTmISq16lWHRr/B7udXb/sDamsDvURjHaza/+TlV4RJ+shPP9Gy7Fyx9YovAeNiMd42NkjkSadtSolrFmRX9c4YHY6FEk91Gose4EwGCVG4UMvN4YVTYcVWIwbE5shKVCJfQEOhVQGVLyoW4j0sGEtt3wLy2MK7dAVPtqsdGmS+USayt849DLEKmYgi7A== 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=xXzj24H3sEle+bLnuz+uIn/MNcku8Z00fjCv4n9c3I4=; b=HTVd4m15IzrK94m6SfHvDOQugIFtCv2v1JXxAf4+LwxggPyW+mL7+vbnX3bBcu2uu2ZOJUfw40XP9lMr2siQsqjlkJzauw1dSA8VWTgFrs4h2ksTIvFpOEDt60ah/4fDV42VZrtJtNjM5LRLC9+y7AR3X2cqWTgvNr88DTWAEvppAlbmwJdW16yyBcnb3j6h6GoJpWUSu2hQBo0/9s0IlHA+tdhtfWCrETZa6CGjUvVYuzW63YYSX/j5qf4CNridWA2xdbBjnzrzHeZjrV2AwALhbseWwEsUEWv2vKldE0LJjOBCuzH5yZ/6WGaWD/XfUYv+HnVuCDwra5AmdDWblQ== 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=xXzj24H3sEle+bLnuz+uIn/MNcku8Z00fjCv4n9c3I4=; b=lFFAbCqn72Wd/UBgHcAxkC2zJbq9bzy7l18RWaT5hH1ndB4f//qMWWqbYnF3lV9DVJDSpTxPZ+KPgeQsPcLb1eZon3m5vRmi81zB5xpJkmhu+Cn1W5S3ERONa7APvnaiO+OWNuGdEATmd1aui750xZMj9sOEdoemlQH2/cwa2p0= Received: from MWHPR11MB2032.namprd11.prod.outlook.com (2603:10b6:300:2b::13) by CO1PR11MB4849.namprd11.prod.outlook.com (2603:10b6:303:90::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.23; Tue, 2 Mar 2021 12:29:20 +0000 Received: from MWHPR11MB2032.namprd11.prod.outlook.com ([fe80::30c2:967:f635:def2]) by MWHPR11MB2032.namprd11.prod.outlook.com ([fe80::30c2:967:f635:def2%5]) with mapi id 15.20.3890.029; Tue, 2 Mar 2021 12:29:20 +0000 From: "Dumitrescu, Cristian" To: Matan Azrad , Li Zhang , Dekel Peled , Ori Kam , Slava Ovsiienko CC: "dev@dpdk.org" , NBU-Contact-Thomas Monjalon , Raslan Darawsheh , "mb@smartsharesystems.com" , "ajit.khaparde@broadcom.com" , "Yigit, Ferruh" , "Singh, Jasvinder" Thread-Topic: [dpdk-dev] [RFC v4 1/4] ethdev: add meter PPS profile Thread-Index: AQHXDoa2zb8ApkK+UkWjVZeNoHieI6pvHMqQgAEqKQCAAFbtcA== Date: Tue, 2 Mar 2021 12:29:20 +0000 Message-ID: References: <20210125010235.1768333-1-lizh@nvidia.com> <20210301103532.184983-1-lizh@nvidia.com> <20210301103532.184983-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.78.54.76] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 232a3184-734d-4745-5086-08d8dd76ce2b x-ms-traffictypediagnostic: CO1PR11MB4849: 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: j502RelYBgXlGODxdM3oXLO3JoqnARusWwGrU9zx8rDGedmeaNAP1TBylXnAICqZowd4L4kKlDxtRuqgAx7VgG7iJt4yLaqenHMo12oXZeQ/ybFN+VEpbGbvR5u8v1HV4d0laekRyryq/YhNJnDXUy4OChVbPKdWaBzPOq9lLhnrwOl5hN/yWm8Sd6XoDk4OlSI7B+II+sVelUKb44JhCGregQ+NrEkU3+e1GqQ9tlwPVw0bJZAQVePyeL1jfXeq/1lqqm2Yb/ZVd4LtSmr5TVCmvEpZKUrriZ6XwA85a5FeY/kSHJCTjlyeMsACyGZLU+bL8yfVnxER+MIDosMBVjKme1IF1DP7hAy+4MZPd1OntfiUzkdBX2Iz3ndqcCrbaWNxH3ADh5zc2UNlEP7zUQvhAxtnHfIVkxIl9mhmL4B4cIOCvURPoqjzavQ6XjneZzMxIKintmzl3ejKA8FvZsXy6jBuzxAagoRIu3btlKIKZjmpRI9L/qbQFr9BaGHhoOASxpZcjNuhhnvZWpLvdA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB2032.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(346002)(366004)(136003)(39860400002)(396003)(66946007)(66556008)(76116006)(64756008)(66476007)(107886003)(83380400001)(55016002)(33656002)(66446008)(2906002)(4326008)(54906003)(7416002)(86362001)(8936002)(26005)(71200400001)(9686003)(5660300002)(316002)(8676002)(110136005)(6506007)(478600001)(52536014)(186003)(7696005)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?zkFCzPJkigKroCKffOnw8Um+XmRR/PoVyax3vIwfyM5BwX71wyH6XpvENcfS?= =?us-ascii?Q?+0KRrE0eNsX92uC0o75aHcF+JCKhSRlBQyu8ue+3pCMjk0HTg9IPqwcK0LHD?= =?us-ascii?Q?iFdcSlFkTMMLctTkuDiZq4vY/Ca8eMMGGrPR0kRFO+R3b/pNXnY9zJ+5stoR?= =?us-ascii?Q?J4jRynka3p5xn6/yC2TYS44I1brESEaWjw5dAq2DFcrBwjNuYNIR9BzKVjer?= =?us-ascii?Q?Lv3CajTDsg4mQKWm9aOst5/jrsc4ZjuLYUUO176IT9/M2d02bDbbdTWaRd6O?= =?us-ascii?Q?EM6NSwYlT/pXpklUcOfjTrl8/ARfmkWz8Oht/ATZPg+LGSN4BZrN4X4HuoTc?= =?us-ascii?Q?L3jumCN1rFo5J6/DnZkIb+/FXGreX9fDdNKIJG9v6DnEgKBK6q2D56kw1Nqp?= =?us-ascii?Q?0uZMSDzziN36qJbCANavQaVk2mV194/h9QWtG0LSvudEFko56ioZX3ztmq1x?= =?us-ascii?Q?hJB4qkVA5xCZL1FglaCSctTuMTn23XcoT3s52AnWbvH6EI4r9SgK4/5c6o6Y?= =?us-ascii?Q?FVdKT229NwTBHgZrQzbls3E7woOONG9K2Azdbp833ZCsV1YIkwfWhA/BgVRj?= =?us-ascii?Q?ZvCY5QiUBIRbdo48HV2IU7AW8cCv4tqyAmPMPhxIdpSC9/5NbFByKFW9qmo7?= =?us-ascii?Q?wR496VsXe5SAMWUMgVYUmAFB1VkNeSka0DC18IvomqfGNHDX3Fq5pprY0vlH?= =?us-ascii?Q?gBrtst2j2zGmWxQonSfhUJW1D1oLesCGcNBrLxnt7GElJJ+gVfmM5uO4EKX7?= =?us-ascii?Q?UvOTpC/9QA/1uKOIY+lWRoMDzF//SfGgjmSUalAerQ5xQoPfS4SLkIESs2EL?= =?us-ascii?Q?6crAFias3CPV2tZr11UHgScLo2N2Frqz414jRamhqHPlcufLtoscWwcx4RbN?= =?us-ascii?Q?25mqR6Fbjq1iVG1JzeWVQu840Ek71GTPRjTKgqqEElsbUcX0xRx9e5cMs7Bf?= =?us-ascii?Q?3gZRjujiYbdcdkYrfQHFx1Ec9ScZukdZ9A3zKx9gshXmid7UqoIWzRLonULl?= =?us-ascii?Q?bWd+9W5dwythY+YEC8mKRf20LpYTlUpqtK7g7BIrMs4ms4sBTnj/Xz8Edy3p?= =?us-ascii?Q?uSPqEjRc+/loeDTbHZYYYnLJqSrUfv4A6mqqbFR6/ID5jCaKxtzigfMDGU9i?= =?us-ascii?Q?cGjKVOw3zJJvgx08BlcCsgrUrjbpHwKvSMNmsJyOPsSrvhptKYTXg5HBh6vN?= =?us-ascii?Q?F0Rt6/M/+uTHY8F+dA15wRaC4obeE/aYAbtHs+CI3+stzyU7NNGs5oiPvgng?= =?us-ascii?Q?diPl+GDu84NVvvrL3cLOXrLCP3xVGlah24BTwQtSKbJLyRB3cJOe+o6/TQVO?= =?us-ascii?Q?bN4=3D?= 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: MWHPR11MB2032.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 232a3184-734d-4745-5086-08d8dd76ce2b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 12:29:20.4841 (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: f8dqF8iU3NF4eDkWiDeID0/o/7TQY+FB6F2/ay25S/twZKOOTD+NrSI/hFC2d+byBTVZmuEWLBZQ4YvJIgTqQMGwB8VqGgt0iIMwaTZdEH4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4849 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC v4 1/4] ethdev: add meter PPS profile 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 Matan, > -----Original Message----- > From: Matan Azrad > Sent: Tuesday, March 2, 2021 7:02 AM > To: Dumitrescu, Cristian ; Li Zhang > ; Dekel Peled ; Ori Kam > ; Slava Ovsiienko > Cc: dev@dpdk.org; NBU-Contact-Thomas Monjalon > ; Raslan Darawsheh ; > mb@smartsharesystems.com; ajit.khaparde@broadcom.com; Yigit, Ferruh > ; Singh, Jasvinder > Subject: RE: [dpdk-dev] [RFC v4 1/4] ethdev: add meter PPS profile >=20 >=20 >=20 > Hi Cristian >=20 > Thank you for review, please see inline. >=20 > From: Dumitrescu, Cristian > > > From: dev On Behalf Of Li Zhang > > > We had this same problem earlier for the rte_tm.h API, where people > asked to > > add support for WRED and shaper rates specified in packets to the exist= ing > byte > > rate support. I am more than happy to support adding the same here, but > > please let's adopt the same solution here rather than invent a differen= t > > approach. > > > > Please refer to struct rte_tm_wred_params and struct > rte_tm_shaper_params > > from rte_tm.h: the packets vs. bytes mode is explicitly specified throu= gh > the use > > of a flag called packet_mode that is added to the WRED and shaper profi= le. > > When packet_mode is 0, the profile rates and bucket sizes are specified= in > > bytes per second and bytes, respectively; when packet_mode is not 0, th= e > > profile rates and bucket sizes are specified in packets and packets per > second, > > respectively. The same profile parameters are used, no need to invent > > additional algorithms (such as srTCM - packet mode) or profile data > structures. > > Can we do the same here, please? >=20 > This flag approach is very intuitive suggestion and it has advantages. >=20 > The main problem with the flag approach is that it breaks ABI and API. > The profile structure size is changed due to a new field - ABI breakage. > The user must initialize the flag with zero to get old behavior - API bre= akage. >=20 The rte_mtr API is experimental, all the API functions are correctly marked= with __rte_experimental in rte_mtr.h file, so we can safely change the API= and the ABI breakage is not applicable here. Therefore, this problem does = not exist, correct? > I don't see issues with Li suggestion, Do you think Li suggestion has cri= tical > issues? It is probably better to keep the rte_mtr and the rte_tm APIs aligned, it s= implifies the code maintenance and improves the user experience, which alwa= ys pays off in the long run. Both APIs configure token buckets in either pa= cket mode or byte mode, and it is desirable to have them work in the same w= ay. Also, I think we should avoid duplicating configuration data structures= for to support essentially the same algorithms (such as srTCM or trTCM) if= we can. The flag proposal is actually reducing the amount of work that you guys nee= d to do to implement your proposal. There is no negative impact to your pro= posal and no big change, right? >=20 > > This is a quick summary of the required API changes to add support for = the > > packet mode, they are minimal: > > a) Introduce the packet_mode flag in the profile parameters data > structure. > > b) Change the description (comment) of the rate and bucket size > parameters in > > the meter profile parameters data structures to reflect that their valu= es > > represents either bytes or packets, depending on the value of the new f= lag > > packet_mode from the same structure. > > c) Add the relevant capabilities: just search for "packet" in the rte_t= m.h > > capabilities data structures and apply the same to the rte_mtr.h > capabilities, > > when applicable. >=20 > > Regards, > > Cristian Regards, Cristian