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