Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-next v1 1/2] igc: add support for rx_symbol_errors statistic
@ 2026-11-24  7:07 Sasha Neftin
  2026-11-24  7:07 ` [PATCH iwl-next v1 2/2] e1000e: add support for rx_sym_errors statistic Sasha Neftin
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Neftin @ 2026-11-24  7:07 UTC (permalink / raw)
  To: intel-wired-lan

Expose the Symbol Error Count (SYMERRS) register to ethtool statistics.

The SYMERRS register (0x04008) tracks physical layer symbol errors. Define
the register, clear it during hardware counters reset, update it in adapter
stats, and export "rx_symbol_errors" in igc_gstrings_stats so it can be
retrieved via `ethtool --statistics`.

Signed-off-by: Sasha Neftin <sashaneftin@gmail.com>
---
 drivers/net/ethernet/intel/igc/igc_ethtool.c | 1 +
 drivers/net/ethernet/intel/igc/igc_mac.c     | 1 +
 drivers/net/ethernet/intel/igc/igc_main.c    | 1 +
 drivers/net/ethernet/intel/igc/igc_regs.h    | 1 +
 4 files changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index 4ebc0c7f5fc4..dead327baa17 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -35,6 +35,7 @@ static const struct igc_stats igc_gstrings_stats[] = {
 	IGC_STAT("multicast", stats.mprc),
 	IGC_STAT("collisions", stats.colc),
 	IGC_STAT("rx_crc_errors", stats.crcerrs),
+	IGC_STAT("rx_symbol_errors", stats.symerrs),
 	IGC_STAT("rx_no_buffer_count", stats.rnbc),
 	IGC_STAT("rx_missed_errors", stats.mpc),
 	IGC_STAT("tx_aborted_errors", stats.ecol),
diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index d6f3f6618469..db28f1c2f24a 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -235,6 +235,7 @@ s32 igc_force_mac_fc(struct igc_hw *hw)
 void igc_clear_hw_cntrs_base(struct igc_hw *hw)
 {
 	rd32(IGC_CRCERRS);
+	rd32(IGC_SYMERRS);
 	rd32(IGC_MPC);
 	rd32(IGC_SCC);
 	rd32(IGC_ECOL);
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e36d6761a0be..dbebdb0d15b8 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -5237,6 +5237,7 @@ void igc_update_stats(struct igc_adapter *adapter)
 
 	/* read stats registers */
 	adapter->stats.crcerrs += rd32(IGC_CRCERRS);
+	adapter->stats.symerrs += rd32(IGC_SYMERRS);
 	adapter->stats.gprc += rd32(IGC_GPRC);
 	adapter->stats.gorc += rd32(IGC_GORCL);
 	rd32(IGC_GORCH); /* clear GORCL */
diff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h
index f343c6bfc6be..89f146d88d04 100644
--- a/drivers/net/ethernet/intel/igc/igc_regs.h
+++ b/drivers/net/ethernet/intel/igc/igc_regs.h
@@ -132,6 +132,7 @@
 /* Statistics Register Descriptions */
 #define IGC_CRCERRS	0x04000  /* CRC Error Count - R/clr */
 #define IGC_ALGNERRC	0x04004  /* Alignment Error Count - R/clr */
+#define IGC_SYMERRS	0x04008  /* Symbol Error Count - R/clr */
 #define IGC_RXERRC	0x0400C  /* Receive Error Count - R/clr */
 #define IGC_MPC		0x04010  /* Missed Packet Count - R/clr */
 #define IGC_SCC		0x04014  /* Single Collision Count - R/clr */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-24  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24  7:07 [PATCH iwl-next v1 1/2] igc: add support for rx_symbol_errors statistic Sasha Neftin
2026-11-24  7:07 ` [PATCH iwl-next v1 2/2] e1000e: add support for rx_sym_errors statistic Sasha Neftin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox