All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting
@ 2017-06-21 13:04 Gal Pressman
  2017-06-21 13:04 ` [RFC PATCH net-next 1/3] ethtool: Add link down reason callback Gal Pressman
                   ` (4 more replies)
  0 siblings, 5 replies; 30+ messages in thread
From: Gal Pressman @ 2017-06-21 13:04 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, John W. Linville, Saeed Mahameed,
	Vidya Sagar Ravipati, Jiri Pirko, David Decotigny, kernel-team,
	Gal Pressman

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

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-06-27 19:40 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 13:04 [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting Gal Pressman
2017-06-21 13:04 ` [RFC PATCH net-next 1/3] ethtool: Add link down reason callback Gal Pressman
2017-06-21 13:58   ` Andrew Lunn
2017-06-22  8:09     ` Gal Pressman
2017-06-22 13:34       ` Andrew Lunn
2017-06-23  8:23         ` Gal Pressman
2017-06-23 13:52           ` Andrew Lunn
2017-06-24 19:04       ` Andrew Lunn
2017-06-25 11:59         ` Gal Pressman
2017-06-25 15:19           ` Andrew Lunn
2017-06-26 11:52             ` Gal Pressman
2017-06-26 13:34               ` Andrew Lunn
2017-06-27 19:40                 ` David Miller
2017-06-21 15:43   ` Stephen Hemminger
2017-06-22 10:33     ` Gal Pressman
2017-06-26 13:28   ` Andrew Lunn
2017-06-26 15:48     ` Gal Pressman
2017-06-21 13:04 ` [RFC PATCH net-next 2/3] net/mlx5: Add PDDR register infrastructure Gal Pressman
2017-06-21 13:04 ` [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool Gal Pressman
2017-06-21 14:03   ` Andrew Lunn
2017-06-22  8:17     ` Gal Pressman
2017-06-22  4:33   ` Jakub Kicinski
2017-06-22  8:33     ` Gal Pressman
2017-06-22 22:38       ` Jakub Kicinski
2017-06-23  8:52         ` Gal Pressman
2017-06-21 15:44 ` [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting Stephen Hemminger
2017-06-22 11:13   ` Gal Pressman
2017-06-22  4:14 ` Jakub Kicinski
2017-06-22 11:37   ` Gal Pressman
2017-06-22 21:53     ` Jakub Kicinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.