From patchwork Fri Apr 16 20:45:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 423734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 688ECC433B4 for ; Fri, 16 Apr 2021 20:43:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 495526124B for ; Fri, 16 Apr 2021 20:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242303AbhDPUn6 (ORCPT ); Fri, 16 Apr 2021 16:43:58 -0400 Received: from mga02.intel.com ([134.134.136.20]:45469 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239844AbhDPUnk (ORCPT ); Fri, 16 Apr 2021 16:43:40 -0400 IronPort-SDR: Y9QvxHNvuzqgWnNgRCkeEDb5bHa6UrmCpsMaCYnb9Mn3I9cTCGxkkha0PBhThNn36lO6TLy0F7 5LekngN61Z0g== X-IronPort-AV: E=McAfee;i="6200,9189,9956"; a="182234187" X-IronPort-AV: E=Sophos;i="5.82,228,1613462400"; d="scan'208";a="182234187" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2021 13:43:13 -0700 IronPort-SDR: i9C/4jAj8Vvi1Y9dp2pCkqEvpRI1Vxlz0yCjoiHvUQlU4kr7pFApQVKy9uBWVrTUqT+2UO0nmi JnvLI15uIDgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,228,1613462400"; d="scan'208";a="384425618" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga006.jf.intel.com with ESMTP; 16 Apr 2021 13:43:12 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, vitaly.lifshits@intel.com, Dvora Fuxbrumer Subject: [PATCH net-next 6/6] igc: Expose LPI counters Date: Fri, 16 Apr 2021 13:45:00 -0700 Message-Id: <20210416204500.2012073-7-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210416204500.2012073-1-anthony.l.nguyen@intel.com> References: <20210416204500.2012073-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sasha Neftin Expose EEE Tx and Rx low power idle counters via ethtool A EEE TX or RX LPI event occurs when the transmitter or the receiver enters EEE (IEEE802.3az) LPI state. ethtool --statistics Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 8722294ab90c..9722449d7633 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -65,6 +65,8 @@ static const struct igc_stats igc_gstrings_stats[] = { IGC_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts), IGC_STAT("tx_hwtstamp_skipped", tx_hwtstamp_skipped), IGC_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared), + IGC_STAT("tx_lpi_counter", stats.tlpic), + IGC_STAT("rx_lpi_counter", stats.rlpic), }; #define IGC_NETDEV_STAT(_net_stat) { \