Currently, device drivers can only indicate to user space if the network link is up or down, without additional information.
This patch set expand link-state to allow these drivers to expose more information to user space about the link state. The information can save users' time when trying to understand why a link is not operationally up, for example. The above is achieved by extending the existing ethtool LINKSTATE_GET command with attributes that carry the extended state. For example, no link due to missing cable: $ ethtool ethX ... Link detected: no (No cable) Beside the general extended state, drivers can pass additional information about the link state using the sub-state field. For example: $ ethtool ethX ... Link detected: no (Autoneg, No partner detected) Amit Cohen (3): netlink: expand ETHTOOL_LINKSTATE with extended state attributes common: add infrastructure to convert kernel values to userspace strings netlink: settings: expand linkstate_reply_cb() to support link extended state common.c | 171 +++++++++++++++++++++++++++++++++++ common.h | 2 + netlink/desc-ethtool.c | 2 + netlink/settings.c | 59 +++++++++++- uapi/linux/ethtool_netlink.h | 2 + 5 files changed, 233 insertions(+), 3 deletions(-) -- 2.20.1