History

ethtool: add interface to read standard MAC Ctrl stats

Number of devices maintains the standard-based MAC control counters for control frames. Add a API for those.

Jakub Kicinski committed 5 years ago

Commit bfad2b91 parent ca224456 files · +67 −0Browse files

Showing the changes to include/uapi (2 of 6 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/ethtool.h +2 −0
  2. include/uapi/linux/ethtool_netlink.h +14 −0
include/uapi/linux/ethtool.h+2−0
@@ -672,6 +672,7 @@ enum ethtool_link_ext_substate_cable_issue { · 671 unmodified lines
672672 * @ETH_SS_STATS_STD: standardized stats
673673 * @ETH_SS_STATS_ETH_PHY: names of IEEE 802.3 PHY statistics
674674 * @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
675676 *
676677 * @ETH_SS_COUNT: number of defined string sets
677678 */
@@ -695,6 +696,7 @@ enum ethtool_stringset { · 17 unmodified lines
695696 ETH_SS_STATS_STD,
696697 ETH_SS_STATS_ETH_PHY,
697698 ETH_SS_STATS_ETH_MAC,
699+ ETH_SS_STATS_ETH_CTRL,
698700
699701 /* add new constants above here */
700702 ETH_SS_COUNT
include/uapi/linux/ethtool_netlink.h+14−0
@@ -699,6 +699,7 @@ enum { · 698 unmodified lines
699699 enum {
700700 ETHTOOL_STATS_ETH_PHY,
701701 ETHTOOL_STATS_ETH_MAC,
702+ ETHTOOL_STATS_ETH_CTRL,
702703
703704 /* add new constants above here */
704705 __ETHTOOL_STATS_CNT
@@ -779,6 +780,19 @@ enum { · 74 unmodified lines
779780 ETHTOOL_A_STATS_ETH_MAC_MAX = (__ETHTOOL_A_STATS_ETH_MAC_CNT - 1)
780781 };
781782
783+enum {
784+ /* 30.3.3.3 aMACControlFramesTransmitted */
785+ ETHTOOL_A_STATS_ETH_CTRL_3_TX,
786+ /* 30.3.3.4 aMACControlFramesReceived */
787+ ETHTOOL_A_STATS_ETH_CTRL_4_RX,
788+ /* 30.3.3.5 aUnsupportedOpcodesReceived */
789+ ETHTOOL_A_STATS_ETH_CTRL_5_RX_UNSUP,
790+
791+ /* add new constants above here */
792+ __ETHTOOL_A_STATS_ETH_CTRL_CNT,
793+ ETHTOOL_A_STATS_ETH_CTRL_MAX = (__ETHTOOL_A_STATS_ETH_CTRL_CNT - 1)
794+};
795+
782796 /* generic netlink info */
783797 #define ETHTOOL_GENL_NAME "ethtool"
784798 #define ETHTOOL_GENL_VERSION 1