aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/ethtool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r--include/uapi/linux/ethtool.h57
1 files changed, 54 insertions, 3 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index e3c7a719c76b..5f66d9c2889d 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -209,6 +209,33 @@ struct ethtool_value {
209 __u32 data; 209 __u32 data;
210}; 210};
211 211
212enum tunable_id {
213 ETHTOOL_ID_UNSPEC,
214 ETHTOOL_RX_COPYBREAK,
215 ETHTOOL_TX_COPYBREAK,
216};
217
218enum tunable_type_id {
219 ETHTOOL_TUNABLE_UNSPEC,
220 ETHTOOL_TUNABLE_U8,
221 ETHTOOL_TUNABLE_U16,
222 ETHTOOL_TUNABLE_U32,
223 ETHTOOL_TUNABLE_U64,
224 ETHTOOL_TUNABLE_STRING,
225 ETHTOOL_TUNABLE_S8,
226 ETHTOOL_TUNABLE_S16,
227 ETHTOOL_TUNABLE_S32,
228 ETHTOOL_TUNABLE_S64,
229};
230
231struct ethtool_tunable {
232 __u32 cmd;
233 __u32 id;
234 __u32 type_id;
235 __u32 len;
236 void *data[0];
237};
238
212/** 239/**
213 * struct ethtool_regs - hardware register dump 240 * struct ethtool_regs - hardware register dump
214 * @cmd: Command number = %ETHTOOL_GREGS 241 * @cmd: Command number = %ETHTOOL_GREGS
@@ -507,6 +534,7 @@ struct ethtool_pauseparam {
507 * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE; 534 * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE;
508 * now deprecated 535 * now deprecated
509 * @ETH_SS_FEATURES: Device feature names 536 * @ETH_SS_FEATURES: Device feature names
537 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
510 */ 538 */
511enum ethtool_stringset { 539enum ethtool_stringset {
512 ETH_SS_TEST = 0, 540 ETH_SS_TEST = 0,
@@ -514,6 +542,7 @@ enum ethtool_stringset {
514 ETH_SS_PRIV_FLAGS, 542 ETH_SS_PRIV_FLAGS,
515 ETH_SS_NTUPLE_FILTERS, 543 ETH_SS_NTUPLE_FILTERS,
516 ETH_SS_FEATURES, 544 ETH_SS_FEATURES,
545 ETH_SS_RSS_HASH_FUNCS,
517}; 546};
518 547
519/** 548/**
@@ -857,6 +886,8 @@ struct ethtool_rxfh_indir {
857 * @key_size: On entry, the array size of the user buffer for the hash key, 886 * @key_size: On entry, the array size of the user buffer for the hash key,
858 * which may be zero. On return from %ETHTOOL_GRSSH, the size of the 887 * which may be zero. On return from %ETHTOOL_GRSSH, the size of the
859 * hardware hash key. 888 * hardware hash key.
889 * @hfunc: Defines the current RSS hash function used by HW (or to be set to).
890 * Valid values are one of the %ETH_RSS_HASH_*.
860 * @rsvd: Reserved for future extensions. 891 * @rsvd: Reserved for future extensions.
861 * @rss_config: RX ring/queue index for each hash value i.e., indirection table 892 * @rss_config: RX ring/queue index for each hash value i.e., indirection table
862 * of @indir_size __u32 elements, followed by hash key of @key_size 893 * of @indir_size __u32 elements, followed by hash key of @key_size
@@ -866,14 +897,16 @@ struct ethtool_rxfh_indir {
866 * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of 897 * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of
867 * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested 898 * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested
868 * and a @indir_size of zero means the indir table should be reset to default 899 * and a @indir_size of zero means the indir table should be reset to default
869 * values. 900 * values. An hfunc of zero means that hash function setting is not requested.
870 */ 901 */
871struct ethtool_rxfh { 902struct ethtool_rxfh {
872 __u32 cmd; 903 __u32 cmd;
873 __u32 rss_context; 904 __u32 rss_context;
874 __u32 indir_size; 905 __u32 indir_size;
875 __u32 key_size; 906 __u32 key_size;
876 __u32 rsvd[2]; 907 __u8 hfunc;
908 __u8 rsvd8[3];
909 __u32 rsvd32;
877 __u32 rss_config[0]; 910 __u32 rss_config[0];
878}; 911};
879#define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff 912#define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff
@@ -1152,6 +1185,8 @@ enum ethtool_sfeatures_retval_bits {
1152 1185
1153#define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ 1186#define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */
1154#define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ 1187#define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */
1188#define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */
1189#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */
1155 1190
1156/* compatibility with older code */ 1191/* compatibility with older code */
1157#define SPARC_ETH_GSET ETHTOOL_GSET 1192#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -1184,6 +1219,10 @@ enum ethtool_sfeatures_retval_bits {
1184#define SUPPORTED_40000baseCR4_Full (1 << 24) 1219#define SUPPORTED_40000baseCR4_Full (1 << 24)
1185#define SUPPORTED_40000baseSR4_Full (1 << 25) 1220#define SUPPORTED_40000baseSR4_Full (1 << 25)
1186#define SUPPORTED_40000baseLR4_Full (1 << 26) 1221#define SUPPORTED_40000baseLR4_Full (1 << 26)
1222#define SUPPORTED_56000baseKR4_Full (1 << 27)
1223#define SUPPORTED_56000baseCR4_Full (1 << 28)
1224#define SUPPORTED_56000baseSR4_Full (1 << 29)
1225#define SUPPORTED_56000baseLR4_Full (1 << 30)
1187 1226
1188#define ADVERTISED_10baseT_Half (1 << 0) 1227#define ADVERTISED_10baseT_Half (1 << 0)
1189#define ADVERTISED_10baseT_Full (1 << 1) 1228#define ADVERTISED_10baseT_Full (1 << 1)
@@ -1212,6 +1251,10 @@ enum ethtool_sfeatures_retval_bits {
1212#define ADVERTISED_40000baseCR4_Full (1 << 24) 1251#define ADVERTISED_40000baseCR4_Full (1 << 24)
1213#define ADVERTISED_40000baseSR4_Full (1 << 25) 1252#define ADVERTISED_40000baseSR4_Full (1 << 25)
1214#define ADVERTISED_40000baseLR4_Full (1 << 26) 1253#define ADVERTISED_40000baseLR4_Full (1 << 26)
1254#define ADVERTISED_56000baseKR4_Full (1 << 27)
1255#define ADVERTISED_56000baseCR4_Full (1 << 28)
1256#define ADVERTISED_56000baseSR4_Full (1 << 29)
1257#define ADVERTISED_56000baseLR4_Full (1 << 30)
1215 1258
1216/* The following are all involved in forcing a particular link 1259/* The following are all involved in forcing a particular link
1217 * mode for the device for setting things. When getting the 1260 * mode for the device for setting things. When getting the
@@ -1219,12 +1262,16 @@ enum ethtool_sfeatures_retval_bits {
1219 * it was forced up into this mode or autonegotiated. 1262 * it was forced up into this mode or autonegotiated.
1220 */ 1263 */
1221 1264
1222/* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */ 1265/* The forced speed, 10Mb, 100Mb, gigabit, [2.5|10|20|40|56]GbE. */
1223#define SPEED_10 10 1266#define SPEED_10 10
1224#define SPEED_100 100 1267#define SPEED_100 100
1225#define SPEED_1000 1000 1268#define SPEED_1000 1000
1226#define SPEED_2500 2500 1269#define SPEED_2500 2500
1227#define SPEED_10000 10000 1270#define SPEED_10000 10000
1271#define SPEED_20000 20000
1272#define SPEED_40000 40000
1273#define SPEED_56000 56000
1274
1228#define SPEED_UNKNOWN -1 1275#define SPEED_UNKNOWN -1
1229 1276
1230/* Duplex, half or full. */ 1277/* Duplex, half or full. */
@@ -1314,6 +1361,10 @@ enum ethtool_sfeatures_retval_bits {
1314#define ETH_MODULE_SFF_8079_LEN 256 1361#define ETH_MODULE_SFF_8079_LEN 256
1315#define ETH_MODULE_SFF_8472 0x2 1362#define ETH_MODULE_SFF_8472 0x2
1316#define ETH_MODULE_SFF_8472_LEN 512 1363#define ETH_MODULE_SFF_8472_LEN 512
1364#define ETH_MODULE_SFF_8636 0x3
1365#define ETH_MODULE_SFF_8636_LEN 256
1366#define ETH_MODULE_SFF_8436 0x4
1367#define ETH_MODULE_SFF_8436_LEN 256
1317 1368
1318/* Reset flags */ 1369/* Reset flags */
1319/* The reset() operation must clear the flags for the components which 1370/* The reset() operation must clear the flags for the components which