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 4F73AA0C41 for ; Tue, 30 Nov 2021 17:38:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A0954118F; Tue, 30 Nov 2021 17:38:25 +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 7BDE9411B8 for ; Tue, 30 Nov 2021 17:38:23 +0100 (CET) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (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 5C7E63FFF1 for ; Tue, 30 Nov 2021 16:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290303; bh=EQ0Gos47hOmbiKhZ9MmcZqxvWRIoujtWa8JiOTquuTk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Zfk/86vQqg1JVJsWEkgxDOR+dDFod+GI94KXBXOorGszEAWlxG/4TyFWIJUqtO3ns EL9tB52B+7QIm5tBJEa6buW+cO2DM+vlTdfAZ6ZgcWJLllvDMl7yoDUwkfn756NLnI hZr31fjKrBlKTKo1616ZrTFYtFWmZtrtXUWR9yh2bTzetsVgScjNBHVRhzx6ZUNJ86 NUc//LVwEI1nydUWv3ioEKUwd1SS2IGuxgLBIJCcbQHUng94MNRXgZ7YQAcSdLW74f rH58aeipkL1SxejnBKzvkW5vtwe0N4vFSlbgfieAKYrwjuuIXPK5zc7oSWa9ECpkiN BUnR5G3SIH9jg== Received: by mail-ed1-f72.google.com with SMTP id q17-20020aa7da91000000b003e7c0641b9cso17465316eds.12 for ; Tue, 30 Nov 2021 08:38:23 -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=EQ0Gos47hOmbiKhZ9MmcZqxvWRIoujtWa8JiOTquuTk=; b=zxv3M/X/1F/ATTI1xNRacqPKyJPbad9ZcxAjXAwY2oMuva57urCKkKmPiq8GRGJJzY OngHeLr5g9CgniEyNIMxCvJaVVvvbM26oMJxXm2YArcY6rsmWL0uGDr1YN9SxL0KYBD5 gp8u3Vt6QIxo9EUrO7hBkrTZ6cc7jLDPOo4W6Cq7fdG4A1tZEIThVgQZBRqGFVrus+AF PdlA7/t8ZlIXdYTMeZ9BgYvDbsCEnPoa+hasEfLizoMD+oQzLTCouYnGXEAoGNJyxjej DXoCdejS7JIRlxatWFK3FS5IjSIFqDJiYdLyKhTHIaEjP3KQp/if5R1ewEvBuyNMXzOB y+Pg== X-Gm-Message-State: AOAM5329LjYJk5IKGTDB6fmD+EO0WAw2ygE0lik2uyPKeZxdJh5Rnxwc /li6f3vBIomwW9e0NAT1pMuvskH2UkgChYSlcwYl8Tr3jGnLf3hxGT/Qju913EeFAM3qAT4UpqC Ig9X0OQgUgeaJBTyq367r38tI X-Received: by 2002:a17:907:3f96:: with SMTP id hr22mr209326ejc.492.1638290302647; Tue, 30 Nov 2021 08:38:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhRrgHNZgMMGEqijyMqMxLzLkQJCTbev45EymdwUwjf3pSrJJaf/yWUcVQz1u9ioKL4I+ZVw== X-Received: by 2002:a17:907:3f96:: with SMTP id hr22mr209297ejc.492.1638290302260; Tue, 30 Nov 2021 08:38:22 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id qb21sm9610928ejc.78.2021.11.30.08.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:21 -0800 (PST) From: christian.ehrhardt@canonical.com To: Kevin Traynor Cc: dpdk stable Subject: patch 'bitrate: fix calculation to match API description' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:07 +0100 Message-Id: <20211130163605.2460997-43-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-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.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/6cd9c8890bf7abd5cf0484b7d2d4f435ca988603 Thanks. Christian Ehrhardt --- >From 6cd9c8890bf7abd5cf0484b7d2d4f435ca988603 Mon Sep 17 00:00:00 2001 From: Kevin Traynor Date: Fri, 9 Jul 2021 16:19:37 +0100 Subject: [PATCH] bitrate: fix calculation to match API description [ upstream commit bdd478eede455611245593edd43dc49a1d821449 ] rte_stats_bitrate_calc() API states it returns 'Negative value on error'. However, the implementation will return the error code from rte_eth_stats_get() which may be non-zero on error. Change the implementation of rte_stats_bitrate_calc() to match the API description by always returning a negative value on error. Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library") Signed-off-by: Kevin Traynor --- lib/librte_bitratestats/rte_bitrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c index b2d17c8e11..e7f5a9aee7 100644 --- a/lib/librte_bitratestats/rte_bitrate.c +++ b/lib/librte_bitratestats/rte_bitrate.c @@ -74,7 +74,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data, ret_code = rte_eth_stats_get(port_id, ð_stats); if (ret_code != 0) - return ret_code; + return ret_code < 0 ? ret_code : -ret_code; port_data = &bitrate_data->port_stats[port_id]; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:08.572670246 +0100 +++ 0043-bitrate-fix-calculation-to-match-API-description.patch 2021-11-30 16:50:05.654872532 +0100 @@ -1 +1 @@ -From bdd478eede455611245593edd43dc49a1d821449 Mon Sep 17 00:00:00 2001 +From 6cd9c8890bf7abd5cf0484b7d2d4f435ca988603 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ] + @@ -18 +20 @@ - lib/bitratestats/rte_bitrate.c | 2 +- + lib/librte_bitratestats/rte_bitrate.c | 2 +- @@ -21,5 +23,5 @@ -diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c -index e23e38bc94..1664e4863b 100644 ---- a/lib/bitratestats/rte_bitrate.c -+++ b/lib/bitratestats/rte_bitrate.c -@@ -80,7 +80,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data, +diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c +index b2d17c8e11..e7f5a9aee7 100644 +--- a/lib/librte_bitratestats/rte_bitrate.c ++++ b/lib/librte_bitratestats/rte_bitrate.c +@@ -74,7 +74,7 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,