summaryrefslogtreecommitdiffstats
path: root/net/ethtool/strset.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-04-16 12:27:40 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-16 16:59:20 -0700
commitca2244547ec7505d1cf61d43f5e76e3ffd99cf77 (patch)
tree2fa1664495bdad762d84c60b1d64c8fc9da51602 /net/ethtool/strset.c
parentf09ea6fb12723d6726293d68de00b6307368bd76 (diff)
downloadlinux-stable-ca2244547ec7505d1cf61d43f5e76e3ffd99cf77.tar.gz
linux-stable-ca2244547ec7505d1cf61d43f5e76e3ffd99cf77.tar.bz2
linux-stable-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.c5
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 {