[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1498050286-17141-1-git-send-email-galp@mellanox.com>
Date: Wed, 21 Jun 2017 16:04:43 +0300
From: Gal Pressman <galp@...lanox.com>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
"John W. Linville" <linville@...driver.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Vidya Sagar Ravipati <vidya@...ulusnetworks.com>,
Jiri Pirko <jiri@...lanox.com>,
David Decotigny <decot@...glers.com>, kernel-team@...com,
Gal Pressman <galp@...lanox.com>
Subject: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting
Hi All,
Currently, drivers can only tell whether the link is up/down through
ETHTOOL_GLINK callback, but no additional information is given in case
of link down/failure.
This series provides an infrastructure to ethtool that allows
netdevice drivers to hint the user with the reason why the link is down,
in order to ease the debug process.
In addition two more mlx5 patches to demonstrate the usage.
Reasons are separated to two types, generic and vendor specific.
Drivers can reply with a generic reason using the predefined enums
(and the ones that will be added in the future), which will be
translated to strings by the userspace ethtool.
In case of a vendor specific reason, drivers can reply with
ETHTOOL_VENDOR_SPECIFIC reason, in this case the vendor_reason field
should be filled with a vendor specific status code which will be parsed
by the vendor specific userspace parser if one is available.
This kind of information can save system administrators precious time,
which will not be wasted trying to understand why the link won't go up.
For example, when the cable is unplugged:
$ ethtool ethXX
...
Link detected: no (Cable unplugged)
Thanks,
Gal.
Gal Pressman (3):
ethtool: Add link down reason callback
net/mlx5: Add PDDR register infrastructure
net/mlx5e: Expose link down reason to ethtool
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 107 +++++++++++++++++++++
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 33 +++++++
drivers/net/ethernet/mellanox/mlx5/core/port.c | 39 ++++++++
include/linux/ethtool.h | 2 +
include/linux/mlx5/device.h | 3 +
include/linux/mlx5/driver.h | 1 +
include/linux/mlx5/mlx5_ifc.h | 51 ++++++++++
include/uapi/linux/ethtool.h | 33 +++++++
net/core/ethtool.c | 24 +++++
9 files changed, 293 insertions(+)
--
2.7.4
Powered by blists - more mailing lists