[PATCH net-next 0/5] netdevsim: get link via ethtool, set via sysfs

From: Íñigo Huguet

Date: Sun May 10 2026 - 12:44:30 EST


Allow to read the carrier status of a netdevsim device via ethtool, like
most of Ethernet devices allow.

Also, allow to set its carrier status via sysfs. Currently it's only
possible by linking a peer device and setting its admin state to
UP/DOWN. By editing the carrier status via sysfs tests that need to
check carrier related stuff may be simpler.

The third patch add the proper selftest for both things, and the fourth
and fifth fix a few small bugs in the selftest itself.

Filip Pokryvka (1):
netdevsim: Add ethtool get_link support

Íñigo Huguet (4):
netdevsim: allow changing carrier state via sysfs
selftest: netdevsim: test carrier change via sysfs
selftest: netdevsim: cleanup the devices and module on failure
selftest: netdevsim: suppress socat warnings

drivers/net/netdevsim/ethtool.c | 1 +
drivers/net/netdevsim/netdev.c | 23 +++++
.../selftests/drivers/net/netdevsim/peer.sh | 84 ++++++++++++-------
3 files changed, 80 insertions(+), 28 deletions(-)

--
2.53.0