|
27 | 27 | #include <net/xdp_sock.h> |
28 | 28 | #include <net/flow_offload.h> |
29 | 29 |
|
| 30 | +#include "common.h" |
| 31 | + |
30 | 32 | /* |
31 | 33 | * Some useful ethtool_ops methods that're device independent. |
32 | 34 | * If we find that all drivers want to do the same thing here, |
@@ -54,88 +56,6 @@ EXPORT_SYMBOL(ethtool_op_get_ts_info); |
54 | 56 |
|
55 | 57 | #define ETHTOOL_DEV_FEATURE_WORDS ((NETDEV_FEATURE_COUNT + 31) / 32) |
56 | 58 |
|
57 | | -static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] = { |
58 | | - [NETIF_F_SG_BIT] = "tx-scatter-gather", |
59 | | - [NETIF_F_IP_CSUM_BIT] = "tx-checksum-ipv4", |
60 | | - [NETIF_F_HW_CSUM_BIT] = "tx-checksum-ip-generic", |
61 | | - [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6", |
62 | | - [NETIF_F_HIGHDMA_BIT] = "highdma", |
63 | | - [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist", |
64 | | - [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-hw-insert", |
65 | | - |
66 | | - [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-hw-parse", |
67 | | - [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-filter", |
68 | | - [NETIF_F_HW_VLAN_STAG_TX_BIT] = "tx-vlan-stag-hw-insert", |
69 | | - [NETIF_F_HW_VLAN_STAG_RX_BIT] = "rx-vlan-stag-hw-parse", |
70 | | - [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter", |
71 | | - [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged", |
72 | | - [NETIF_F_GSO_BIT] = "tx-generic-segmentation", |
73 | | - [NETIF_F_LLTX_BIT] = "tx-lockless", |
74 | | - [NETIF_F_NETNS_LOCAL_BIT] = "netns-local", |
75 | | - [NETIF_F_GRO_BIT] = "rx-gro", |
76 | | - [NETIF_F_GRO_HW_BIT] = "rx-gro-hw", |
77 | | - [NETIF_F_LRO_BIT] = "rx-lro", |
78 | | - |
79 | | - [NETIF_F_TSO_BIT] = "tx-tcp-segmentation", |
80 | | - [NETIF_F_GSO_ROBUST_BIT] = "tx-gso-robust", |
81 | | - [NETIF_F_TSO_ECN_BIT] = "tx-tcp-ecn-segmentation", |
82 | | - [NETIF_F_TSO_MANGLEID_BIT] = "tx-tcp-mangleid-segmentation", |
83 | | - [NETIF_F_TSO6_BIT] = "tx-tcp6-segmentation", |
84 | | - [NETIF_F_FSO_BIT] = "tx-fcoe-segmentation", |
85 | | - [NETIF_F_GSO_GRE_BIT] = "tx-gre-segmentation", |
86 | | - [NETIF_F_GSO_GRE_CSUM_BIT] = "tx-gre-csum-segmentation", |
87 | | - [NETIF_F_GSO_IPXIP4_BIT] = "tx-ipxip4-segmentation", |
88 | | - [NETIF_F_GSO_IPXIP6_BIT] = "tx-ipxip6-segmentation", |
89 | | - [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation", |
90 | | - [NETIF_F_GSO_UDP_TUNNEL_CSUM_BIT] = "tx-udp_tnl-csum-segmentation", |
91 | | - [NETIF_F_GSO_PARTIAL_BIT] = "tx-gso-partial", |
92 | | - [NETIF_F_GSO_SCTP_BIT] = "tx-sctp-segmentation", |
93 | | - [NETIF_F_GSO_ESP_BIT] = "tx-esp-segmentation", |
94 | | - [NETIF_F_GSO_UDP_L4_BIT] = "tx-udp-segmentation", |
95 | | - |
96 | | - [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc", |
97 | | - [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp", |
98 | | - [NETIF_F_FCOE_MTU_BIT] = "fcoe-mtu", |
99 | | - [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter", |
100 | | - [NETIF_F_RXHASH_BIT] = "rx-hashing", |
101 | | - [NETIF_F_RXCSUM_BIT] = "rx-checksum", |
102 | | - [NETIF_F_NOCACHE_COPY_BIT] = "tx-nocache-copy", |
103 | | - [NETIF_F_LOOPBACK_BIT] = "loopback", |
104 | | - [NETIF_F_RXFCS_BIT] = "rx-fcs", |
105 | | - [NETIF_F_RXALL_BIT] = "rx-all", |
106 | | - [NETIF_F_HW_L2FW_DOFFLOAD_BIT] = "l2-fwd-offload", |
107 | | - [NETIF_F_HW_TC_BIT] = "hw-tc-offload", |
108 | | - [NETIF_F_HW_ESP_BIT] = "esp-hw-offload", |
109 | | - [NETIF_F_HW_ESP_TX_CSUM_BIT] = "esp-tx-csum-hw-offload", |
110 | | - [NETIF_F_RX_UDP_TUNNEL_PORT_BIT] = "rx-udp_tunnel-port-offload", |
111 | | - [NETIF_F_HW_TLS_RECORD_BIT] = "tls-hw-record", |
112 | | - [NETIF_F_HW_TLS_TX_BIT] = "tls-hw-tx-offload", |
113 | | - [NETIF_F_HW_TLS_RX_BIT] = "tls-hw-rx-offload", |
114 | | -}; |
115 | | - |
116 | | -static const char |
117 | | -rss_hash_func_strings[ETH_RSS_HASH_FUNCS_COUNT][ETH_GSTRING_LEN] = { |
118 | | - [ETH_RSS_HASH_TOP_BIT] = "toeplitz", |
119 | | - [ETH_RSS_HASH_XOR_BIT] = "xor", |
120 | | - [ETH_RSS_HASH_CRC32_BIT] = "crc32", |
121 | | -}; |
122 | | - |
123 | | -static const char |
124 | | -tunable_strings[__ETHTOOL_TUNABLE_COUNT][ETH_GSTRING_LEN] = { |
125 | | - [ETHTOOL_ID_UNSPEC] = "Unspec", |
126 | | - [ETHTOOL_RX_COPYBREAK] = "rx-copybreak", |
127 | | - [ETHTOOL_TX_COPYBREAK] = "tx-copybreak", |
128 | | - [ETHTOOL_PFC_PREVENTION_TOUT] = "pfc-prevention-tout", |
129 | | -}; |
130 | | - |
131 | | -static const char |
132 | | -phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN] = { |
133 | | - [ETHTOOL_ID_UNSPEC] = "Unspec", |
134 | | - [ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift", |
135 | | - [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down", |
136 | | - [ETHTOOL_PHY_EDPD] = "phy-energy-detect-power-down", |
137 | | -}; |
138 | | - |
139 | 59 | static int ethtool_get_features(struct net_device *dev, void __user *useraddr) |
140 | 60 | { |
141 | 61 | struct ethtool_gfeatures cmd = { |
|
0 commit comments