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 0E29DA0032 for ; Fri, 18 Feb 2022 13:45:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 026E640141; Fri, 18 Feb 2022 13:45:38 +0100 (CET) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mails.dpdk.org (Postfix) with ESMTP id 635CE40141 for ; Fri, 18 Feb 2022 13:45:36 +0100 (CET) Received: by mail-ej1-f52.google.com with SMTP id a23so14798895eju.3 for ; Fri, 18 Feb 2022 04:45:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J7+bkP02SVYmNaEMx7WqUrWJT5Kpc94QTiNCfkCzwbM=; b=qy1BeD38KjDkcSvrgfJzB6+4/PBsHOVNz7iJFYuyWLpYOBhettC7AyfISzJ/rrjXGc Vy90aY3l8+6UlRjDlSNgYJSQz+nETu2Y+H93Et99iXv2tOMo76OhHn7ZL/+N6340D+Lv bCKgahyOzK6fQlxAih9Yaa2aN//RjdSjiAQ69+ektpl43iIRCov96FyjguzHOzUNDaEM yYr4bDn02Xw3wzmnGJWPIfhrYUD4Cyclh4SAht6/o1/II6fFywe4mtCRGaYVS2P5ts2R f4JBAZCdzaCetco5pRGz/MjTD+7XMAYGrPPbhN0kgr4YNANyh7C0A4I8Cc28Nm5DFpu5 n8xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J7+bkP02SVYmNaEMx7WqUrWJT5Kpc94QTiNCfkCzwbM=; b=y2RI2jd8euflt8oTPEabC8Cw+rIoYu8oc1ei6mcCWQaS6MFOIzLgF8xVHBWLp78t6u i8dyAS7uIS2OVs6fKql5CJTd2yn8AhtMgikiaNkPnDE6sKmGSFg4TMjBWsMJOY6IyPfg cJtayLdDKTqSKZi05ncPjPniiVf3tyogyugHD0+ZBUJfPFChp0wvzmQ0b77G+39SUeLK be5A8MEbgTkebLDn4jTu3ZPTRZCO0wI58JJ1V7yg66x+KIYY8qotx3/jFUnXuh1nrdkH P5wQfhxeSP42GgSwsZTaeC1OneJ20qHD2/To3vqith2wPsUlfUzIHHH3sKcM6Cv+C1fS nD+w== X-Gm-Message-State: AOAM530GBfvEKBuoUFCTVJQnSJuMzy9TLioPtwYgp8zrawzPphQ1a0z/ eN/wQLYWLrJdt+tqH+9sqoA//G9tJbZPryOm X-Google-Smtp-Source: ABdhPJzmgpGjQA/CtN0+j4LhofLhQaggd53YFHqjneJ+mBKwXHDVy505es7eRIWhgV8CKIbWde+F2w== X-Received: by 2002:a17:906:9708:b0:6ce:7115:663a with SMTP id k8-20020a170906970800b006ce7115663amr6200614ejx.223.1645188336066; Fri, 18 Feb 2022 04:45:36 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id f22sm2241907ejl.46.2022.02.18.04.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:45:35 -0800 (PST) From: luca.boccassi@gmail.com To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix committed bucket size' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:39:25 +0000 Message-Id: <20220218123931.1749595-116-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c45f526d8a32573d326ac0eb77a8625f1ed8ffe6 Thanks. Luca Boccassi --- >From c45f526d8a32573d326ac0eb77a8625f1ed8ffe6 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 acaca240d0..058d94c9cf 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -216,8 +216,10 @@ 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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:42.201244186 +0000 +++ 0116-net-mlx5-fix-committed-bucket-size.patch 2022-02-18 12:37:37.870795940 +0000 @@ -1 +1 @@ -From 21fdeab422e0edabc6b738f7a0c56dec7e9c374e Mon Sep 17 00:00:00 2001 +From c45f526d8a32573d326ac0eb77a8625f1ed8ffe6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 21fdeab422e0edabc6b738f7a0c56dec7e9c374e ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 0dc7fbfb32..d0f8bcd100 100644 +index acaca240d0..058d94c9cf 100644 @@ -27 +28 @@ -@@ -295,8 +295,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp) +@@ -216,8 +216,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp)