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 4EA1C41D8D for ; Mon, 27 Feb 2023 08:08:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4909E410D3; Mon, 27 Feb 2023 08:08:09 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2056.outbound.protection.outlook.com [40.107.212.56]) by mails.dpdk.org (Postfix) with ESMTP id 66D8F40A7D for ; Mon, 27 Feb 2023 08:08:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DzE4t6LNStUMRRuEEiNM2kE/vBdEw44NHjuHnVX9fRZ4neM2+pL5tI8CLJ46O7kZPwl0iMZh0FlqAIVqX6H3kON9rkdIvqOT+lQzjSkyATx904WsvLPrzl4OniiobfKINCQNtDhqX4yRLWviKS7KRWF+hxCekH6nplOePUwMCdgqdDDI9ag9AH63BPdj6untl2CzizCRSsf1UdMROotr8XAB+8FaBDt5S8goPxoQ86qnU8e6A/X1/F8FnRjYALzJp6Ox3t7cNIYLvNi6TldFvsDluxkbHCWbj1wXLx/b/+fOHJIOKtUhBbOHh4M3sVmsAaEB0yAtKtC5yyRSO2oE8Q== 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=5IG9sYdJTFsj7/ZmmdhFN6wG+YNHghajXZsQlAjGeeM=; b=X8f6xidUHyszaujez6C4w6jmyXQuBhDPI9RUwoA93kEzSmIeXfuGZ87CV3jmv5z4G5BBlfVON0pqB8mplm0chi2pLxYCjTKBch/uAv9ji7d8kpQlBkZf4UJLesep2BWGHnarTAB7YeR2CHutM1uGDE6yWOSoHSZQfXrOs98FjLwQbBA9sYIn8k1yYBvndXgMHuC4AdJgbPowoUhtbkNzzURVtfRX7UcPCMDtR0gJOZnPww8TrltEPXM7BH4URHArxIAEmOe6PVUsXni3XOAgKYPFLFUS64erQINV+25yBu6GPuqrK9t7vWTnNBhQ0uE6in7VSGE+6UQ5p1skVGM6Hg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=5IG9sYdJTFsj7/ZmmdhFN6wG+YNHghajXZsQlAjGeeM=; b=Qw8xJ/k6YFUm4bBFuU5TFxsQ2zK+VoYIsjEYbKpUCuiGO7O1ztKrxPT1yrO6gNB+8U6FBbkICLqmkkXRNT64idcY7UsiF0im5AXyLyZO5J9xcrKLE85084KFApF8YxZUCyXhleUx88IjQTGLBYxX8C1qLZ3CSaW54ysedY+lKyx7pI3Nl+mLE63Y51PAc++2P/HMv391GuY3W2b2Dya8kDiEgyhUJMBoQGxHoA86L2z2/vaWCAPnLum0Q/G5FmD+VqiKVFMjvSKnjWFnCPoJGzqton5m/GblmuRwkocsJZO/e+FaivNn+2hHqhe4bHTnaPfAjiRDwGpkst8T49H0Gw== Received: from BN0PR04CA0087.namprd04.prod.outlook.com (2603:10b6:408:ea::32) by SA1PR12MB6845.namprd12.prod.outlook.com (2603:10b6:806:25c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.25; Mon, 27 Feb 2023 07:08:06 +0000 Received: from BN8NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ea:cafe::fe) by BN0PR04CA0087.outlook.office365.com (2603:10b6:408:ea::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:08:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT014.mail.protection.outlook.com (10.13.177.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.14 via Frontend Transport; Mon, 27 Feb 2023 07:08:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:07:55 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 26 Feb 2023 23:07:52 -0800 From: Xueming Li To: Mike Baucom CC: Somnath Kotur , Kishore Padmanabha , Randy Schacher , Ajit Khaparde , dpdk stable Subject: patch 'net/bnxt: fix Rx queue stats after queue stop and start' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:59:29 +0800 Message-ID: <20230227070107.15664-61-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT014:EE_|SA1PR12MB6845:EE_ X-MS-Office365-Filtering-Correlation-Id: a63fd8e9-58d3-4025-d629-08db18916015 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eyADg6dPn2jJYqmgGsd2OU0uuun4sjs/kiqu5hFxBNjRLnwBWbBi7HIBg9kmTXnW6ou6X+hNllAdPeDWzemeEDVtJtUTfhQ1YTsp9sK+m5aSH830/aLu4EminQORWiHHnZtME2gNNpujCOgIQOZ/MNaGieOqj+8bcvjp3kP9517M4qBgCdaSRJsVAy72TM7QlE6uDyFlhZynR9F+PaFpe6B3JVdhNpFzoOGu8C0NWdzNPDSaeFjCOet4IWXtfRBjmN3Br2Pl6PS7iwC8QmP5M5Vk2HcEgF9z6j02NxD8V4QrvuvYmI7i2041wyIqxAoOOzSaCNCCUZ/nL6ibEK0sKwH0C8mYrFCh8ve8J22ZboUh3JaUyAPEizTHXVkrgfldbtJX782G2aZfiEekoolTU1o3cwxgoRjZYHdqeMtBNxMKXhwUvnkJo/pOh2gEE56XWJUN8FAD1qo6fxD16OaP/4SHxx+7jVLFTTOD1IS0+4DGy8H9ejEGWsRPhq8Df3pG5XyAohyV13GaL7U/PtLTlkpSa78XetIGjwADkXJhUikIVySfYTKbrjAvsqybvTzrP/6QO/yCN2H2AVBPXPnD0Qsj5y3CMA4hwZNtxcwGlMAM52kfCbXgNM0ha2R3J3HbfmSE31T8SWdp5S4hFPpi6axQIHwcQwepViJqC5V30s/AUCzllCESLNIk/CTeo789EA1GrrwWDPA3buAzKMz1Lg3RuuK6iUEFKaWRmnt2tsVAEKEQ4hf1oOb63Uj0sw3juo+GegPoTRcuRJg0PdxbayrKj4uTMay6Zq51qrR9a8QY8yppM0pZl+Nx8v74nlM7 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(376002)(346002)(39860400002)(136003)(396003)(451199018)(36840700001)(46966006)(40470700004)(2906002)(5660300002)(36756003)(8936002)(40460700003)(41300700001)(70206006)(70586007)(6916009)(316002)(54906003)(40480700001)(86362001)(55016003)(966005)(356005)(478600001)(4326008)(8676002)(7696005)(7636003)(6666004)(82310400005)(36860700001)(1076003)(53546011)(26005)(16526019)(6286002)(2616005)(186003)(82740400003)(34020700004)(336012)(426003)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:08:06.2238 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a63fd8e9-58d3-4025-d629-08db18916015 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6845 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 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=3f1568d969125f2414fa057827db7aae56eca777 Thanks. Xueming Li --- >From 3f1568d969125f2414fa057827db7aae56eca777 Mon Sep 17 00:00:00 2001 From: Mike Baucom Date: Wed, 1 Feb 2023 09:50:13 +0530 Subject: [PATCH] net/bnxt: fix Rx queue stats after queue stop and start Cc: Xueming Li [ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ] The Rx queue stats are being reported incorrectly due to a workaround for ring counters sometimes being reported as zero. When a queue is stopped and started, the ring counter is reset to zero. The workaround interprets the zero as incorrect, and sets the reported ring count as the previously read value (from before the queue being restared). This shows up as negative counters in testpmd's "show fwd stats" command. The fix clears the prev counter for the queue when the queue is started. Fixes: 219842b9990c ("net/bnxt: workaround spurious zero stats in Thor") Signed-off-by: Mike Baucom Reviewed-by: Somnath Kotur Reviewed-by: Kishore Padmanabha Reviewed-by: Randy Schacher Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_rxq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index fabbbd4560..99758dd304 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -471,6 +471,12 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) return -EINVAL; } + /* reset the previous stats for the rx_queue since the counters + * will be cleared when the queue is started. + */ + memset(&bp->prev_rx_ring_stats[rx_queue_id], 0, + sizeof(struct bnxt_ring_stats)); + /* Set the queue state to started here. * We check the status of the queue while posting buffer. * If queue is it started, we do not post buffers for Rx. -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:42.902448700 +0800 +++ 0062-net-bnxt-fix-Rx-queue-stats-after-queue-stop-and-sta.patch 2023-02-27 14:08:40.789237000 +0800 @@ -1 +1 @@ -From 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c Mon Sep 17 00:00:00 2001 +From 3f1568d969125f2414fa057827db7aae56eca777 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 0180d3040e4a7734dc9987ff6c49ec1daedcdf8c ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org