From patchwork Thu Dec 14 00:09:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13492144 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="bC+UwS7z" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F392C9 for ; Wed, 13 Dec 2023 16:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJe0ghVN9a4NyVLd+g0TzO1ArPkY0yAEOiqRyLnG9hmheuEnZVWd5lscBd0tFzDWEzlbv13lWa7ldr2KSJ27+p9cb6egPWn3wCBoAM1awl7QWogTscEsWyFMe/QuMSOrig4/xm2/5aOmGtnWfXUjQs4YzFPcNZVu+UwTorEm/zWBm4gjXdHO4GkmGO+4aLGoTOqJhpmle3hTONIM03oihw0vkLIXqHyAKw3zcrypLXJSdeuEvBCrwE/5nZAsx/Cw9MLRCBEltA+LLCiGfabN7zYOPQfWR9EtoWuXY8QIghJPpWg692Ddg0s3ocIHUmluOzOO0jx2bQKTUg/kVBSm3w== 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=DoEThFXlLX3HzWVvNO7YKv5/Q90o0N0Kk0CUhC+DbdU=; b=R6/wXiVgbMyVKY11EILg2+8v9VanEYw4c0fSrMvph/rTu7wXfBB5UoJ0/7xeBhqQAc1MHnMLZ3rvw5wIx6OQrmsnROPehaWNNZwmSnWcKvIF9Q8e2kGoKPexqcSj+ezEIZZdBDcIKZG15hdwmHk3kS3IKhCt2PNGk225x5Ak4sA6RlZHnJQh5vfRVDW5K827liNIvsaAm+Rle0Bb1QCBXexyP6uKacz9h/6U76QQ1hTgS//cGpK4xyfMyrH8fdzgEvr92/gaS1P49UqisrGFkto3GWgqlxHmdm1mO4H4sCl8pq75XiwsaXvbmMWO545HMxJILxTt+LwxVZEgAhbGeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DoEThFXlLX3HzWVvNO7YKv5/Q90o0N0Kk0CUhC+DbdU=; b=bC+UwS7z0G7fYLaqmvS79vSwNro2KcJQbBuU3KeNUwfdS/JS+jV+f+7IcmSMjkVRvAkZgh4e4ruOAkfglY66t3TNyFpuGI5OfDC4dFEUo34713FgptINJQmAeW+7h8A2ztPkdkMDpL3vCW979RTgPU3ntkheoH4q7b4KQIKO3bQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by DB9PR04MB8169.eurprd04.prod.outlook.com (2603:10a6:10:25d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 00:09:36 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 00:09:36 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli Subject: [PATCH net 2/2] net: mscc: ocelot: fix pMAC TX RMON stats for bucket 256-511 and above Date: Thu, 14 Dec 2023 02:09:02 +0200 Message-Id: <20231214000902.545625-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214000902.545625-1-vladimir.oltean@nxp.com> References: <20231214000902.545625-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR06CA0135.eurprd06.prod.outlook.com (2603:10a6:803:a0::28) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DB9PR04MB8169:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e4133bb-8e8c-4603-44f1-08dbfc38f4c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m4Eqjay61RO2u0NOShMnBcruym/mHG74svh20CXcPyGbKiQpp3q9tnO2HyzMvi1wYyYhF+8m1eTLArgC1lpW16hTpsG65DTjy7sEJbcYV/KOMf66oYpPFcHgMYwqKdPOCsOXO9JHO5jzNhMZP1lH1u9xyOmRBpc2VdVbIIUZnfp8CLGlqRbYUb70EANQCf+ahc4iPROA/MRa8NMVje8zXKAoEtlYjbdvY9S/WceO20t+/YDE4UnrGgC3ySS4OdzPZQcMothMWG11b8V9LzDKvggIOye9nzSfgjLBFOpqu95oaxlg7zOIBdN4tVSLvtfkFTc42NQ/JsF65ts/DlEaGIg4rLwYmbFAEhQNPpI3Ckdp3gVqLcgc0348AF0lvGFV/Qk1Le8xZbgfzy3MBr++kBYYnwRk1NHDsblswagGjephSKCeMqpsfaYV/YwQETiX2MZtEWOoZwNDEHy1E8DaBe83OdZwHuoKB53VFdPHHDOI4cVjE+D5/sAkiyIWzg7BLzGdmdlEYO3E4D97UTWhFv+bs0a+Ir+CHIY7ud7go1HnMZ6h2CmAvHeH5QNwdPltAwey02MK6TMI5QXXSP4oCGDqUA0zkSifW/G31ED64U73SteXCiHxSnVhKidj08dZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(366004)(396003)(39860400002)(376002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(83380400001)(2616005)(6512007)(1076003)(26005)(38100700002)(8676002)(8936002)(4326008)(316002)(2906002)(44832011)(5660300002)(6486002)(478600001)(41300700001)(6506007)(6666004)(52116002)(6916009)(54906003)(66476007)(66946007)(66556008)(38350700005)(36756003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vw8+xCShIxrVPF2CrMxI2F9lE6cZ92uonjG8nQ+788mh7VqFmFdhWLFoUTx4wBKpqQZMxgaTdo8BhgyxoPM5PdLYE0lgHMDZ2B+yLdHh0RoF1arVZVnZ6umlTS3wQswzlXzgEF75Gm4QVKIvuLaoi0Gi9i5wetgiC2SGdpOnUiNkUJtHSWznQ8sZYUqv9PmKFvE6SBzE1xsz0spVbJ41s57Tp6Fe5kyYXdMyuKx3Z2iZHdW8eOG3hc6Ayo2GmN6eOVg858cPkWSCQ4KG2s7yQ1z9pHe1fIoBpfV42EcdPOQCYwZKGSue1xkMwGDgQPGsblwGxTm6TLDcNoGdEAx7u1Lrpecy6CVAfC5sIHH/6YmnqIkAp2lwS23wM+Y5OVwTe+SR3CZYvBND4+vI8nFdv6nw1wMywV++fF1LiSlFq4UviaHhGnjY376jQCI3mVB2AYcH0FKO1f6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acsU5uFCaEQ5X9yRq58LmG8gEWhRKPDh/l+V7rIiHd2ihf0OJ4Lo5x3pSfiYXOzuLKAIbbx+75ZKP2U+/MvNDnZeSmg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e4133bb-8e8c-4603-44f1-08dbfc38f4c9 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 00:09:36.1319 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dlkQsw/o6G7PeZgLdhy2UWw4VL9eE6dvxkIANGw8Cx2MoU1UercoBKds8BGveqLkjRUDSiMIq2yWxPmti+Rn/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8169 X-Patchwork-Delegate: kuba@kernel.org The typo from ocelot_port_rmon_stats_cb() was also carried over to ocelot_port_pmac_rmon_stats_cb() as well, leading to incorrect TX RMON stats for the pMAC too. Fixes: ab3f97a9610a ("net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot_stats.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_stats.c b/drivers/net/ethernet/mscc/ocelot_stats.c index f29fa37263da..c018783757fb 100644 --- a/drivers/net/ethernet/mscc/ocelot_stats.c +++ b/drivers/net/ethernet/mscc/ocelot_stats.c @@ -610,10 +610,10 @@ static void ocelot_port_pmac_rmon_stats_cb(struct ocelot *ocelot, int port, rmon_stats->hist_tx[0] = s[OCELOT_STAT_TX_PMAC_64]; rmon_stats->hist_tx[1] = s[OCELOT_STAT_TX_PMAC_65_127]; rmon_stats->hist_tx[2] = s[OCELOT_STAT_TX_PMAC_128_255]; - rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_128_255]; - rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_256_511]; - rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_512_1023]; - rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1024_1526]; + rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_256_511]; + rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_512_1023]; + rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_1024_1526]; + rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1527_MAX]; } void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,