igc: Expose LPI counters
authorSasha Neftin <sasha.neftin@intel.com>
Wed, 24 Mar 2021 13:15:25 +0000 (15:15 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 16 Apr 2021 20:15:45 +0000 (13:15 -0700)
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 <iface>

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_ethtool.c

index 8722294ab90ce9131b17b4a519d87dc94d543a23..9722449d7633d68d9f002181c3d056107482e54e 100644 (file)
@@ -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) { \