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 4CBB5A054F; Tue, 2 Mar 2021 08:02:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7127A4014E; Tue, 2 Mar 2021 08:02:42 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by mails.dpdk.org (Postfix) with ESMTP id 065D140142 for ; Tue, 2 Mar 2021 08:02:39 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 01 Mar 2021 23:02:39 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 01 Mar 2021 23:02:39 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 01 Mar 2021 23:02:39 -0800 Received: from HKMAIL101.nvidia.com (10.18.16.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 07:02:38 +0000 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 07:02:31 +0000 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Tue, 2 Mar 2021 07:02:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MunCATRFeDbvECDDQbJ2peZY0eJrzceo8p+DDY5ApXQI6oF8ivzbmAO60Y9wbgo//W1QA0RHcg1RTnPHcpy3L30vGdao4Lvb6Ss/Du9wmm6gZfhjFoOXeeQRVeeelzVrf8iHfPp0pFHcEUdVf32USs/XnMvnOB4O7EGSp8pk9eAUn9hy2JIdBGmtVmCIdFZC/Cr3j1yPZ3EwhMNv/H+S7GvccM8+CjTuo2vXKjGcjLxM2WEz8CvAr3ZXjbudcVH54/5Qu7scbGtI68cyeSyDvzki6hY5iUSwn6u09p7rhaRxeckL4H0vXU12gHlPRYhqrRNqhL2BqHgdZPy1YNH09g== 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=G24qT7Gpgc1M2ozUwcuxxyPn6IGNbt6pTn9HMz+zneU=; b=aYU1o5qrLMyJCdn3Lpfd5uv8XNy4KBg2Hg0OH8T+CwCM16CixAq0hgj480ADdtQWqE5mLHNIhs2QWpUkTCkV1ddBAAn2DXQKAt4Y9d+OyX2rqFId1VSFlBnsjj8Hqr2PA+RJ6/ES4vaGdKvRCosFL6+0ZdQ9bTBuX7NaduIfoiLQ/ejueQxh6Q88O0yPjPROMffkETEMIajdfpowXbC8vbrdlg734nN+3NWLdCA8Z6iyOEp4BgPNsWzr2dnMR1Kj/oqURP5CrBD5M+1K8JTRx4CY9+VLucs7I7SxV54fZTvtGfVnRiQli0F8/nUVTB6NIIZtEXoMxC6HqTo9IlqojQ== 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 Received: from MW2PR12MB2492.namprd12.prod.outlook.com (2603:10b6:907:8::19) by MWHPR12MB1533.namprd12.prod.outlook.com (2603:10b6:301:f::8) 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 07:02:27 +0000 Received: from MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::99f2:8567:2f9e:c351]) by MW2PR12MB2492.namprd12.prod.outlook.com ([fe80::99f2:8567:2f9e:c351%4]) with mapi id 15.20.3890.028; Tue, 2 Mar 2021 07:02:27 +0000 From: Matan Azrad 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" Thread-Topic: [dpdk-dev] [RFC v4 1/4] ethdev: add meter PPS profile Thread-Index: AQHXDoaku6PLW53KtUOtQaDT1ovmy6pvHh4AgAEiL2A= Date: Tue, 2 Mar 2021 07:02:26 +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: 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: [216.228.117.191] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ae666b54-78df-4183-6b14-08d8dd49237b x-ms-traffictypediagnostic: MWHPR12MB1533: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-header: ProcessedBy-CMR-outbound x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SRWQYNzbo3pmbi1UC56wD13/XL7YTeAofL/1/CnaATUzx/+46l4Zrm0Q5QByhN2RSwQJzjGvBmrWXetp0Bi4MUbK2XAi3WnEPuUj/Jts2jHuG3Z4zAxa8JnCpPBXNWgzM0rqNQJpVj7vpEAtdcL6lDoCPE6iZfyZ6KLXA1CFNEpDQmb2E/flL9kgSY9Rq1n8YbMTSIp5FMzLOuJInGDqCNGAjgzTY9g3OsfN9p2vlEEm+jkBJDHRnWjgk3POPk+N5HEETko8F0NiytY7oeL6Z7g60yDJRqAlfjLiDQ3hmgn/9TcYKtD9PxTvylHMkp4E5dDFFIuHiG4gDeIWJ36CXFKMwDNUNPqLlf+FPJzOKWm7O/UEW9g2zxwXDLgcg154W5QzkWaLNDiawpljM3bXGnAVNePOukuDB1FYYKOD0r1ZJVTdVzFGwxCb2emP4IuUuPFBRadF8rNfTDqHm/DVdXPKY8f364Y0DUz6AFRgVXdzHFghh22Zju/g1UgluUoL/gR2GqciatOTwsmYNDWC3Q== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2492.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(396003)(39860400002)(376002)(66946007)(66556008)(5660300002)(76116006)(64756008)(66476007)(7696005)(66446008)(4326008)(8936002)(6636002)(86362001)(9686003)(71200400001)(52536014)(316002)(55016002)(2906002)(54906003)(8676002)(6506007)(478600001)(33656002)(186003)(26005)(110136005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?rV4vt5mMC3Fdl9u6u1PeIVfEP3ekGoZKHpRMibGFxaE55XMOFU9SLD8LKKH4?= =?us-ascii?Q?OKcwKUNyqpg640FS9GIOsOSLifLCRgd0aQ4EiKAe7Ei0dEHNAhrxWkZlaZHr?= =?us-ascii?Q?yr4gs4d1x+InsPDHcyNa8oSCUYy7g8zjH0c1PoCh6IxHEgl7JeoOeQ7Zr26u?= =?us-ascii?Q?AFhtjJnrSOhvvkdhZ326Jpm0TcAj9lSElQT6yeEVFotC4LAFNmeYh/+NS4Sk?= =?us-ascii?Q?WzGCKC+Ihc/41gJdUzkwXoOFqxrrM8+LHH5nwdNYphYICUNUkGXNH2BQmDmv?= =?us-ascii?Q?El9Uqjyas+XFHykIjVgHXq0pCbRuigEaB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H46FIbbaOvvuqjCUxoj3w6/HA9T/4Vfbv2n3IwVOHunbnlfbAB7R1c?= =?us-ascii?Q?aklLwmoJNoEkCYKH22ffICuCmEbLb29ZekYqQ0BhT+rnZXDEp5qV58Usoeis?= =?us-ascii?Q?u2ovI+G2UT1PVqSAEZ7z01Lw?= 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: MW2PR12MB2492.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae666b54-78df-4183-6b14-08d8dd49237b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 07:02:26.9198 (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: y0NEWpD5c2H/3RED8EdcS2G0kXlLaEWeUwrA90EKfeygIkZ5afKKOpNxMA934uLrXxPIO3lCsWHtClgL2Ukwqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1533 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614668559; bh=G24qT7Gpgc1M2ozUwcuxxyPn6IGNbt6pTn9HMz+zneU=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs:x-header: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=WUaZjp3D8SMuF0hxTHHEBafRx/aE3WOww6rBEJCnrmKGVhey6s9MWra2xIQLpb1+W L2E+JwADAKqjLrGdu0W6i8UTyNYByNBu0Ng38Z8zCAzaiEtOO3gtEvxR1U8A6alUU5 3i4sdkO9ZOmxfRPyyw12M7xr4dURSWduHgzH8t7PRE6mZub/6cwrL0Z3ZKVFluYomW YflbMckxPyNniMb2W+wTVPrF0S4OhYH8b9bkA2bhHKAg8twD3RSErSJYM8M6f/q6CB 2o/yGsPGXm5ONPNBawB6hqPljoH+RcUSAW5hvLdKWAv5KKJlQmmkV7NH8O22lAx/Or JKtIv1c4BqXFg== 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 Cristian Thank you for review, please see inline. 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 existin= g 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 different > approach. >=20 > 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 through= the use > of a flag called packet_mode that is added to the WRED and shaper profile= . > When packet_mode is 0, the profile rates and bucket sizes are specified i= n > bytes per second and bytes, respectively; when packet_mode is not 0, the > profile rates and bucket sizes are specified in packets and packets per s= econd, > respectively. The same profile parameters are used, no need to invent > additional algorithms (such as srTCM - packet mode) or profile data struc= tures. > Can we do the same here, please? This flag approach is very intuitive suggestion and it has advantages. 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 break= age.=20 =20 I don't see issues with Li suggestion, Do you think Li suggestion has criti= cal issues? > This is a quick summary of the required API changes to add support for th= e > packet mode, they are minimal: > a) Introduce the packet_mode flag in the profile parameters data structur= e. > b) Change the description (comment) of the rate and bucket size parameter= s in > the meter profile parameters data structures to reflect that their values > represents either bytes or packets, depending on the value of the new fla= g > packet_mode from the same structure. > c) Add the relevant capabilities: just search for "packet" in the rte_tm.= h > capabilities data structures and apply the same to the rte_mtr.h capabili= ties, > when applicable. =20 > Regards, > Cristian