diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-11-04 20:01:25 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-11-08 10:36:54 +0100 |
commit | 9a0f830f80265bd1ef816e1541ac24bee80e9a3c (patch) | |
tree | 6b133c57ec859a96c27e2a06c9f80405c448b540 /Documentation/networking/ethtool-netlink.rst | |
parent | Merge branch 'net-txgbe-fix-two-bugs-in-txgbe_calc_eeprom_checksum' (diff) | |
download | linux-9a0f830f80265bd1ef816e1541ac24bee80e9a3c.tar.xz linux-9a0f830f80265bd1ef816e1541ac24bee80e9a3c.zip |
ethtool: linkstate: add a statistic for PHY down events
The previous attempt to augment carrier_down (see Link)
was not met with much enthusiasm so let's do the simple
thing of exposing what some devices already maintain.
Add a common ethtool statistic for link going down.
Currently users have to maintain per-driver mapping
to extract the right stat from the vendor-specific ethtool -S
stats. carrier_down does not fit the bill because it counts
a lot of software related false positives.
Add the statistic to the extended link state API to steer
vendors towards implementing all of it.
Implement for bnxt and all Linux-controlled PHYs. mlx5 and (possibly)
enic also have a counter for this but I leave the implementation
to their maintainers.
Link: https://lore.kernel.org/r/20220520004500.2250674-1-kuba@kernel.org
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20221104190125.684910-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'Documentation/networking/ethtool-netlink.rst')
-rw-r--r-- | Documentation/networking/ethtool-netlink.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst index d578b8bcd8a4..bede24ef44fd 100644 --- a/Documentation/networking/ethtool-netlink.rst +++ b/Documentation/networking/ethtool-netlink.rst @@ -491,6 +491,7 @@ Kernel response contents: ``ETHTOOL_A_LINKSTATE_SQI_MAX`` u32 Max support SQI value ``ETHTOOL_A_LINKSTATE_EXT_STATE`` u8 link extended state ``ETHTOOL_A_LINKSTATE_EXT_SUBSTATE`` u8 link extended substate + ``ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT`` u32 count of link down events ==================================== ====== ============================ For most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns |