diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-04-16 21:27:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-17 01:59:20 +0200 |
commit | ca2244547ec7505d1cf61d43f5e76e3ffd99cf77 (patch) | |
tree | 2fa1664495bdad762d84c60b1d64c8fc9da51602 /net/ethtool/strset.c | |
parent | ethtool: add a new command for reading standard stats (diff) | |
download | linux-ca2244547ec7505d1cf61d43f5e76e3ffd99cf77.tar.xz linux-ca2244547ec7505d1cf61d43f5e76e3ffd99cf77.zip |
ethtool: add interface to read standard MAC stats
Most of the MAC statistics are included in
struct rtnl_link_stats64, but some fields
are aggregated. Besides it's good to expose
these clearly hardware stats separately.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/strset.c')
-rw-r--r-- | net/ethtool/strset.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c index 5f3c73587ff4..a8aac7bcfcc9 100644 --- a/net/ethtool/strset.c +++ b/net/ethtool/strset.c @@ -90,6 +90,11 @@ static const struct strset_info info_template[] = { .count = __ETHTOOL_A_STATS_ETH_PHY_CNT, .strings = stats_eth_phy_names, }, + [ETH_SS_STATS_ETH_MAC] = { + .per_dev = false, + .count = __ETHTOOL_A_STATS_ETH_MAC_CNT, + .strings = stats_eth_mac_names, + }, }; struct strset_req_info { |