[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200702131111.23105-1-amitc@mellanox.com>
Date: Thu, 2 Jul 2020 16:11:08 +0300
From: Amit Cohen <amitc@...lanox.com>
To: netdev@...r.kernel.org
Cc: mkubecek@...e.cz, 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 v2 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)
Changes since v1:
* Do not mix uapi header updates with other changes
* Update header files in uapi/ to a net-next snapshot
* Move helper functions from common.c to netlink/settings.c
* Use string tables for enum strings
* Report the numeric value in case of unknown value
* Use banner once, change print concept
Amit Cohen (3):
uapi: linux: update kernel UAPI header files
netlink: desc-ethtool.c: Add descriptions of extended state attributes
netlink: settings: expand linkstate_reply_cb() to support link
extended state
netlink/desc-ethtool.c | 2 +
netlink/settings.c | 147 ++++++++++++++++++++++++++++++++++-
uapi/linux/ethtool.h | 70 +++++++++++++++++
uapi/linux/ethtool_netlink.h | 2 +
4 files changed, 220 insertions(+), 1 deletion(-)
--
2.20.1
Powered by blists - more mailing lists