There exist numerous ethtool commands that gets their information from an interface's PHY. This series allows creating virtual PHY devices attached to netdevsim, so that we can start testing these commands.
This first series adds a minimal support. The PHY that we add are only capable of saying if the link is up or down, based on a debugfs file.
When accepted, this interface can be extended to allow testing further commands, and in greater details.
This series also add some selftests for the "ethtool --show-phys" command. This is a first step towards having better testability for the ethtool netlink PHY commands, but this could also potentially be a stepping stone for some basic phylib tests ?
Thanks,
Maxime
Maxime Chevallier (3): net: netdevsim: Add PHY support in netdevsim selftests: ethtool: Drop the unused old_netdevs variable selftests: ethtool: Introduce ethernet PHY selftests on netdevsim
drivers/net/netdevsim/Makefile | 4 + drivers/net/netdevsim/dev.c | 2 + drivers/net/netdevsim/netdev.c | 3 + drivers/net/netdevsim/netdevsim.h | 14 + drivers/net/netdevsim/phy.c | 387 ++++++++++++++++++ .../selftests/drivers/net/netdevsim/config | 1 + .../drivers/net/netdevsim/ethtool-common.sh | 19 +- .../drivers/net/netdevsim/ethtool-phy.sh | 64 +++ 8 files changed, 491 insertions(+), 3 deletions(-) create mode 100644 drivers/net/netdevsim/phy.c create mode 100755 tools/testing/selftests/drivers/net/netdevsim/ethtool-phy.sh