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>
This commit is contained in:
Jakub Kicinski
2021-04-16 12:27:40 -07:00
committed by David S. Miller
parent f09ea6fb12
commit ca2244547e
6 changed files with 182 additions and 0 deletions

View File

@@ -671,6 +671,7 @@ enum ethtool_link_ext_substate_cable_issue {
* @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
* @ETH_SS_STATS_STD: standardized stats
* @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics
* @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics
*
* @ETH_SS_COUNT: number of defined string sets
*/
@@ -693,6 +694,7 @@ enum ethtool_stringset {
ETH_SS_UDP_TUNNEL_TYPES,
ETH_SS_STATS_STD,
ETH_SS_STATS_ETH_PHY,
ETH_SS_STATS_ETH_MAC,
/* add new constants above here */
ETH_SS_COUNT