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 153F6A034F for ; Wed, 10 Nov 2021 07:41:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0862E40E28; Wed, 10 Nov 2021 07:41:39 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2053.outbound.protection.outlook.com [40.107.243.53]) by mails.dpdk.org (Postfix) with ESMTP id 751954014D for ; Wed, 10 Nov 2021 07:41:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JuDYZrItI8PqJX6PhrjaapP0ck0v3Fa0ix9sU2emGYkH9YzAMMlh4YJaWf2fw3tEU1f5IZKPkRFn1pS1HyJa296e/5Pr0AIr6Xr/96/Y6+/2LgouabhIBx+uyDLUlXyPmS3kQocQcBKjez5vudm1qMjMPHd8Ef8dsHYNk/vSY6G49lDiGYabXJ7F3t/QKIOTTurLHStWd6DcUCERMLyn7+4OKTW4K514wackSDQnFRaK8Ywte+oYs8QRCS21wuV2HnBjmdfPtv7bOV4gEyYm4hLGtrVAWy+RnTSz/GMwwWHJAJYXvh7MW01s2qylMjqMEV5KJVLAOpumY1EEMWOKtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IB+y1OfBCIen21njzrNZ6sBjaVWwo7C/gH4M5KH9j+Y=; b=L15NX22FwDf/iW9Z6OhK2NyenkE+PfXYm4EVfr4zAegl/nzy3xez2IcPJxYDslAY1D49leizvQ+rGuXs06kaOdaEUCIk0B3Ei4SQnMJWY0T0Ry4yyLqRBdcaz6omCBvfxctxUB3DHlrcB4F/jI7SRSLkT9wENQY2e0TEcaYzpPBF2v1v3JnxQMwt1fdlBXhAROWFJcql5PjWyrqZC7tOtBX5uQmAzHWPZScejFGHncyKW0DlbdG0lGA/jpN7F40KKK9sxHoMgXnc4aRW7ufSHeHt3sDLMQwrm0/NGpF7wVy8RxiG7bYdPvMS4SoZle7kYnVe06J6voTXE6tsA8m0sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IB+y1OfBCIen21njzrNZ6sBjaVWwo7C/gH4M5KH9j+Y=; b=GzIdG2lonj7XoXcB82RXNP55xX0gnUBlTXm78uOC6XZgSVLYAP6TS73SmFZzdHZZJMTqg36h685GKrjv8mbD/S3rC5A1VZ3U7O3qXgp92ucZVmID9ErQnueYzeLakclLNnI/jxxX0b4/ueb2LTFm5vRG6fUolwiBVjTaBcL9o31cMWzsggWp5P974rNC8ikzjcZ7hR/FzO8hQde4SrOUheUPJKS49EtHaM9l47t3C7iZHUFvNDr6hiaIhWKnx6SAWiEf5pnTYmLGF0OHjvWIrSqpkeUmt/MwDgTpBhAlKeedx7t14vu1UfPabmNGs4otMsMAiGB03/ElDozqYrUe5w== Received: from DS7PR05CA0027.namprd05.prod.outlook.com (2603:10b6:5:3b9::32) by DM6PR12MB3132.namprd12.prod.outlook.com (2603:10b6:5:3c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17; Wed, 10 Nov 2021 06:41:35 +0000 Received: from DM6NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b9:cafe::17) by DS7PR05CA0027.outlook.office365.com (2603:10b6:5:3b9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.6 via Frontend Transport; Wed, 10 Nov 2021 06:41:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT023.mail.protection.outlook.com (10.13.173.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:41:35 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:41:33 +0000 From: Xueming Li To: Kevin Traynor CC: Luca Boccassi , dpdk stable Date: Wed, 10 Nov 2021 14:29:28 +0800 Message-ID: <20211110063216.2744012-85-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fc9ea79-ce77-4552-05b3-08d9a41523f0 X-MS-TrafficTypeDiagnostic: DM6PR12MB3132: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pPtzw7wFBLvpyUnc/+/Jt2nt67HtSDxg0qmcXLM3D2q2s4vJlOTtVFACenkzz9BGGTnzI0ZJ7hMWyUX4D0nuSWOVibyLln9H0tUS0xwrNvCCexiGlcg3D7mnkdqtIgVWIcNSZKqSXmrWSTsCziuf9DI58EdlWcGckHxXZXN6plZLmYUeKhdLLBktEnDbel2NJ7O54lQveQ8t0eCjynkKInJFn6tQoGUvOWzB/qm9BY0DGV4lMCdgGnJqDWcuAqsLnI7i/BVF4hP6UTyDvqf75N2eKkaJP0i+C6N7uBEgUsvlIAcJsCKe4J2hfJM+sKEIVrE39/g8+7vqoa+E6Cy3lwseAW4JLdGe74ZEUK3AIXlfBrV9UeaCRrFkknATbuYd0BswXdrj8yKlk15GlldEOSD3iYKbSOwsewZeNTjsSgkaizRFWSBGLxTCrCz2uVvdgYlgZ5fVNk0YjgMbjlHBgCBMOVwewAt0odAkQq0wdUg7smCGYlzsabOq6uKEvhuJVfNhkxdPwE6N9EoUwOqNsqXD/F9dBuUXm4wqC/nYT6FWKDreFn5txTfoIsRU1MMXBifikk1w86CSy+eulSPfMtbR/rfRgzHSOZNs3zjzPd9jByakjbkW+z0eaKqmmuHn/MheMRZLq6s5iyh1infKo10nZrLh7oAGSxGarBujyy91KVNLauB2CYCdnjFC2r84CoZy5lryyAvjRaXXGN7RdgCqGJxIs2SXQ22s3HVzOqP7pGQRutFNVmyCR9qo8rMDEoyeIVAC0+herPR+s/oYvFh5/qthXD8gSUVN+dHm5/+aENE3VQmw5HEX0UDV35mnP+nRKrQJT0Qlmf2CedVrNg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(2906002)(6286002)(316002)(82310400003)(186003)(70206006)(356005)(54906003)(55016002)(26005)(6666004)(7636003)(16526019)(426003)(53546011)(4001150100001)(5660300002)(83380400001)(86362001)(4326008)(36756003)(7696005)(47076005)(6916009)(966005)(8676002)(1076003)(70586007)(2616005)(508600001)(36860700001)(8936002)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:41:35.2647 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6fc9ea79-ce77-4552-05b3-08d9a41523f0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3132 Subject: [dpdk-stable] patch 'bitrate: fix calculation to match API description' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/45f9d14e11cc844015f00bbcf782f9caf6644d9a Thanks. Xueming Li --- >From 45f9d14e11cc844015f00bbcf782f9caf6644d9a 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 Cc: Xueming Li [ 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 e23e38bc94..1664e4863b 100644 --- a/lib/librte_bitratestats/rte_bitrate.c +++ b/lib/librte_bitratestats/rte_bitrate.c @@ -80,7 +80,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.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:05.787203870 +0800 +++ 0084-bitrate-fix-calculation-to-match-API-description.patch 2021-11-10 14:17:01.844079642 +0800 @@ -1 +1 @@ -From bdd478eede455611245593edd43dc49a1d821449 Mon Sep 17 00:00:00 2001 +From 45f9d14e11cc844015f00bbcf782f9caf6644d9a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bdd478eede455611245593edd43dc49a1d821449 ] @@ -18 +21 @@ - lib/bitratestats/rte_bitrate.c | 2 +- + lib/librte_bitratestats/rte_bitrate.c | 2 +- @@ -21 +24 @@ -diff --git a/lib/bitratestats/rte_bitrate.c b/lib/bitratestats/rte_bitrate.c +diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c @@ -23,2 +26,2 @@ ---- a/lib/bitratestats/rte_bitrate.c -+++ b/lib/bitratestats/rte_bitrate.c +--- a/lib/librte_bitratestats/rte_bitrate.c ++++ b/lib/librte_bitratestats/rte_bitrate.c