[RFC] igc: clarify RXERRC and RERC counter semantics

From: Josh Ervin <hidden>
Date: 2026-09-02 08:29:13
Also in: intel-wired-lan

Hello!

The current igc driver implementation reports stats.colc as the sum
of IGC_COLC and IGC_RERC (introduced in 51c657b42f58fcf061dfd6d01df26ff1701ae72c).

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

This accumulation intutively appears incorrect, as I would not expect
a receive error counter to be counted as a collision.

Grouping of these registers seems to have been commonplace in other OS's.
Prior to https://cgit.freebsd.org/src/commit/?id=a108ee9138a698f212d6d6832d54e88ce6786617,
for example, FreeBSD had grouped colc and rerc under different counters.

However, I am unsure of an exact path forward since the device has multiple
RX error counters. Namely, IGC_RXERRC (0x0400C) and IGC_RERC (0x0402C), both
of which contain the description "Receive Error Count - R/clr".

Could someone clarify the hardware semantics of these registers on I225 and I226 devices?
  - What is the distinction between RXERRC and RERC?
  - Which receive-error conditions does each register count?
  - Which other counters, such as CRCERRS, ALGNERRC, RUC, RFC, and ROC,
    overlap with RXERRC or RERC?

Would we be open to adoption of the accounting recently adopted by FreeBSD?
Namely:
  - Accumulate RXERRC into stats.rxerrc
  - Maintain RERC as a separate diagnostic counter
  - Report collisions from COLC alone.
  - Keep RERC out of rx_errors because it appears to overlap RXERRC

Cheers,
Josh Ervin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help