Skip to content

Commit 7d66c74

Browse files
oleremPaolo Abeni
authored andcommitted
Documentation: networking: update PHY error counter diagnostics in twisted pair guide
Replace generic instructions for monitoring error counters with a procedure using the unified PHY statistics interface (`--all-groups`). Signed-off-by: Oleksij Rempel <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 6167c0b commit 7d66c74

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

Documentation/networking/diagnostic/twisted_pair_layer1_diagnostics.rst

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -713,17 +713,23 @@ driver supports reporting such events.
713713

714714
- **Monitor Error Counters**:
715715

716-
- While some NIC drivers and PHYs provide error counters, there is no unified
717-
set of PHY-specific counters across all hardware. Additionally, not all
718-
PHYs provide useful information related to errors like CRC errors, frame
719-
drops, or link flaps. Therefore, this step is dependent on the specific
720-
hardware and driver support.
721-
722-
- **Next Steps**: Use `ethtool -S <interface>` to check if your driver
723-
provides useful error counters. In some cases, counters may provide
724-
information about errors like link flaps or physical layer problems (e.g.,
725-
excessive CRC errors), but results can vary significantly depending on the
726-
PHY.
716+
- Use `ethtool -S <interface> --all-groups` to retrieve standardized interface
717+
statistics if the driver supports the unified interface:
718+
719+
- **Command:** `ethtool -S <interface> --all-groups`
720+
721+
- **Example Output (if supported)**:
722+
723+
.. code-block:: bash
724+
725+
phydev-RxFrames: 100391
726+
phydev-RxErrors: 0
727+
phydev-TxFrames: 9
728+
phydev-TxErrors: 0
729+
730+
- If the unified interface is not supported, use `ethtool -S <interface>` to
731+
retrieve MAC and PHY counters. Note that non-standardized PHY counter names
732+
vary by driver and must be interpreted accordingly:
727733

728734
- **Command:** `ethtool -S <interface>`
729735

@@ -740,6 +746,17 @@ driver supports reporting such events.
740746
condition) or kernel log messages (e.g., link up/down events) to further
741747
diagnose the issue.
742748

749+
- **Compare Counters**:
750+
751+
- Compare the egress and ingress frame counts reported by the PHY and MAC.
752+
753+
- A small difference may occur due to sampling rate differences between the
754+
MAC and PHY drivers, or if the PHY and MAC are not always fully
755+
synchronized in their UP or DOWN states.
756+
757+
- Significant discrepancies indicate potential issues in the data path
758+
between the MAC and PHY.
759+
743760
When All Else Fails...
744761
~~~~~~~~~~~~~~~~~~~~~~
745762

0 commit comments

Comments
 (0)