Skip to content

Commit

Permalink
igc: Add Receive Error Counter
Browse files Browse the repository at this point in the history
Receive error counter reflect total number of non-filtered
packets received with errors. This includes: CRC error,
symbol error, Rx data error and carrier extend error.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Sasha Neftin authored and Jeff Kirsher committed May 29, 2020
1 parent 758b51e commit 51c657b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igc/igc_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void igc_clear_hw_cntrs_base(struct igc_hw *hw)
rd32(IGC_MCC);
rd32(IGC_LATECOL);
rd32(IGC_COLC);
rd32(IGC_RERC);
rd32(IGC_DC);
rd32(IGC_SEC);
rd32(IGC_RLEC);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igc/igc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3740,6 +3740,7 @@ void igc_update_stats(struct igc_adapter *adapter)

adapter->stats.tpt += rd32(IGC_TPT);
adapter->stats.colc += rd32(IGC_COLC);
adapter->stats.colc += rd32(IGC_RERC);

adapter->stats.algnerrc += rd32(IGC_ALGNERRC);

Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/igc/igc_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
#define IGC_MCC 0x0401C /* Multiple Collision Count - R/clr */
#define IGC_LATECOL 0x04020 /* Late Collision Count - R/clr */
#define IGC_COLC 0x04028 /* Collision Count - R/clr */
#define IGC_RERC 0x0402C /* Receive Error Count - R/clr */
#define IGC_DC 0x04030 /* Defer Count - R/clr */
#define IGC_TNCRS 0x04034 /* Tx-No CRS - R/clr */
#define IGC_SEC 0x04038 /* Sequence Error Count - R/clr */
Expand Down

0 comments on commit 51c657b

Please sign in to comment.