Skip to contentSkip to conversation

igc: Expose LPI counters

PATCH New Sasha Neftin 2 participants 2 messages Aug 13, 2020 – Aug 26, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igc: Expose LPI counters

Completion to commit 900d1e8b346b ("igc: Add LPI counters") LPI counters exposed by statitics update method.
A EEE TX LPI counter reflect the transmitter entries EEE (IEEE 802.3az) into the LPI state. A EEE RX LPI counter reflect the receiver link partner entries into EEE(IEEE 802.3az) LPI state.

---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 +++
 drivers/net/ethernet/intel/igc/igc_hw.h      | 2 ++
 drivers/net/ethernet/intel/igc/igc_main.c    | 2 ++
 3 files changed, 7 insertions(+)
drivers/net/ethernet/intel/igc/igc_ethtool.c +3 -0
index 44410c2265d6..61d331ce38cd 100644
@@ -321,6 +321,9 @@ static void igc_ethtool_get_regs(struct net_device *netdev,
 
 	for (i = 0; i < 8; i++)
 		regs_buff[205 + i] = rd32(IGC_ETQF(i));
+
+	regs_buff[213] = adapter->stats.tlpic;
+	regs_buff[214] = adapter->stats.rlpic;
 }
 
 static void igc_ethtool_get_wol(struct net_device *netdev,
drivers/net/ethernet/intel/igc/igc_hw.h +2 -0
index 6defdb8a31fe..b70253fb8ebc 100644
@@ -244,6 +244,8 @@ struct igc_hw_stats {
 	u64 prc511;
 	u64 prc1023;
 	u64 prc1522;
+	u64 tlpic;
+	u64 rlpic;
 	u64 gprc;
 	u64 bprc;
 	u64 mprc;
drivers/net/ethernet/intel/igc/igc_main.c +2 -0
index 298f408519f4..933e0d3445df 100644
@@ -3693,6 +3693,8 @@ void igc_update_stats(struct igc_adapter *adapter)
 	adapter->stats.prc511 += rd32(IGC_PRC511);
 	adapter->stats.prc1023 += rd32(IGC_PRC1023);
 	adapter->stats.prc1522 += rd32(IGC_PRC1522);
+	adapter->stats.tlpic += rd32(IGC_TLPIC);
+	adapter->stats.rlpic += rd32(IGC_RLPIC);
 
 	mpc = rd32(IGC_MPC);
 	adapter->stats.mpc += mpc;
Signature · 1 line
2.18.4
#1 lore raw

PATCH 1/1 igc: Expose LPI counters

Quoted 12 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Sasha Neftin
Sent: Thursday, August 13, 2020 8:18 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Expose LPI counters

Completion to commit 900d1e8b346b ("igc: Add LPI counters") LPI counters exposed by statitics update method.
A EEE TX LPI counter reflect the transmitter entries EEE (IEEE 802.3az) into the LPI state. A EEE RX LPI counter reflect the receiver link partner entries into EEE(IEEE 802.3az) LPI state.

Quoted 7 lines
---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 +++
 drivers/net/ethernet/intel/igc/igc_hw.h      | 2 ++
 drivers/net/ethernet/intel/igc/igc_main.c    | 2 ++
 3 files changed, 7 insertions(+)