Skip to content

Commit 40edc73

Browse files
aneftinanguy11
authored andcommitted
igc: Expose LPI counters
Completion to commit 900d1e8 ("igc: Add LPI counters") LPI counters exposed by statistics 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. Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent ef8a17a commit 40edc73

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

drivers/net/ethernet/intel/igc/igc_ethtool.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ static void igc_ethtool_get_regs(struct net_device *netdev,
321321

322322
for (i = 0; i < 8; i++)
323323
regs_buff[205 + i] = rd32(IGC_ETQF(i));
324+
325+
regs_buff[213] = adapter->stats.tlpic;
326+
regs_buff[214] = adapter->stats.rlpic;
324327
}
325328

326329
static void igc_ethtool_get_wol(struct net_device *netdev,

drivers/net/ethernet/intel/igc/igc_hw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ struct igc_hw_stats {
244244
u64 prc511;
245245
u64 prc1023;
246246
u64 prc1522;
247+
u64 tlpic;
248+
u64 rlpic;
247249
u64 gprc;
248250
u64 bprc;
249251
u64 mprc;

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3683,6 +3683,8 @@ void igc_update_stats(struct igc_adapter *adapter)
36833683
adapter->stats.prc511 += rd32(IGC_PRC511);
36843684
adapter->stats.prc1023 += rd32(IGC_PRC1023);
36853685
adapter->stats.prc1522 += rd32(IGC_PRC1522);
3686+
adapter->stats.tlpic += rd32(IGC_TLPIC);
3687+
adapter->stats.rlpic += rd32(IGC_RLPIC);
36863688

36873689
mpc = rd32(IGC_MPC);
36883690
adapter->stats.mpc += mpc;

0 commit comments

Comments
 (0)