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 D1822A0351 for ; Mon, 21 Feb 2022 16:43:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE3D4410F2; Mon, 21 Feb 2022 16:43:04 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id A5FDB410E0 for ; Mon, 21 Feb 2022 16:43:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gE1rpf14vZPNK9BlPfn6q1+d+2hxvIvaGrvhr45mUA8=; b=Q+YXOgqPu/3FWNT+C0X2U3epGb7pHZs63L2fxckF63ceBZ4F0jrlUY0WJrNSw6Pb7Cg9gP N7+/53pLPYzaFHjEZHPaRD30eq22wkw19EF1qGra6WTLT/zKss82fg9X3DksFIxaJnz0Ti ZjZHETh6GKt5exRIYV2SEpB4Xi01JEQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-640-GL4g10TFM1eznM6WvndQyg-1; Mon, 21 Feb 2022 10:43:00 -0500 X-MC-Unique: GL4g10TFM1eznM6WvndQyg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1B3F11853026; Mon, 21 Feb 2022 15:42:59 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 132597E2E8; Mon, 21 Feb 2022 15:42:57 +0000 (UTC) From: Kevin Traynor To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix committed bucket size' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:36:03 +0000 Message-Id: <20220221153625.152324-174-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/26/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6022babd1dad53fae4b9ddf9d6038e983cf5559c Thanks. Kevin --- >From 6022babd1dad53fae4b9ddf9d6038e983cf5559c Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Mon, 7 Feb 2022 15:28:40 +0200 Subject: [PATCH] net/mlx5: fix committed bucket size [ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ] Committed Bucket Size calculation tries to fit into 8-bit wide mantissa field by setting 256 as a maximum value for it. To compensate for this increase in the mantissa value the exponent value has to be reduced by 8. But it gives a negative exponent value for CBS less than 128. And negative exponent value is not supported by the NIC. Adjust CSB calculation only for values bigger than 128 to allow both small and big bucket sizes. Fixes: 3bd26b23cefc ("net/mlx5: support meter profile operations") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_flow_meter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c index 0dc7fbfb32..d0f8bcd100 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -296,6 +296,8 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp) /* xbs = xbs_mantissa * 2^xbs_exponent */ _man = frexp(xbs, &_exp); - _man = _man * pow(2, MLX5_MAN_WIDTH); - _exp = _exp - MLX5_MAN_WIDTH; + if (_exp >= MLX5_MAN_WIDTH) { + _man = _man * pow(2, MLX5_MAN_WIDTH); + _exp = _exp - MLX5_MAN_WIDTH; + } *man = (uint8_t)ceil(_man); *exp = _exp; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:48.318767656 +0000 +++ 0174-net-mlx5-fix-committed-bucket-size.patch 2022-02-21 15:22:44.346704700 +0000 @@ -1 +1 @@ -From 21fdeab422e0edabc6b738f7a0c56dec7e9c374e Mon Sep 17 00:00:00 2001 +From 6022babd1dad53fae4b9ddf9d6038e983cf5559c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org