History

ethtool: netlink: add ETHTOOL_MSG_MSE_GET and wire up PHY MSE access

Introduce the userspace entry point for PHY MSE diagnostics via ethtool netlink. This exposes the core API added previously and returns both capability information and one or more snapshots. Userspace sends ETHTOOL_MSG_MSE_GET. The reply carries: - ETHTOOL_A_MSE_CAPABILITIES: scale limits and timing information - ETHTOOL_A_MSE_CHANNEL_* nests: one or more snapshots (per-channel if available, otherwise WORST, otherwise LINK) Link down returns -ENETDOWN. Changes: - YAML: add attribute sets (mse, mse-capabilities, mse-snapshot) and the mse-get operation - UAPI (generated): add ETHTOOL_A_MSE_* enums and message IDs, ETHTOOL_MSG_MSE_GET/REPLY - ethtool core: add net/ethtool/mse.c implementing the request, register genl op, and hook into ethnl dispatch - docs: document MSE_GET in ethtool-netlink.rst The include/uapi/linux/ethtool_netlink_generated.h is generated from Documentation/netlink/specs/ethtool.yaml.

Oleksij Rempel committed 1 year ago

Commit e6e93fb1 parent abcf6ee7 files · +527 −1Browse files

Showing the changes to include/uapi (1 of 7 files). Show all

Unified · Split

include/uapi/linux/ethtool_netlink_generated.h+35−0
@@ -803,6 +803,39 @@ enum { · 802 unmodified lines
803803 ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)
804804 };
805805
806+enum {
807+ ETHTOOL_A_MSE_CAPABILITIES_MAX_AVERAGE_MSE = 1,
808+ ETHTOOL_A_MSE_CAPABILITIES_MAX_PEAK_MSE,
809+ ETHTOOL_A_MSE_CAPABILITIES_REFRESH_RATE_PS,
810+ ETHTOOL_A_MSE_CAPABILITIES_NUM_SYMBOLS,
811+
812+ __ETHTOOL_A_MSE_CAPABILITIES_CNT,
813+ ETHTOOL_A_MSE_CAPABILITIES_MAX = (__ETHTOOL_A_MSE_CAPABILITIES_CNT - 1)
814+};
815+
816+enum {
817+ ETHTOOL_A_MSE_SNAPSHOT_AVERAGE_MSE = 1,
818+ ETHTOOL_A_MSE_SNAPSHOT_PEAK_MSE,
819+ ETHTOOL_A_MSE_SNAPSHOT_WORST_PEAK_MSE,
820+
821+ __ETHTOOL_A_MSE_SNAPSHOT_CNT,
822+ ETHTOOL_A_MSE_SNAPSHOT_MAX = (__ETHTOOL_A_MSE_SNAPSHOT_CNT - 1)
823+};
824+
825+enum {
826+ ETHTOOL_A_MSE_HEADER = 1,
827+ ETHTOOL_A_MSE_CAPABILITIES,
828+ ETHTOOL_A_MSE_CHANNEL_A,
829+ ETHTOOL_A_MSE_CHANNEL_B,
830+ ETHTOOL_A_MSE_CHANNEL_C,
831+ ETHTOOL_A_MSE_CHANNEL_D,
832+ ETHTOOL_A_MSE_WORST_CHANNEL,
833+ ETHTOOL_A_MSE_LINK,
834+
835+ __ETHTOOL_A_MSE_CNT,
836+ ETHTOOL_A_MSE_MAX = (__ETHTOOL_A_MSE_CNT - 1)
837+};
838+
806839 enum {
807840 ETHTOOL_MSG_USER_NONE = 0,
808841 ETHTOOL_MSG_STRSET_GET = 1,
@@ -855,6 +888,7 @@ enum { · 46 unmodified lines
855888 ETHTOOL_MSG_RSS_SET,
856889 ETHTOOL_MSG_RSS_CREATE_ACT,
857890 ETHTOOL_MSG_RSS_DELETE_ACT,
891+ ETHTOOL_MSG_MSE_GET,
858892
859893 __ETHTOOL_MSG_USER_CNT,
860894 ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)
@@ -915,6 +949,7 @@ enum { · 54 unmodified lines
915949 ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,
916950 ETHTOOL_MSG_RSS_CREATE_NTF,
917951 ETHTOOL_MSG_RSS_DELETE_NTF,
952+ ETHTOOL_MSG_MSE_GET_REPLY,
918953
919954 __ETHTOOL_MSG_KERNEL_CNT,
920955 ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)