aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h59
1 files changed, 38 insertions, 21 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 276b40a16835..991269e5b152 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -379,11 +379,22 @@ struct ethtool_rxnfc {
379 __u32 flow_type; 379 __u32 flow_type;
380 /* The rx flow hash value or the rule DB size */ 380 /* The rx flow hash value or the rule DB size */
381 __u64 data; 381 __u64 data;
382 /* The following fields are not valid and must not be used for
383 * the ETHTOOL_{G,X}RXFH commands. */
382 struct ethtool_rx_flow_spec fs; 384 struct ethtool_rx_flow_spec fs;
383 __u32 rule_cnt; 385 __u32 rule_cnt;
384 __u32 rule_locs[0]; 386 __u32 rule_locs[0];
385}; 387};
386 388
389struct ethtool_rxfh_indir {
390 __u32 cmd;
391 /* On entry, this is the array size of the user buffer. On
392 * return from ETHTOOL_GRXFHINDIR, this is the array size of
393 * the hardware indirection table. */
394 __u32 size;
395 __u32 ring_index[0]; /* ring/queue index for each hash value */
396};
397
387struct ethtool_rx_ntuple_flow_spec { 398struct ethtool_rx_ntuple_flow_spec {
388 __u32 flow_type; 399 __u32 flow_type;
389 union { 400 union {
@@ -457,7 +468,7 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
457u32 ethtool_op_get_ufo(struct net_device *dev); 468u32 ethtool_op_get_ufo(struct net_device *dev);
458int ethtool_op_set_ufo(struct net_device *dev, u32 data); 469int ethtool_op_set_ufo(struct net_device *dev, u32 data);
459u32 ethtool_op_get_flags(struct net_device *dev); 470u32 ethtool_op_get_flags(struct net_device *dev);
460int ethtool_op_set_flags(struct net_device *dev, u32 data); 471int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
461void ethtool_ntuple_flush(struct net_device *dev); 472void ethtool_ntuple_flush(struct net_device *dev);
462 473
463/** 474/**
@@ -576,6 +587,10 @@ struct ethtool_ops {
576 int (*set_rx_ntuple)(struct net_device *, 587 int (*set_rx_ntuple)(struct net_device *,
577 struct ethtool_rx_ntuple *); 588 struct ethtool_rx_ntuple *);
578 int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); 589 int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *);
590 int (*get_rxfh_indir)(struct net_device *,
591 struct ethtool_rxfh_indir *);
592 int (*set_rxfh_indir)(struct net_device *,
593 const struct ethtool_rxfh_indir *);
579}; 594};
580#endif /* __KERNEL__ */ 595#endif /* __KERNEL__ */
581 596
@@ -586,29 +601,29 @@ struct ethtool_ops {
586#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ 601#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
587#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ 602#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
588#define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ 603#define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */
589#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ 604#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
590#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ 605#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
591#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ 606#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */
592#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ 607#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */
593#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ 608#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
594#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ 609#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
595#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ 610#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
596#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ 611#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */
597#define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ 612#define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */
598#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ 613#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */
599#define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ 614#define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */
600#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ 615#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */
601#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ 616#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */
602#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ 617#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */
603#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ 618#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */
604#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ 619#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */
605#define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable 620#define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable
606 * (ethtool_value) */ 621 * (ethtool_value) */
607#define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable 622#define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable
608 * (ethtool_value). */ 623 * (ethtool_value). */
609#define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ 624#define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */
610#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ 625#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
611#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ 626#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
612#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ 627#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
613#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ 628#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
614#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ 629#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
@@ -619,8 +634,8 @@ struct ethtool_ops {
619#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ 634#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
620#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ 635#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
621#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ 636#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
622#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ 637#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
623#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ 638#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
624 639
625#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ 640#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
626#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ 641#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
@@ -637,6 +652,8 @@ struct ethtool_ops {
637#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ 652#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
638#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ 653#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
639#define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ 654#define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */
655#define ETHTOOL_GRXFHINDIR 0x00000038 /* Get RX flow hash indir'n table */
656#define ETHTOOL_SRXFHINDIR 0x00000039 /* Set RX flow hash indir'n table */
640 657
641/* compatibility with older code */ 658/* compatibility with older code */
642#define SPARC_ETH_GSET ETHTOOL_GSET 659#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -645,18 +662,18 @@ struct ethtool_ops {
645/* Indicates what features are supported by the interface. */ 662/* Indicates what features are supported by the interface. */
646#define SUPPORTED_10baseT_Half (1 << 0) 663#define SUPPORTED_10baseT_Half (1 << 0)
647#define SUPPORTED_10baseT_Full (1 << 1) 664#define SUPPORTED_10baseT_Full (1 << 1)
648#define SUPPORTED_100baseT_Half (1 << 2) 665#define SUPPORTED_100baseT_Half (1 << 2)
649#define SUPPORTED_100baseT_Full (1 << 3) 666#define SUPPORTED_100baseT_Full (1 << 3)
650#define SUPPORTED_1000baseT_Half (1 << 4) 667#define SUPPORTED_1000baseT_Half (1 << 4)
651#define SUPPORTED_1000baseT_Full (1 << 5) 668#define SUPPORTED_1000baseT_Full (1 << 5)
652#define SUPPORTED_Autoneg (1 << 6) 669#define SUPPORTED_Autoneg (1 << 6)
653#define SUPPORTED_TP (1 << 7) 670#define SUPPORTED_TP (1 << 7)
654#define SUPPORTED_AUI (1 << 8) 671#define SUPPORTED_AUI (1 << 8)
655#define SUPPORTED_MII (1 << 9) 672#define SUPPORTED_MII (1 << 9)
656#define SUPPORTED_FIBRE (1 << 10) 673#define SUPPORTED_FIBRE (1 << 10)
657#define SUPPORTED_BNC (1 << 11) 674#define SUPPORTED_BNC (1 << 11)
658#define SUPPORTED_10000baseT_Full (1 << 12) 675#define SUPPORTED_10000baseT_Full (1 << 12)
659#define SUPPORTED_Pause (1 << 13) 676#define SUPPORTED_Pause (1 << 13)
660#define SUPPORTED_Asym_Pause (1 << 14) 677#define SUPPORTED_Asym_Pause (1 << 14)
661#define SUPPORTED_2500baseX_Full (1 << 15) 678#define SUPPORTED_2500baseX_Full (1 << 15)
662#define SUPPORTED_Backplane (1 << 16) 679#define SUPPORTED_Backplane (1 << 16)
@@ -666,8 +683,8 @@ struct ethtool_ops {
666#define SUPPORTED_10000baseR_FEC (1 << 20) 683#define SUPPORTED_10000baseR_FEC (1 << 20)
667 684
668/* Indicates what features are advertised by the interface. */ 685/* Indicates what features are advertised by the interface. */
669#define ADVERTISED_10baseT_Half (1 << 0) 686#define ADVERTISED_10baseT_Half (1 << 0)
670#define ADVERTISED_10baseT_Full (1 << 1) 687#define ADVERTISED_10baseT_Full (1 << 1)
671#define ADVERTISED_100baseT_Half (1 << 2) 688#define ADVERTISED_100baseT_Half (1 << 2)
672#define ADVERTISED_100baseT_Full (1 << 3) 689#define ADVERTISED_100baseT_Full (1 << 3)
673#define ADVERTISED_1000baseT_Half (1 << 4) 690#define ADVERTISED_1000baseT_Half (1 << 4)
@@ -706,12 +723,12 @@ struct ethtool_ops {
706#define DUPLEX_FULL 0x01 723#define DUPLEX_FULL 0x01
707 724
708/* Which connector port. */ 725/* Which connector port. */
709#define PORT_TP 0x00 726#define PORT_TP 0x00
710#define PORT_AUI 0x01 727#define PORT_AUI 0x01
711#define PORT_MII 0x02 728#define PORT_MII 0x02
712#define PORT_FIBRE 0x03 729#define PORT_FIBRE 0x03
713#define PORT_BNC 0x04 730#define PORT_BNC 0x04
714#define PORT_DA 0x05 731#define PORT_DA 0x05
715#define PORT_NONE 0xef 732#define PORT_NONE 0xef
716#define PORT_OTHER 0xff 733#define PORT_OTHER 0xff
717 734
@@ -725,7 +742,7 @@ struct ethtool_ops {
725/* Enable or disable autonegotiation. If this is set to enable, 742/* Enable or disable autonegotiation. If this is set to enable,
726 * the forced link modes above are completely ignored. 743 * the forced link modes above are completely ignored.
727 */ 744 */
728#define AUTONEG_DISABLE 0x00 745#define AUTONEG_DISABLE 0x00
729#define AUTONEG_ENABLE 0x01 746#define AUTONEG_ENABLE 0x01
730 747
731/* Mode MDI or MDI-X */ 748/* Mode MDI or MDI-X */