From patchwork Wed Nov 30 13:28:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Sankaranarayanan X-Patchwork-Id: 2423 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp926774wrr; Wed, 30 Nov 2022 05:34:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6oXUini/aPrx8NsVd6BSFujpseJPCVc0zwV707XpnXw8UTO8uhl0pO9EvKiSILFy6Ytfkv X-Received: by 2002:a17:906:7848:b0:7ad:b286:72da with SMTP id p8-20020a170906784800b007adb28672damr52826446ejm.152.1669815250206; Wed, 30 Nov 2022 05:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669815250; cv=none; d=google.com; s=arc-20160816; b=vrWeX+5/4r4QncXFRaDuvKEz1flUKcI/Y5DR68A9lAB5uVroF0W8uX+ofiD2WwvWam KrTo/tAPB97JElTRTeYMHGHl5W+mujHKlRdUHbBVfqSZIQ3VvEJ4qcTuxllfy8LpHqTV LeIOCpoxfq/40ocfbU4mh25vn1SU2wMRTkPnEd4khQ7ES2U0faSYF03EwAA7x30O4+cK CD0xGaE9Ze4TUFOljQCg/9UIQUEHhGjV9WzJyEbc7nMRNkQ/Vn25wso9Tj8PsogKcK4O jxUO4BhGjewh6PRERevjIMXLjHC4GqcYEYJ/sSshDOVko1cXy/DRvLjhsfieGy/pzdEx dNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+Y6f88puPR07+//b5AyR5ALk+ZkkHezUX/minXbnSq4=; b=BnZasgjDxtmSXkWjvIgtgrtYvjUWMdGqMHW0dbaRx1iBy3t3xpVBmUn3usdOY3KD1d 5uyA86KIMsMzH4UJ1QdB4A06N8HdokUXo2k8MC5GvgjtbAUCGgzStVIk4ik97NVze74E ew0GU9nyZAP/gBmDSHYz8MvKzQLzTSZRxMnKEQ2+PEDZrBb+hZqAtvuLJtDKfnxXX/fJ xJhrJ90FUs31Yf2ijO0LlfT/icIxaqtDIYN5I5pYCTXI2yU77u79/JPospir4UNC2xI6 QSwZha1SlcqFJIHJzcGqSWQ7FDY0PPqoTqCI174srAa+cWXKUmBySncMvxpoegTWZ8Ds pc1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=zvMXXAz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs14-20020a170906dc8e00b007aea6b2696fsi1701918ejc.454.2022.11.30.05.33.44; Wed, 30 Nov 2022 05:34:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=zvMXXAz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232904AbiK3N3r (ORCPT + 99 others); Wed, 30 Nov 2022 08:29:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiK3N3p (ORCPT ); Wed, 30 Nov 2022 08:29:45 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9754054B20; Wed, 30 Nov 2022 05:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1669814982; x=1701350982; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=igkyneSahWQojHBUvpkTErM6kbG4iiuA7DeLIJI446k=; b=zvMXXAz82H1pMHIFyYnIoichxT8+cH3MGNYn1W4RhjZ+2R8oSnv0W/rV /L01wlY55rwdbkXz/ks6/VU0rFutHt3nNhCffFN7SPBHqTb38gzxes6bc 2NKq+aiQGGVq344keHTX39oHgxj8IJSC1km09D3BEuuVfLtSQfsT2aDqy 0zSEgfcXsKFzZyro/bZAUkjczpGdKVNlDLLEUyQNTkFvXAxEPvOIAOt1C 7qyVIGGXpiW5z+DUOInM1045A+9AKt7K0AvS1fwPGUA02LOixxlkNDbfa bOeeQq126dUUXBScU97U6mq9tz3KwiMBiAWwYIvShLWxcDluwMgj724nE w==; X-IronPort-AV: E=Sophos;i="5.96,206,1665471600"; d="scan'208";a="191136735" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Nov 2022 06:29:41 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 30 Nov 2022 06:29:41 -0700 Received: from che-lt-i67786lx.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 30 Nov 2022 06:29:37 -0700 From: Rakesh Sankaranarayanan To: , CC: , , , , , , , , Subject: [RFC Patch net-next 0/5] add ethtool categorized statistics Date: Wed, 30 Nov 2022 18:58:57 +0530 Message-ID: <20221130132902.2984580-1-rakesh.sankaranarayanan@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750928195628248735?= X-GMAIL-MSGID: =?utf-8?q?1750928195628248735?= Patch series contain following changes: - add categorized ethtool statistics for Microchip KSZ series switches, support "eth-mac", "eth-phy", "eth-ctrl", "rmon" parameters with ethtool statistics command. mib parameter index are same for all KSZ family switches except KSZ8830. So, functions can be re-used across all KSZ Families (except KSZ8830) and LAN937x series. Create separate functions for KSZ8830 with their mib parameters. - Remove num_alus member from ksz_chip_data structure since it is unused. Changes tested on LAN937x Series and KSZ9477. Rakesh Sankaranarayanan (5): net: dsa: microchip: add rmon grouping for ethtool statistics net: dsa: microchip: add eth ctrl grouping for ethtool statistics net: dsa: microchip: add eth mac grouping for ethtool statistics net: dsa: microchip: add eth phy grouping for ethtool statistics net: dsa: microchip: remove num_alus variable drivers/net/dsa/microchip/Makefile | 1 + drivers/net/dsa/microchip/ksz_common.c | 70 +++-- drivers/net/dsa/microchip/ksz_common.h | 10 +- drivers/net/dsa/microchip/ksz_ethtool.c | 344 ++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_ethtool.h | 31 +++ 5 files changed, 439 insertions(+), 17 deletions(-) create mode 100644 drivers/net/dsa/microchip/ksz_ethtool.c create mode 100644 drivers/net/dsa/microchip/ksz_ethtool.h