Ethtool : PRBS feature
From: Das, Shubham <hidden>
Date: 2026-06-11 09:37:45
Hi All,
I'm looking for feedback on a potential extension to ethtool for controlling Ethernet PHY link characterization using PRBS generation and error injection.
PRBS is a port level configuration and ethtool ?phy-test will provide control interface at every port-level.
PRBS is an IEEE standard, and almost all Ethernet PHY SerDes comes with PRBS generator and receiver to assist physical link characterization.
In addition to PRBS sequence, we want to support provide SW control knobs to insert fixed number of errors, retrieve the bit error count, and clear them as needed.
With this, we are trying to standardize a multi-decade technology PRBS, so every Ethernet vendor can get benefited and replace the device specific custom tools.
From Ethernet designer point-of-view, it helps identify, fine tune, and make the ethernet communication better and stable.
From end-user point of view, it helps gather debug data when something is not working at expected speeds.
Typical operations include:
ethtool --phy-test eth1 tx-prbs prbs7
ethtool --phy-test eth2 rx-prbs prbs7
ethtool --phy-test eth2 bert start
ethtool --phy-test eth2 bert stop
ethtool --phy-test eth2 stats
ethtool --phy-test eth2 clear-stats
ethtool --phy-test eth1 inject-error 1
ethtool --phy-test eth1 inject-error 1e-3
ethtool --phy-test eth1 tx-prbs off
ethtool --phy-test eth2 rx-prbs off
Approach would be to add a generic ethtool netlink API for PHY/SerDes and allow drivers to implement the operations directly.
Conceptually:
ethtool ⇒ ethtool netlink ⇒ driver-specific implementation
The intent would be to provide a common userspace interface while allowing implementations in NIC drivers.
Before proceeding further, I would appreciate feedback on:
1. Whether ethtool is considered the appropriate userspace interface for these functionality
2. Whether similar work has been proposed previously.
Thanks,
Shubham D