linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 00/10] Add extended state
@ 2020-06-07 14:59 Amit Cohen
  2020-06-07 14:59 ` [RFC PATCH net-next 01/10] mlxsw: spectrum_dcb: Rename mlxsw_sp_port_headroom_set() Amit Cohen
                   ` (9 more replies)
  0 siblings, 10 replies; 31+ messages in thread
From: Amit Cohen @ 2020-06-07 14:59 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, corbet, jiri, idosch, shuah, mkubecek, gustavo,
	amitc, cforno12, andrew, f.fainelli, linux, alexandru.ardelean,
	ayal, petrm, mlxsw, liuhangbin, linux-doc, linux-kernel,
	linux-kselftest

Currently, drivers can only tell whether the link is up/down,
but no additional information is given.

This patch set provides an infrastructure that allows drivers to expose
to the user more information in addition to the link state.

This information can save users time which will not be wasted
trying to understand why the link is not up for example.

Expand the existing LINKSTATE_GET command with attributes for extended
state.

From userspace, user can see the extended state like:
$ ethtool ethX
...
Link detected: no (No cable)

In addition, when drivers have another information about the general
extended state, it can be passed also using substate field.

From userspace:
$ ethtool ethX
...
Link detected: no (Autoneg failure, No partner detected)

In the future the infrastructure can be used for example by PHY drivers to
report whether a downshift to a lower speed occurred, something like:
$ ethtool ethX
...
Link detected: yes (downshifted)

Patches #1-#3 Move mlxsw ethtool code to separate file
Patches #4-#5 Add infrastructure in ethtool
Patches #6-#7 Add support of extended state in mlxsw driver
Patches #8-#10 Add tests cases

Amit Cohen (10):
  mlxsw: spectrum_dcb: Rename mlxsw_sp_port_headroom_set()
  mlxsw: Move ethtool_ops to spectrum_ethtool.c
  mlxsw: spectrum_ethtool: Move mlxsw_sp_port_type_speed_ops structs
  ethtool: Add link extended state
  Documentation: networking: ethtool-netlink: Add link extended state
  mlxsw: reg: Port Diagnostics Database Register
  mlxsw: spectrum_ethtool: Add link extended state
  selftests: forwarding: ethtool: Move different_speeds_get() to
    ethtool_lib
  selftests: forwarding: forwarding.config.sample: Add port with no
    cable connected
  selftests: forwarding: Add tests for ethtool extended state

 Documentation/networking/ethtool-netlink.rst  |   56 +-
 drivers/net/ethernet/mellanox/mlxsw/Makefile  |    3 +-
 drivers/net/ethernet/mellanox/mlxsw/reg.h     |   51 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    | 1540 +---------------
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   45 +
 .../ethernet/mellanox/mlxsw/spectrum_dcb.c    |    6 +-
 .../mellanox/mlxsw/spectrum_ethtool.c         | 1641 +++++++++++++++++
 include/linux/ethtool.h                       |   22 +
 include/uapi/linux/ethtool.h                  |   70 +
 include/uapi/linux/ethtool_netlink.h          |    2 +
 net/ethtool/linkstate.c                       |   40 +
 .../selftests/net/forwarding/ethtool.sh       |   17 -
 .../net/forwarding/ethtool_extended_state.sh  |  103 ++
 .../selftests/net/forwarding/ethtool_lib.sh   |   17 +
 .../net/forwarding/forwarding.config.sample   |    3 +
 15 files changed, 2057 insertions(+), 1559 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c
 create mode 100755 tools/testing/selftests/net/forwarding/ethtool_extended_state.sh

-- 
2.20.1


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

end of thread, other threads:[~2020-06-09 10:26 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 14:59 [RFC PATCH net-next 00/10] Add extended state Amit Cohen
2020-06-07 14:59 ` [RFC PATCH net-next 01/10] mlxsw: spectrum_dcb: Rename mlxsw_sp_port_headroom_set() Amit Cohen
2020-06-07 19:13   ` Florian Fainelli
2020-06-07 14:59 ` [RFC PATCH net-next 02/10] mlxsw: Move ethtool_ops to spectrum_ethtool.c Amit Cohen
2020-06-07 19:14   ` Florian Fainelli
2020-06-07 14:59 ` [RFC PATCH net-next 03/10] mlxsw: spectrum_ethtool: Move mlxsw_sp_port_type_speed_ops structs Amit Cohen
2020-06-07 19:14   ` Florian Fainelli
2020-06-07 14:59 ` [RFC PATCH net-next 04/10] ethtool: Add link extended state Amit Cohen
2020-06-07 15:30   ` Andrew Lunn
2020-06-08 10:03     ` Amit Cohen
2020-06-07 16:02   ` Andrew Lunn
2020-06-07 16:12   ` Andrew Lunn
2020-06-07 16:27   ` Andrew Lunn
2020-06-07 18:17   ` Florian Fainelli
2020-06-09 10:24     ` Amit Cohen
2020-06-07 14:59 ` [RFC PATCH net-next 05/10] Documentation: networking: ethtool-netlink: " Amit Cohen
2020-06-07 16:47   ` Andrew Lunn
2020-06-08 10:02     ` Amit Cohen
2020-06-08 13:47       ` Andrew Lunn
2020-06-07 19:11   ` Florian Fainelli
2020-06-08 15:59     ` Amit Cohen
2020-06-07 14:59 ` [RFC PATCH net-next 06/10] mlxsw: reg: Port Diagnostics Database Register Amit Cohen
2020-06-07 14:59 ` [RFC PATCH net-next 07/10] mlxsw: spectrum_ethtool: Add link extended state Amit Cohen
2020-06-07 18:25   ` Florian Fainelli
2020-06-09  6:58     ` Amit Cohen
2020-06-07 14:59 ` [RFC PATCH net-next 08/10] selftests: forwarding: ethtool: Move different_speeds_get() to ethtool_lib Amit Cohen
2020-06-07 18:18   ` Florian Fainelli
2020-06-07 14:59 ` [RFC PATCH net-next 09/10] selftests: forwarding: forwarding.config.sample: Add port with no cable connected Amit Cohen
2020-06-07 18:18   ` Florian Fainelli
2020-06-07 14:59 ` [RFC PATCH net-next 10/10] selftests: forwarding: Add tests for ethtool extended state Amit Cohen
2020-06-07 18:22   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).