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 24581A034C for ; Fri, 25 Feb 2022 18:18:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 124ED41153; Fri, 25 Feb 2022 18:18:28 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 8589C41150 for ; Fri, 25 Feb 2022 18:18:26 +0100 (CET) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 677263F1F3 for ; Fri, 25 Feb 2022 17:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809506; bh=RZU5pQdW3js83emCKKl9rhmvLRPC3msusUsGFZ4JlEs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Jn3aazubvjiyvNXYP51OPeWTNaBD1ZEqW/wy+zn7ePpfC+7pC8SV1KskU7cCqfSWC Lq++L9n/lN8NGWVm5acXHIk9CHB1phJfSw4xQFMmTSU7K20bgsiZQqiM3+C/cwjRoH XLkK1girWP3NmqP2geWi3OZzXEqiJaBl0aze6XZlwn9iu7SN7s/+H3l2nHpFTnpa6Q YzaVmuKMAIeHYJhk32VwPCNLNvmNVsCFLA+VF1F9tvPNJRD5Ga+PbpPMhX/f1zxrT5 BCLrTTBZ2ou8N3y9JK1EmdjbhGBm1xKjS8z0h05+G7G+zlxSbC1fT7WIwKWwoSLiHf 9NjCI+JxqdlgQ== Received: by mail-wr1-f71.google.com with SMTP id c5-20020adffb05000000b001edbbefe96dso1100351wrr.8 for ; Fri, 25 Feb 2022 09:18:26 -0800 (PST) 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=RZU5pQdW3js83emCKKl9rhmvLRPC3msusUsGFZ4JlEs=; b=GjPCLbACIiFSpZULzFwf5VSWFey3hiDr1XqmDX+ecmoNiSCv+m2i/p+U9o/QiZd3GH aAiR/WwTXFrcyFkmQFaWkCA+LOCDnzHFN+qAo9pSSgp9QM/5BDkxcN1ljt/+cvoz47Xk 728nhBWcKuVbKB18J+orKJbWn4KTFf1xIun+mI/33Zq7VIdAzjQtjHtDABg51kEkF4wU TdHTIDz1fBHsisJDHORuYgwHFmQsBgglszSjBOGt9TB9lykmJSVYSqqwU7EasF0zjuwP ds4PS6jV9oi7Wg/ftfC0NDCWjUGn516c8J/hcTyUyREVbdo8UhwBlMZfbfi5p8wu/kfv BZvA== X-Gm-Message-State: AOAM532FgwIxh3NbaFUqZK+K5pOrYNJP7oy/eoym/40xhQoTwacAdNTd oWqtufuCwrxb4m30X6geihw2ee/uo6PDncQDOYTTunHcwnIBGdiU7nWGU/UmgBBe2PXiqH36V0G +cfT8cZ+H94i2KelWwkt13Ii/ X-Received: by 2002:a5d:64ac:0:b0:1e7:1415:2548 with SMTP id m12-20020a5d64ac000000b001e714152548mr6960009wrp.267.1645809506008; Fri, 25 Feb 2022 09:18:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvGIXmpfXtR9YGYL1j11o4uyNVmmPJc99/iqNW0fO+9v0W4RIP6tGxa5lYUg9E52gcntBx5A== X-Received: by 2002:a5d:64ac:0:b0:1e7:1415:2548 with SMTP id m12-20020a5d64ac000000b001e714152548mr6959985wrp.267.1645809505744; Fri, 25 Feb 2022 09:18:25 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id u4-20020adfdb84000000b001e8d8ac5394sm2880337wri.110.2022.02.25.09.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:18:24 -0800 (PST) From: christian.ehrhardt@canonical.com To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix committed bucket size' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:48 +0100 Message-Id: <20220225171550.3499040-55-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.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 19.11.12 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/27/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/8b3ab4586f0be206a8483d705f05e01bc9c3125b Thanks. Christian Ehrhardt --- >From 8b3ab4586f0be206a8483d705f05e01bc9c3125b 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 62e3a35902..e51a85b477 100644 --- a/drivers/net/mlx5/mlx5_flow_meter.c +++ b/drivers/net/mlx5/mlx5_flow_meter.c @@ -213,8 +213,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.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:46.351199502 +0100 +++ 0055-net-mlx5-fix-committed-bucket-size.patch 2022-02-25 16:58:44.300990467 +0100 @@ -1 +1 @@ -From 21fdeab422e0edabc6b738f7a0c56dec7e9c374e Mon Sep 17 00:00:00 2001 +From 8b3ab4586f0be206a8483d705f05e01bc9c3125b 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 62e3a35902..e51a85b477 100644 @@ -27 +28 @@ -@@ -295,8 +295,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp) +@@ -213,8 +213,10 @@ mlx5_flow_meter_xbs_man_exp_calc(uint64_t xbs, uint8_t *man, uint8_t *exp)