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
803 ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)803 ETHTOOL_A_PSE_NTF_MAX = (__ETHTOOL_A_PSE_NTF_CNT - 1)
804};804};
805 805
806enum {
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
816enum {
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
825enum {
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
806enum {839enum {
807 ETHTOOL_MSG_USER_NONE = 0,840 ETHTOOL_MSG_USER_NONE = 0,
808 ETHTOOL_MSG_STRSET_GET = 1,841 ETHTOOL_MSG_STRSET_GET = 1,
@@ -855,6 +888,7 @@ enum { · 46 unmodified lines
855 ETHTOOL_MSG_RSS_SET,888 ETHTOOL_MSG_RSS_SET,
856 ETHTOOL_MSG_RSS_CREATE_ACT,889 ETHTOOL_MSG_RSS_CREATE_ACT,
857 ETHTOOL_MSG_RSS_DELETE_ACT,890 ETHTOOL_MSG_RSS_DELETE_ACT,
891 ETHTOOL_MSG_MSE_GET,
858 892
859 __ETHTOOL_MSG_USER_CNT,893 __ETHTOOL_MSG_USER_CNT,
860 ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)894 ETHTOOL_MSG_USER_MAX = (__ETHTOOL_MSG_USER_CNT - 1)
@@ -915,6 +949,7 @@ enum { · 54 unmodified lines
915 ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,949 ETHTOOL_MSG_RSS_CREATE_ACT_REPLY,
916 ETHTOOL_MSG_RSS_CREATE_NTF,950 ETHTOOL_MSG_RSS_CREATE_NTF,
917 ETHTOOL_MSG_RSS_DELETE_NTF,951 ETHTOOL_MSG_RSS_DELETE_NTF,
952 ETHTOOL_MSG_MSE_GET_REPLY,
918 953
919 __ETHTOOL_MSG_KERNEL_CNT,954 __ETHTOOL_MSG_KERNEL_CNT,
920 ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)955 ETHTOOL_MSG_KERNEL_MAX = (__ETHTOOL_MSG_KERNEL_CNT - 1)