From: Sasha Neftin <sashaneftin@gmail.com>
To: intel-wired-lan@osuosl.org
Subject: [PATCH iwl-next v1 1/2] igc: add support for rx_symbol_errors statistic
Date: Tue, 24 Nov 2026 09:07:09 +0200 [thread overview]
Message-ID: <20261124070710.9728-1-sashaneftin@gmail.com> (raw)
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
next reply other threads:[~2026-11-24 7:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 7:07 Sasha Neftin [this message]
2026-11-24 7:07 ` [PATCH iwl-next v1 2/2] e1000e: add support for rx_sym_errors statistic Sasha Neftin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124070710.9728-1-sashaneftin@gmail.com \
--to=sashaneftin@gmail.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox