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 569AAA054F; Tue, 2 Mar 2021 13:37:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8A284014E; Tue, 2 Mar 2021 13:37:20 +0100 (CET) Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mails.dpdk.org (Postfix) with ESMTP id 20EB140142 for ; Tue, 2 Mar 2021 13:37:18 +0100 (CET) Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 02 Mar 2021 04:37:18 -0800 Received: from HQMAIL105.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 02 Mar 2021 04:37:18 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 02 Mar 2021 04:37:18 -0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 12:37:17 +0000 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 2 Mar 2021 12:37:06 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.53) 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 12:37:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S28BBC01jVYzxiGBvFjHNxNC/0/1lP8UdU7ucQYX2fVIq9acZ4iEcwT+78sXs4vyIfsIXJCjfIH8tLaEZNwB+lnBpvOvNPT00ioACBhgXsAUdjt9Y7gOQYddLbsCt6ZOIPDM7RqXiSux3P7pp3HDBjSC9JkU1OAsKkPT42Y/bdI14JRiiivIeUjcMt68qbNUqn7NG7tO6xNLTDHYJH8zTzSywBSxeK+URh0ca+GmdWlCuTY5a/+NwOTaDEwxuOUcUglgkPnuk2fEoizHaPoX+TSfCNUcvakA1HgVqedMWhihAEUl4DGIDVd+9So13uOmL0KcbzcOtxkKvdOumIQ98w== 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=zd9Bs0BTw7RmFtLFtzrrIZi8RKlHsb7ZKoGr5MNLYBw=; b=RmQbBYMYQSXSg/Yg09666LlBb/VgZJnaPGMK1yclVw6BCux2zuqfXdIj3Hocqga7x7mmNVrt/T/xUcSmxUgheja3a/bUvwcw7+K7GjtkQobACE3tSHT49MkpMufp+eIivTgvMyiBFeCpDgFu5gVl7g+FCdZ18xO3vR0lXxQYOj/Q0rw1H7Kij0+V6C7I6fZrLVH16+vz5a1dj2O/sYIgIbNWBxzEvKqsYJB1pVEIZ9RDg1OSiH0L0Qql1Hx7/4VfX0vp4GfYfN1Dv7QoyudFum3zSjv5TvnMzWv0Us91JNaI6JXuHEz54TB59GMr3QQ94zZnJqULjcB3RfNxzQMu+w== 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 MW3PR12MB4458.namprd12.prod.outlook.com (2603:10b6:303:5d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.24; Tue, 2 Mar 2021 12:37:04 +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 12:37:04 +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: AQHXDoaku6PLW53KtUOtQaDT1ovmy6pvHh4AgAEiL2CAAGH8AIAAAHAw Date: Tue, 2 Mar 2021 12:37:04 +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: c6443e9a-6f42-4ddc-5f9c-08d8dd77e26f x-ms-traffictypediagnostic: MW3PR12MB4458: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9tE7DRFeiM+7LcfUsPoEmuJerAeXh5F1PNquI1OpNdvSjvoB3a2Qu8hbZcgXsQLGi9HwviFvvM7QDNNJR8U8dSsY7lTJJ19tqHiSpVraWnl2CFu14vOz7BlX3I/zatcEzzCmmRuJ6o0Vd+Q01rpIQKrUfjBmeisOapE3S3oum6HS0djmg7LWbQ4dO42ZcRYLKETrLHG9eFgaiHR9qV0jLLYcOY2R/UI+kZz+PjWjM0rwwEkzg/NkWXFs7XQNywdkeWemLUZRrwOAiUf2dYhq9LI0bPpXhTvfdPIu5qkpSVwsULLPTdIJ7H0zkpF1WQCy3u/tMJQ6sa5bYbW05jbeeHRaSzz2vkoVnzGWCTzhkZYwIljbxzjj6crXmnps7fQD6Ay0/N2j9a5V+X8du1QlDceO8DOpHbybLlC8/p7BbRClhc9dWDgc/7jcq5ZkqDJVKDu9gOqnsCdv8xON5/f11vO+buZkc51nwQv148E8MIzCTatCWltoxEabx70/avAh0dpkgO4eJe5KQB6Q/bu9gw== 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)(396003)(136003)(39860400002)(366004)(346002)(376002)(8676002)(8936002)(52536014)(316002)(2906002)(110136005)(54906003)(76116006)(6506007)(4326008)(53546011)(55016002)(71200400001)(33656002)(66446008)(26005)(186003)(64756008)(66476007)(6636002)(7696005)(66946007)(5660300002)(83380400001)(9686003)(86362001)(66556008)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?iJIQ3bXGKSCgFV9BGL9J9Ms93U/xaB/k6BxO7ZlMeVP++dzlUoeY202oXiWc?= =?us-ascii?Q?L2fN8bZK48GURT9Ah/CqwVm/xZCUPIn9gbI9UDdnTI1bkft5Y8u/9u/PbRjR?= =?us-ascii?Q?R4/r5h0NvfC/I+L33yd9ki0tTFXT+rx1i8OtAj/QppNa8CRD7f0dY9Vx+C07?= =?us-ascii?Q?X5T0TFLEYf3OlR+586YPGfxDbMp2Z+Oyu72w/NVF7ZkuSGVtmGjdR9eNkzzE?= =?us-ascii?Q?PbXQGeBshpexd+d5EZOlyVhakYxXWH02W7LV/I+ILHqQp0K0ABPuQDeo0yC7?= =?us-ascii?Q?83Ec7xXiHQDekBeZj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qaqehCoy8eNNHnRHP?= =?us-ascii?Q?IjZ0crMbptyCP2Zypyt2AQxMq4w5l+iqoy38zdtY2IBLXUaEtkmsNbDqmG+x?= =?us-ascii?Q?Xaw/NCpnANG05XqqiVyvuAGJfGkG9dY2AfxUouUA6RW2YkUz/zXP+ydnCdTu?= =?us-ascii?Q?A0h3yMdT/v0+P8vcaGIwLNe1?= 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: c6443e9a-6f42-4ddc-5f9c-08d8dd77e26f X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2021 12:37:04.0992 (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: YhtlDMKAjFCBsqX96PIpKyF2ogupZSumYufvfQoJbjjjzPsS2mqYr74BZv/VpddXFYB+tEmJNgTHyYs1ojWpyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4458 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614688638; bh=zd9Bs0BTw7RmFtLFtzrrIZi8RKlHsb7ZKoGr5MNLYBw=; 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=dhaLl8RHtoy9FN6ylcTMekovaHqE71PIwG7xz13ve2la40+4V7f8kdqnqkQcNNXck Mtm0B+kszrM545wDbeO3tI8VemOJOGytZA2aikojx5b81r8mQ+d/qdLKaQl0rQsWS0 er6VVGlttj8u87tPVL/Rh5obQVgCbm/ahAyfrPMwWjRd7dxJxJi7NMbZFmIANBFzHz ZNW2vvog1Ef3Xl2kiJntDmiS1C8vxFl3cTAbmcdGZybvOgozFsbK6M6LrwtqebF5JZ haWM8UiLW/BWLF4SMA03nTK/GOnNHm0ixtcrutyeMaVONziV9oqqm3D4iHY3yvnOeR 5zSl/+rTsWIaQ== 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 From: Dumitrescu, Cristian > Hi Matan, >=20 > > -----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 > > > > > > > > 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 > > > existing > > 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. > > > > > > 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 pro= file. > > > 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, the 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? > > > > 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 b= reakage. > > >=20 > The rte_mtr API is experimental, all the API functions are correctly mark= ed > with __rte_experimental in rte_mtr.h file, so we can safely change the AP= I and > the ABI breakage is not applicable here. Therefore, this problem does not= exist, > correct? Yes, but still meter is not new API and I know that a lot of user uses it f= or a long time. Forcing them to change while we have good solution that don't force it, loo= ks me problematic. =20 > > I don't see issues with Li suggestion, Do you think Li suggestion has > > critical issues? >=20 > It is probably better to keep the rte_mtr and the rte_tm APIs aligned, it > simplifies the code maintenance and improves the user experience, which > always pays off in the long run. Both APIs configure token buckets in eit= her > packet mode or byte mode, and it is desirable to have them work in the sa= me > way. Also, I think we should avoid duplicating configuration data structu= res for > to support essentially the same algorithms (such as srTCM or trTCM) if we= can. >=20 Yes, but I don't think this motivation is critical. > The flag proposal is actually reducing the amount of work that you guys n= eed to > do to implement your proposal. There is no negative impact to your propos= al > and no big change, right? Yes you right, but the implementation effect is not our concern.=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 > > > values represents either bytes or packets, depending on the value of > > > the new flag 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 > > capabilities, > > > when applicable. > > > > > Regards, > > > Cristian >=20 > Regards, > Cristian