Most devices maintain RMON (RFC 2819) stats - particularly the "histogram" of packets received by size. Unlike other RFCs which duplicate IEEE stats, the short/oversized frame counters in RMON don't seem to match IEEE stats 1-to-1 either, so expose those, too. Do not expose basic packet, CRC errors etc - those are already otherwise covered. Because standard defines packet ranges only up to 1518, and everything above that should theoretically be "oversized" - devices often create their own ranges. Going beyond what the RFC defines - expose the "histogram" in the Tx direction (assume for now that the ranges will be the same).
Showing the changes to include/uapi (2 of 6 files). Show all
Unified · Split
| @@ -673,6 +673,7 @@ enum ethtool_link_ext_substate_cable_issue { · 672 unmodified lines | |||
| 673 | * @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics | 673 | * @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics |
| 674 | * @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics | 674 | * @ETH_SS_STATS_ETH_MAC: names of IEEE 802.3 MAC statistics |
| 675 | * @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics | 675 | * @ETH_SS_STATS_ETH_CTRL: names of IEEE 802.3 MAC Control statistics |
| 676 | * @ETH_SS_STATS_RMON: names of RMON statistics | ||
| 676 | * | 677 | * |
| 677 | * @ETH_SS_COUNT: number of defined string sets | 678 | * @ETH_SS_COUNT: number of defined string sets |
| 678 | */ | 679 | */ |
| @@ -697,6 +698,7 @@ enum ethtool_stringset { · 18 unmodified lines | |||
| 697 | ETH_SS_STATS_ETH_PHY, | 698 | ETH_SS_STATS_ETH_PHY, |
| 698 | ETH_SS_STATS_ETH_MAC, | 699 | ETH_SS_STATS_ETH_MAC, |
| 699 | ETH_SS_STATS_ETH_CTRL, | 700 | ETH_SS_STATS_ETH_CTRL, |
| 701 | ETH_SS_STATS_RMON, | ||
| 700 | 702 | ||
| 701 | /* add new constants above here */ | 703 | /* add new constants above here */ |
| 702 | ETH_SS_COUNT | 704 | ETH_SS_COUNT |
| @@ -700,6 +700,7 @@ enum { · 699 unmodified lines | |||
| 700 | ETHTOOL_STATS_ETH_PHY, | 700 | ETHTOOL_STATS_ETH_PHY, |
| 701 | ETHTOOL_STATS_ETH_MAC, | 701 | ETHTOOL_STATS_ETH_MAC, |
| 702 | ETHTOOL_STATS_ETH_CTRL, | 702 | ETHTOOL_STATS_ETH_CTRL, |
| 703 | ETHTOOL_STATS_RMON, | ||
| 703 | 704 | ||
| 704 | /* add new constants above here */ | 705 | /* add new constants above here */ |
| 705 | __ETHTOOL_STATS_CNT | 706 | __ETHTOOL_STATS_CNT |
| @@ -714,6 +715,13 @@ enum { · 8 unmodified lines | |||
| 714 | 715 | ||
| 715 | ETHTOOL_A_STATS_GRP_STAT, /* nest */ | 716 | ETHTOOL_A_STATS_GRP_STAT, /* nest */ |
| 716 | 717 | ||
| 718 | ETHTOOL_A_STATS_GRP_HIST_RX, /* nest */ | ||
| 719 | ETHTOOL_A_STATS_GRP_HIST_TX, /* nest */ | ||
| 720 | |||
| 721 | ETHTOOL_A_STATS_GRP_HIST_BKT_LOW, /* u32 */ | ||
| 722 | ETHTOOL_A_STATS_GRP_HIST_BKT_HI, /* u32 */ | ||
| 723 | ETHTOOL_A_STATS_GRP_HIST_VAL, /* u64 */ | ||
| 724 | |||
| 717 | /* add new constants above here */ | 725 | /* add new constants above here */ |
| 718 | __ETHTOOL_A_STATS_GRP_CNT, | 726 | __ETHTOOL_A_STATS_GRP_CNT, |
| 719 | ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1) | 727 | ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1) |
| @@ -793,6 +801,21 @@ enum { · 73 unmodified lines | |||
| 793 | ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1) | 801 | ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1) |
| 794 | }; | 802 | }; |
| 795 | 803 | ||
| 804 | enum { | ||
| 805 | /* etherStatsUndersizePkts */ | ||
| 806 | ETHTOOL_A_STATS_RMON_UNDERSIZE, | ||
| 807 | /* etherStatsOversizePkts */ | ||
| 808 | ETHTOOL_A_STATS_RMON_OVERSIZE, | ||
| 809 | /* etherStatsFragments */ | ||
| 810 | ETHTOOL_A_STATS_RMON_FRAG, | ||
| 811 | /* etherStatsJabbers */ | ||
| 812 | ETHTOOL_A_STATS_RMON_JABBER, | ||
| 813 | |||
| 814 | /* add new constants above here */ | ||
| 815 | __ETHTOOL_A_STATS_RMON_CNT, | ||
| 816 | ETHTOOL_A_STATS_RMON_MAX = (__ETHTOOL_A_STATS_RMON_CNT - 1) | ||
| 817 | }; | ||
| 818 | |||
| 796 | /* generic netlink info */ | 819 | /* generic netlink info */ |
| 797 | #define ETHTOOL_GENL_NAME "ethtool" | 820 | #define ETHTOOL_GENL_NAME "ethtool" |
| 798 | #define ETHTOOL_GENL_VERSION 1 | 821 | #define ETHTOOL_GENL_VERSION 1 |