Skip to content

Commit

Permalink
igc: Expose LPI counters
Browse files Browse the repository at this point in the history
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 <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
  • Loading branch information
Sasha Neftin authored and Tony Nguyen committed Sep 28, 2020
1 parent ef8a17a commit 40edc73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/intel/igc/igc_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/intel/igc/igc_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ struct igc_hw_stats {
u64 prc511;
u64 prc1023;
u64 prc1522;
u64 tlpic;
u64 rlpic;
u64 gprc;
u64 bprc;
u64 mprc;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/intel/igc/igc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,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;
Expand Down

0 comments on commit 40edc73

Please sign in to comment.