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 BC6FBA0C56; Thu, 29 Jul 2021 22:06:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59AD840687; Thu, 29 Jul 2021 22:06:49 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2058.outbound.protection.outlook.com [40.107.236.58]) by mails.dpdk.org (Postfix) with ESMTP id 6E72F4067A for ; Thu, 29 Jul 2021 22:06:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQeHZ35VbijmMvnMclmDnidpZQci08ckx/0ISOyDk4/3ygXcBDi51GDxAnIKOGkppOPl3+EVHx0pItDw2ZI8EsoF6wP5kbJQw+68xwQSgEDQqJruOzxVQrhRJyl4g5NMb5mOB9AH1tUNkDHFzyzuGzB9SmXldtrhBeEzy/ThT626/uFc98iyOK76om0noe7P553fIKBstnykT09smWjyTg1UeC9JnIrI84SOvD2Ctd4dIcUljerlm/0Ox9Bmm+hi7QcfhNvguGGvUwt/153+mfm8J3XWz6y8Io3wCcIdp8XRxQJQN9PxLjtwUg/4EoUz8XrubTKJfHKX0OLTzINbYg== 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=8OXVaDFqCOkEeg5qo1TAZSbEmgT89s6vEKpzWLHnnus=; b=V7Favz0A0H4uy3xTNNvMWLbu7tJQpALjNB5CzkmjXdj/O2zGCO5tNsvKWzzgWyWYn2yPVR7NDj9OQo6zv9Cbw0sXmP/NmdlFUoLa09yT4h+uoAIhyA5xNeGvrZcs4x1fB9vYlrsTppSvLaEjQp1Z1vazKummdjmPW4nlN5T4qhZuAapjgKhxxa7d7rSYDY9Ry2A5dA647JKHnvFGc7F1kutDchQwXj710lL411qFpZr9xqbMjZcvJHo42017JJc7wPVTf1C/91WBWoSICQCyUMtEeX6cbTXr7DKadfwJ9+IsQYbCAUxrKF5uBUiTbDBqjyNP8WsQ+yiygCtLGPNBzQ== 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=8OXVaDFqCOkEeg5qo1TAZSbEmgT89s6vEKpzWLHnnus=; b=o2KacXIZC7Ka0xyCXm03zdrKyE/EThNdrJlDCGJV2Qf6+267uo+8Qnvuo15WgthlpA2AGvcP0F96LpXuWIn1Olf6mremC15Mzedy08+flDP68lMNC7hLz6bQ0UA+ge9tCR41uDU78uhCxb/yxU3+d1pNboTJxbLPDAqP8zbgS9zH+JDFzO5gP/bYQa6KEr8ssuO8Ngni2h3K3n+304yuGbLuUAM0XjFbaMYS006OLoXMX+Yq43Kb1lWSoCEeRyw/YA+pooWt7EBGQUnNj+jes1kpx+GVL0c1QgZNVkvPAaL5zaZCdl0Pk5XdgO/1RCvJEuvN3uAOr9Llu6T9fJFQHQ== Received: from DM4PR12MB5054.namprd12.prod.outlook.com (2603:10b6:5:389::24) by DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Thu, 29 Jul 2021 20:06:47 +0000 Received: from DM4PR12MB5054.namprd12.prod.outlook.com ([fe80::584f:2720:1100:666a]) by DM4PR12MB5054.namprd12.prod.outlook.com ([fe80::584f:2720:1100:666a%4]) with mapi id 15.20.4373.022; Thu, 29 Jul 2021 20:06:47 +0000 From: Raslan Darawsheh To: Bing Zhao , Slava Ovsiienko , Matan Azrad CC: "dev@dpdk.org" , Ori Kam , NBU-Contact-Thomas Monjalon Thread-Topic: [PATCH] net/mlx5: fix the EIR calculation Thread-Index: AQHXhJN3bFT+C+afq0WiMdOwmx4Zj6taYNSA Date: Thu, 29 Jul 2021 20:06:47 +0000 Message-ID: References: <20210729160405.161982-1-bingz@nvidia.com> <20210729160405.161982-2-bingz@nvidia.com> In-Reply-To: <20210729160405.161982-2-bingz@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b6c6c41f-b605-4d6d-cff1-08d952cc6529 x-ms-traffictypediagnostic: DM8PR12MB5445: 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:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LscpCKTSvyBgaKWmFzCdYNTpjQa84nMP9sBRnz7BV1b0jYv8dIyHoLcAdqwKNmOy36j6QXXljh8V3UFNfkLdxoPeehUwKMhchZLnIU8WM6SWrFtUjU+XY5TLECeGJuLuYcflWgc7hMS+E4jus06sZo/AY8VbgoUhM3gjkffrPpGGb6f3GyX36N5wawFKzczsrsnFpPRewPDjOaQltc17O4tFjtbWbcinW7638Mi9CACENrK23xu9WYMyjiQZhoRlBrPKE7G3vTe4Y0g+UJPtDShH2El3tV8ztJUxHQ2JyXClQPOgRFzj7n7JUnCL6zl7+4kB5q4LUt80WxuWyf+jmFBLmTLPaOJ1Biz8ZDDMbema4g4LQLFDcTCmFc8nr+2o5xNd6b0vUreas9X0y2ZHjDfIzRO0Kx2FSg1UsBWQz/vdHj7UGtTbpNvbAXIq8084gGDPodmS4r5DqsapBxaXUplC3+Bu3mLn1vT6PR+r/9uOJ30xYVxCH4XcRXnkh0pRjA8NyrVA9ioizJqkuhuiUbhiCHnRLiSbkp/nkHt0/EksAvR3ciGVVs38JEjoCPXIoKwBQks8lQNcbp/MSG9f4Wz66qLAZIj04bv4yss9Mrsn0LyiHyGNCtD2oXk7BVh+u5xk0yKvogVdgceh3Jkb/eEY95FVEATKv5UigalD4pgryq32VS+dxiuMG/z3gyfpviQztrEHlfq0mdqMPwRm0A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5054.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(136003)(396003)(376002)(346002)(38070700005)(4326008)(9686003)(52536014)(6636002)(122000001)(7696005)(55016002)(8936002)(478600001)(86362001)(54906003)(26005)(2906002)(33656002)(6506007)(53546011)(186003)(66476007)(316002)(66946007)(8676002)(5660300002)(64756008)(66446008)(83380400001)(71200400001)(110136005)(38100700002)(66556008)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MU1brQDqrnC6B1A7XjldELtuEsEigkcwP2ktsSWBb6P9GKifaA2/TSaD05Pi?= =?us-ascii?Q?4uhvSQbX21BXVmdAf7BX+P8I5wvLLNV4tnTUYexwuTFWtXqI4mMbmXwheIDX?= =?us-ascii?Q?ppaG/tJQkVzGYji9ygcdg62GD+DFl57zWdhc7VqqnYvpjnkruLsdAWTNYZFQ?= =?us-ascii?Q?EuJMZE61oYG8ObwfB6FGoHwXXhkeFcTdKS8o3spqQgPPXTRELTT4pA8ebTEk?= =?us-ascii?Q?Tpyhfy23r9myETV9ZYi1K2X0MdpsruSlKIGMWMExdmo2HhuCnYfpQicD0Tl9?= =?us-ascii?Q?QJQOwQpV2s76PWbXKof8Sr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znH2?= =?us-ascii?Q?yNx1PBPXDufGnDs9lTMeZaXy+Hr6QSd20woZ4UPRSEv7SL+mVngAjkV5iq0E?= =?us-ascii?Q?J7OaORRTh28dE5Pq90IQ4DK5HOnlRR5nthywmrOMOELquEX6NSHbVuSb1uiU?= =?us-ascii?Q?xDL+9ZvsWyvUfUy3oP+NAPd1?= 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: DM4PR12MB5054.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6c6c41f-b605-4d6d-cff1-08d952cc6529 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2021 20:06:47.2426 (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: nVGwRfV/oHonVUvfrjCVag4JCospZ7wT+VHx9a6qN3TKaqR7GGDZMFquGIoj8zpM82uSU0IyIUR+YHGI+90U8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5445 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix the EIR calculation 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, > -----Original Message----- > From: Bing Zhao > Sent: Thursday, July 29, 2021 7:04 PM > To: Slava Ovsiienko ; Matan Azrad > > Cc: dev@dpdk.org; Ori Kam ; Raslan Darawsheh > ; NBU-Contact-Thomas Monjalon > > Subject: [PATCH] net/mlx5: fix the EIR calculation >=20 > Before the yellow color policy was supported, the only supported profile = of > metering is RFC2697 and EIR is not part of the profile. > When creating a meter with this profile, the EIR part was always zero. >=20 > After the yellow color policy supported and RFC2698 & 4115 support was > introduced, EIR is relevant and should be calculated. Usually the EIR cou= ld not > be zero and the formula for calculating CIR mantissa & exponent could be > reused. >=20 > The EIR could be 0 and then only green and red colors will be supported f= rom > the specification. Both the mantissa and exponent parts should be set to = 0. > Currently, the formula wrongly sets non-zero values for the EIR=3D0 case. >=20 > Setting the mantissa and the exponent parts to zeros when EIR is 0 will s= olve > the issue. >=20 > Fixes: 33a7493c8df8 ("net/mlx5: support meter for trTCM profiles") >=20 > Signed-off-by: Bing Zhao > Acked-by: Matan Azrad > --- > drivers/net/mlx5/mlx5_flow_meter.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) >=20 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh