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 3A4CAA0C41 for ; Tue, 30 Nov 2021 17:38:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F961410F7; Tue, 30 Nov 2021 17:38:24 +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 46AD2411DB for ; Tue, 30 Nov 2021 17:38:22 +0100 (CET) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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 1EF743FFF1 for ; Tue, 30 Nov 2021 16:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290302; bh=j5llkFm94YCQcxi9cwx4JS0MADvQk5zN1Vk8IgbYYqA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S3iflUKd+0YHoUO1GS/y9GKpANLEBPw7hkB92wEVtGUOiIHoHaLycFtKCsVWt2moK OcqsXVKF0BJ4h9+lCLet4eRQeXF5s1S9lK8oONA4JW+o5lHCN93Q4y9FynRSOFWHn+ P8yOCV6PfpjH9LE8WqQ/fsuSKJm0dw787tr/8EfeRsOXavNLXajnltVsxdlvRBSyx0 MG6qTzfFLDxR4lyazAQxUZpkRIk/lR510VWlEqmAQ/PZIH4FST664X6rA4wfZL8+7c AbChTsIIzI+z4MhHzZdHEaqScyZvycKmNUecc17ybx1f5fBCEGZfIwrAnzEK5BZN/e hBQH27rWcD2Mw== Received: by mail-ed1-f69.google.com with SMTP id w18-20020a056402071200b003e61cbafdb4so17480957edx.4 for ; Tue, 30 Nov 2021 08:38:22 -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=j5llkFm94YCQcxi9cwx4JS0MADvQk5zN1Vk8IgbYYqA=; b=frwCyWgPzrlfjBIN+f6gjGocR7G24Wt/5bwmIWoG8Pu9yE/8bXAnFJKBxto8pVw0dG klrFGNw5yScgScRNGrVU5ltwcuBXqVToLJviF1CEYUl+F797oUVj1SwY4FrmH/1SRDuT IXeYQACRZGbnEqFIMWcFC9LawPTOAk1vRZBsfBOxfIAoS45t43QVwpXbma/8mvtUyAjH CtGpXUfjWf2t6rJflskj1TTjjbJh/ABcQJgPYGDPqDtETqpG5Pr8TA/SXoem4jNdPi2F 9aRoO9QAKZIO2BdSU0c1/ybvuMmyFQ+rhMRLADguCaRoMFEq/P4jkWJEPDvBSAo6mLJn gM/w== X-Gm-Message-State: AOAM532kDxTiz/k1QWvPLghnT+/3oRdrNpPUsBuSBBbky5Wq5dkbEb85 WmsWLQ2i9deNjLJ9yshkp7LCtL+yH155RR2nhLh6DdF3B1CRRtgTaqdGwUC2J3XkO5raDmfP1N0 pO0VSeoOHyXHLB0zdkPrxozou X-Received: by 2002:a17:906:9153:: with SMTP id y19mr205249ejw.516.1638290301321; Tue, 30 Nov 2021 08:38:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4lUY95PyykqB/293EhpPcU8bd6fqXooybE94+cS076Av5RFl0VFS2rznGwpQXz6doP/zoXA== X-Received: by 2002:a17:906:9153:: with SMTP id y19mr205231ejw.516.1638290301164; Tue, 30 Nov 2021 08:38:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:20 -0800 (PST) From: christian.ehrhardt@canonical.com To: Kevin Traynor Cc: dpdk stable Subject: patch 'bitrate: fix registration to match API description' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:06 +0100 Message-Id: <20211130163605.2460997-42-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/88d15937b14b6a248d570982cb3f81032a0d4183 Thanks. Christian Ehrhardt --- >From 88d15937b14b6a248d570982cb3f81032a0d4183 Mon Sep 17 00:00:00 2001 From: Kevin Traynor Date: Fri, 9 Jul 2021 16:19:36 +0100 Subject: [PATCH] bitrate: fix registration to match API description [ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ] rte_stats_bitrate_reg() API states it returns 'Zero on success'. However, the implementation directly returns the return of rte_metrics_reg_names() which may be zero or positive on success, with a positive value also indicating the index. The user of rte_stats_bitrate_reg() should not care about the index as it is stored in the opaque rte_stats_bitrates struct. Change the implementation of rte_stats_bitrate_reg() to match the API description by always returning zero on success. Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library") Signed-off-by: Kevin Traynor --- lib/librte_bitratestats/rte_bitrate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c index d18152365e..b2d17c8e11 100644 --- a/lib/librte_bitratestats/rte_bitrate.c +++ b/lib/librte_bitratestats/rte_bitrate.c @@ -49,8 +49,10 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data) return -EINVAL; return_value = rte_metrics_reg_names(&names[0], RTE_DIM(names)); - if (return_value >= 0) + if (return_value >= 0) { bitrate_data->id_stats_set = return_value; + return 0; + } return return_value; } -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:08.517523848 +0100 +++ 0042-bitrate-fix-registration-to-match-API-description.patch 2021-11-30 16:50:05.654872532 +0100 @@ -1 +1 @@ -From 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f Mon Sep 17 00:00:00 2001 +From 88d15937b14b6a248d570982cb3f81032a0d4183 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 06ae9f0f92cf3bb85549f66dc3dfa11011d7db0f ] + @@ -22 +24 @@ - lib/bitratestats/rte_bitrate.c | 4 +++- + lib/librte_bitratestats/rte_bitrate.c | 4 +++- @@ -25,5 +27,5 @@ -diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c -index 8fd9f47288..e23e38bc94 100644 ---- a/lib/bitratestats/rte_bitrate.c -+++ b/lib/bitratestats/rte_bitrate.c -@@ -55,8 +55,10 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data) +diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c +index d18152365e..b2d17c8e11 100644 +--- a/lib/librte_bitratestats/rte_bitrate.c ++++ b/lib/librte_bitratestats/rte_bitrate.c +@@ -49,8 +49,10 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)