[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200630092412.11432-1-amitc@mellanox.com>
Date: Tue, 30 Jun 2020 12:24:09 +0300
From: Amit Cohen <amitc@...lanox.com>
To: netdev@...r.kernel.org
Cc: mkubecek@...e.cz, davem@...emloft.net, o.rempel@...gutronix.de,
andrew@...n.ch, f.fainelli@...il.com, jacob.e.keller@...el.com,
mlxsw@...lanox.com, Amit Cohen <amitc@...lanox.com>
Subject: [PATCH ethtool 0/3] Add extended link state
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
Powered by blists - more mailing lists