diff options
author | David S. Miller <davem@davemloft.net> | 2021-04-15 17:08:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-15 17:08:30 -0700 |
commit | 392c36e5be1dee19ffce8c8ba8f07f90f5aa3f7c (patch) | |
tree | 349ada73538dacef753810ee5b79055dd0574a3a /net/ethtool/pause.c | |
parent | 38ebcf5096a86762b82262e96b2c8b170fe79040 (diff) | |
parent | 1703bb50df0e4248b8def88fc6dd43a505479c66 (diff) |
Merge branch 'ehtool-fec-stats'
Jakub Kicinski says:
====================
ethtool: add standard FEC statistics
This set adds uAPI for reporting standard FEC statistics, and
implements it in a handful of drivers.
The statistics are taken from the IEEE standard, with one
extra seemingly popular but not standard statistics added.
The implementation is similar to that of the pause frame
statistics, user requests the stats by setting a bit
(ETHTOOL_FLAG_STATS) in the common ethtool header of
ETHTOOL_MSG_FEC_GET.
Since standard defines the statistics per lane what's
reported is both total and per-lane counters:
# ethtool -I --show-fec eth0
FEC parameters for eth0:
Configured FEC encodings: None
Active FEC encoding: None
Statistics:
corrected_blocks: 256
Lane 0: 255
Lane 1: 1
uncorrectable_blocks: 145
Lane 0: 128
Lane 1: 17
v2: check for errors in mlx5 register access
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/pause.c')
-rw-r--r-- | net/ethtool/pause.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ethtool/pause.c b/net/ethtool/pause.c index 09998dc5c185..f1967c121278 100644 --- a/net/ethtool/pause.c +++ b/net/ethtool/pause.c @@ -21,12 +21,6 @@ const struct nla_policy ethnl_pause_get_policy[] = { NLA_POLICY_NESTED(ethnl_header_policy_stats), }; -static void ethtool_stats_init(u64 *stats, unsigned int n) -{ - while (n--) - stats[n] = ETHTOOL_STAT_NOT_SET; -} - static int pause_prepare_data(const struct ethnl_req_info *req_base, struct ethnl_reply_data *reply_base, struct genl_info *info) |