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.h320
1 files changed, 243 insertions, 77 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index ae757bcf1280..c6a850ab2ec5 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -24,7 +24,10 @@ struct ethtool_cmd {
24 __u32 cmd; 24 __u32 cmd;
25 __u32 supported; /* Features this interface supports */ 25 __u32 supported; /* Features this interface supports */
26 __u32 advertising; /* Features this interface advertises */ 26 __u32 advertising; /* Features this interface advertises */
27 __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ 27 __u16 speed; /* The forced speed (lower bits) in
28 * Mbps. Please use
29 * ethtool_cmd_speed()/_set() to
30 * access it */
28 __u8 duplex; /* Duplex, half or full */ 31 __u8 duplex; /* Duplex, half or full */
29 __u8 port; /* Which connector port */ 32 __u8 port; /* Which connector port */
30 __u8 phy_address; 33 __u8 phy_address;
@@ -33,7 +36,10 @@ struct ethtool_cmd {
33 __u8 mdio_support; 36 __u8 mdio_support;
34 __u32 maxtxpkt; /* Tx pkts before generating tx int */ 37 __u32 maxtxpkt; /* Tx pkts before generating tx int */
35 __u32 maxrxpkt; /* Rx pkts before generating rx int */ 38 __u32 maxrxpkt; /* Rx pkts before generating rx int */
36 __u16 speed_hi; 39 __u16 speed_hi; /* The forced speed (upper
40 * bits) in Mbps. Please use
41 * ethtool_cmd_speed()/_set() to
42 * access it */
37 __u8 eth_tp_mdix; 43 __u8 eth_tp_mdix;
38 __u8 reserved2; 44 __u8 reserved2;
39 __u32 lp_advertising; /* Features the link partner advertises */ 45 __u32 lp_advertising; /* Features the link partner advertises */
@@ -41,14 +47,14 @@ struct ethtool_cmd {
41}; 47};
42 48
43static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, 49static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
44 __u32 speed) 50 __u32 speed)
45{ 51{
46 52
47 ep->speed = (__u16)speed; 53 ep->speed = (__u16)speed;
48 ep->speed_hi = (__u16)(speed >> 16); 54 ep->speed_hi = (__u16)(speed >> 16);
49} 55}
50 56
51static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) 57static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
52{ 58{
53 return (ep->speed_hi << 16) | ep->speed; 59 return (ep->speed_hi << 16) | ep->speed;
54} 60}
@@ -229,6 +235,34 @@ struct ethtool_ringparam {
229 __u32 tx_pending; 235 __u32 tx_pending;
230}; 236};
231 237
238/**
239 * struct ethtool_channels - configuring number of network channel
240 * @cmd: ETHTOOL_{G,S}CHANNELS
241 * @max_rx: Read only. Maximum number of receive channel the driver support.
242 * @max_tx: Read only. Maximum number of transmit channel the driver support.
243 * @max_other: Read only. Maximum number of other channel the driver support.
244 * @max_combined: Read only. Maximum number of combined channel the driver
245 * support. Set of queues RX, TX or other.
246 * @rx_count: Valid values are in the range 1 to the max_rx.
247 * @tx_count: Valid values are in the range 1 to the max_tx.
248 * @other_count: Valid values are in the range 1 to the max_other.
249 * @combined_count: Valid values are in the range 1 to the max_combined.
250 *
251 * This can be used to configure RX, TX and other channels.
252 */
253
254struct ethtool_channels {
255 __u32 cmd;
256 __u32 max_rx;
257 __u32 max_tx;
258 __u32 max_other;
259 __u32 max_combined;
260 __u32 rx_count;
261 __u32 tx_count;
262 __u32 other_count;
263 __u32 combined_count;
264};
265
232/* for configuring link flow control parameters */ 266/* for configuring link flow control parameters */
233struct ethtool_pauseparam { 267struct ethtool_pauseparam {
234 __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ 268 __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */
@@ -380,27 +414,42 @@ struct ethtool_usrip4_spec {
380 __u8 proto; 414 __u8 proto;
381}; 415};
382 416
417union ethtool_flow_union {
418 struct ethtool_tcpip4_spec tcp_ip4_spec;
419 struct ethtool_tcpip4_spec udp_ip4_spec;
420 struct ethtool_tcpip4_spec sctp_ip4_spec;
421 struct ethtool_ah_espip4_spec ah_ip4_spec;
422 struct ethtool_ah_espip4_spec esp_ip4_spec;
423 struct ethtool_usrip4_spec usr_ip4_spec;
424 struct ethhdr ether_spec;
425 __u8 hdata[60];
426};
427
428struct ethtool_flow_ext {
429 __be16 vlan_etype;
430 __be16 vlan_tci;
431 __be32 data[2];
432};
433
383/** 434/**
384 * struct ethtool_rx_flow_spec - specification for RX flow filter 435 * struct ethtool_rx_flow_spec - specification for RX flow filter
385 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW 436 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW
386 * @h_u: Flow fields to match (dependent on @flow_type) 437 * @h_u: Flow fields to match (dependent on @flow_type)
387 * @m_u: Masks for flow field bits to be ignored 438 * @h_ext: Additional fields to match
439 * @m_u: Masks for flow field bits to be matched
440 * @m_ext: Masks for additional field bits to be matched
441 * Note, all additional fields must be ignored unless @flow_type
442 * includes the %FLOW_EXT flag.
388 * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC 443 * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
389 * if packets should be discarded 444 * if packets should be discarded
390 * @location: Index of filter in hardware table 445 * @location: Index of filter in hardware table
391 */ 446 */
392struct ethtool_rx_flow_spec { 447struct ethtool_rx_flow_spec {
393 __u32 flow_type; 448 __u32 flow_type;
394 union { 449 union ethtool_flow_union h_u;
395 struct ethtool_tcpip4_spec tcp_ip4_spec; 450 struct ethtool_flow_ext h_ext;
396 struct ethtool_tcpip4_spec udp_ip4_spec; 451 union ethtool_flow_union m_u;
397 struct ethtool_tcpip4_spec sctp_ip4_spec; 452 struct ethtool_flow_ext m_ext;
398 struct ethtool_ah_espip4_spec ah_ip4_spec;
399 struct ethtool_ah_espip4_spec esp_ip4_spec;
400 struct ethtool_usrip4_spec usr_ip4_spec;
401 struct ethhdr ether_spec;
402 __u8 hdata[72];
403 } h_u, m_u;
404 __u64 ring_cookie; 453 __u64 ring_cookie;
405 __u32 location; 454 __u32 location;
406}; 455};
@@ -458,16 +507,10 @@ struct ethtool_rxnfc {
458 507
459struct compat_ethtool_rx_flow_spec { 508struct compat_ethtool_rx_flow_spec {
460 u32 flow_type; 509 u32 flow_type;
461 union { 510 union ethtool_flow_union h_u;
462 struct ethtool_tcpip4_spec tcp_ip4_spec; 511 struct ethtool_flow_ext h_ext;
463 struct ethtool_tcpip4_spec udp_ip4_spec; 512 union ethtool_flow_union m_u;
464 struct ethtool_tcpip4_spec sctp_ip4_spec; 513 struct ethtool_flow_ext m_ext;
465 struct ethtool_ah_espip4_spec ah_ip4_spec;
466 struct ethtool_ah_espip4_spec esp_ip4_spec;
467 struct ethtool_usrip4_spec usr_ip4_spec;
468 struct ethhdr ether_spec;
469 u8 hdata[72];
470 } h_u, m_u;
471 compat_u64 ring_cookie; 514 compat_u64 ring_cookie;
472 u32 location; 515 u32 location;
473}; 516};
@@ -558,6 +601,26 @@ struct ethtool_flash {
558 char data[ETHTOOL_FLASH_MAX_FILENAME]; 601 char data[ETHTOOL_FLASH_MAX_FILENAME];
559}; 602};
560 603
604/**
605 * struct ethtool_dump - used for retrieving, setting device dump
606 * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or
607 * %ETHTOOL_SET_DUMP
608 * @version: FW version of the dump, filled in by driver
609 * @flag: driver dependent flag for dump setting, filled in by driver during
610 * get and filled in by ethtool for set operation
611 * @len: length of dump data, used as the length of the user buffer on entry to
612 * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver
613 * for %ETHTOOL_GET_DUMP_FLAG command
614 * @data: data collected for get dump data operation
615 */
616struct ethtool_dump {
617 __u32 cmd;
618 __u32 version;
619 __u32 flag;
620 __u32 len;
621 __u8 data[0];
622};
623
561/* for returning and changing feature sets */ 624/* for returning and changing feature sets */
562 625
563/** 626/**
@@ -614,7 +677,7 @@ struct ethtool_sfeatures {
614 * values of corresponding bits in features[].requested. Bits in .requested 677 * values of corresponding bits in features[].requested. Bits in .requested
615 * not set in .valid or not changeable are ignored. 678 * not set in .valid or not changeable are ignored.
616 * 679 *
617 * Returns %EINVAL when .valid contains undefined or never-changable bits 680 * Returns %EINVAL when .valid contains undefined or never-changeable bits
618 * or size is not equal to required number of features words (32-bit blocks). 681 * or size is not equal to required number of features words (32-bit blocks).
619 * Returns >= 0 if request was completed; bits set in the value mean: 682 * Returns >= 0 if request was completed; bits set in the value mean:
620 * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not 683 * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not
@@ -663,6 +726,22 @@ struct ethtool_rx_ntuple_list {
663 unsigned int count; 726 unsigned int count;
664}; 727};
665 728
729/**
730 * enum ethtool_phys_id_state - indicator state for physical identification
731 * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated
732 * @ETHTOOL_ID_ACTIVE: Physical ID indicator should be activated
733 * @ETHTOOL_ID_ON: LED should be turned on (used iff %ETHTOOL_ID_ACTIVE
734 * is not supported)
735 * @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE
736 * is not supported)
737 */
738enum ethtool_phys_id_state {
739 ETHTOOL_ID_INACTIVE,
740 ETHTOOL_ID_ACTIVE,
741 ETHTOOL_ID_ON,
742 ETHTOOL_ID_OFF
743};
744
666struct net_device; 745struct net_device;
667 746
668/* Some generic methods drivers may use in their ethtool_ops */ 747/* Some generic methods drivers may use in their ethtool_ops */
@@ -680,65 +759,134 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data);
680u32 ethtool_op_get_flags(struct net_device *dev); 759u32 ethtool_op_get_flags(struct net_device *dev);
681int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); 760int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
682void ethtool_ntuple_flush(struct net_device *dev); 761void ethtool_ntuple_flush(struct net_device *dev);
762bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
683 763
684/** 764/**
685 * &ethtool_ops - Alter and report network device settings 765 * struct ethtool_ops - optional netdev operations
686 * get_settings: Get device-specific settings 766 * @get_settings: Get various device settings including Ethernet link
687 * set_settings: Set device-specific settings 767 * settings. The @cmd parameter is expected to have been cleared
688 * get_drvinfo: Report driver information 768 * before get_settings is called. Returns a negative error code or
689 * get_regs: Get device registers 769 * zero.
690 * get_wol: Report whether Wake-on-Lan is enabled 770 * @set_settings: Set various device settings including Ethernet link
691 * set_wol: Turn Wake-on-Lan on or off 771 * settings. Returns a negative error code or zero.
692 * get_msglevel: Report driver message level 772 * @get_drvinfo: Report driver/device information. Should only set the
693 * set_msglevel: Set driver message level 773 * @driver, @version, @fw_version and @bus_info fields. If not
694 * nway_reset: Restart autonegotiation 774 * implemented, the @driver and @bus_info fields will be filled in
695 * get_link: Get link status 775 * according to the netdev's parent device.
696 * get_eeprom: Read data from the device EEPROM 776 * @get_regs_len: Get buffer length required for @get_regs
697 * set_eeprom: Write data to the device EEPROM 777 * @get_regs: Get device registers
698 * get_coalesce: Get interrupt coalescing parameters 778 * @get_wol: Report whether Wake-on-Lan is enabled
699 * set_coalesce: Set interrupt coalescing parameters 779 * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code
700 * get_ringparam: Report ring sizes 780 * or zero.
701 * set_ringparam: Set ring sizes 781 * @get_msglevel: Report driver message level. This should be the value
702 * get_pauseparam: Report pause parameters 782 * of the @msg_enable field used by netif logging functions.
703 * set_pauseparam: Set pause parameters 783 * @set_msglevel: Set driver message level
704 * get_rx_csum: Report whether receive checksums are turned on or off 784 * @nway_reset: Restart autonegotiation. Returns a negative error code
705 * set_rx_csum: Turn receive checksum on or off 785 * or zero.
706 * get_tx_csum: Report whether transmit checksums are turned on or off 786 * @get_link: Report whether physical link is up. Will only be called if
707 * set_tx_csum: Turn transmit checksums on or off 787 * the netdev is up. Should usually be set to ethtool_op_get_link(),
708 * get_sg: Report whether scatter-gather is enabled 788 * which uses netif_carrier_ok().
709 * set_sg: Turn scatter-gather on or off 789 * @get_eeprom: Read data from the device EEPROM.
710 * get_tso: Report whether TCP segmentation offload is enabled
711 * set_tso: Turn TCP segmentation offload on or off
712 * get_ufo: Report whether UDP fragmentation offload is enabled
713 * set_ufo: Turn UDP fragmentation offload on or off
714 * self_test: Run specified self-tests
715 * get_strings: Return a set of strings that describe the requested objects
716 * phys_id: Identify the device
717 * get_stats: Return statistics about the device
718 * get_flags: get 32-bit flags bitmap
719 * set_flags: set 32-bit flags bitmap
720 *
721 * Description:
722 *
723 * get_settings:
724 * @get_settings is passed an &ethtool_cmd to fill in. It returns
725 * an negative errno or zero.
726 *
727 * set_settings:
728 * @set_settings is passed an &ethtool_cmd and should attempt to set
729 * all the settings this device supports. It may return an error value
730 * if something goes wrong (otherwise 0).
731 *
732 * get_eeprom:
733 * Should fill in the magic field. Don't need to check len for zero 790 * Should fill in the magic field. Don't need to check len for zero
734 * or wraparound. Fill in the data argument with the eeprom values 791 * or wraparound. Fill in the data argument with the eeprom values
735 * from offset to offset + len. Update len to the amount read. 792 * from offset to offset + len. Update len to the amount read.
736 * Returns an error or zero. 793 * Returns an error or zero.
737 * 794 * @set_eeprom: Write data to the device EEPROM.
738 * set_eeprom:
739 * Should validate the magic field. Don't need to check len for zero 795 * Should validate the magic field. Don't need to check len for zero
740 * or wraparound. Update len to the amount written. Returns an error 796 * or wraparound. Update len to the amount written. Returns an error
741 * or zero. 797 * or zero.
798 * @get_coalesce: Get interrupt coalescing parameters. Returns a negative
799 * error code or zero.
800 * @set_coalesce: Set interrupt coalescing parameters. Returns a negative
801 * error code or zero.
802 * @get_ringparam: Report ring sizes
803 * @set_ringparam: Set ring sizes. Returns a negative error code or zero.
804 * @get_pauseparam: Report pause parameters
805 * @set_pauseparam: Set pause parameters. Returns a negative error code
806 * or zero.
807 * @get_rx_csum: Deprecated in favour of the netdev feature %NETIF_F_RXCSUM.
808 * Report whether receive checksums are turned on or off.
809 * @set_rx_csum: Deprecated in favour of generic netdev features. Turn
810 * receive checksum on or off. Returns a negative error code or zero.
811 * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums
812 * are turned on or off.
813 * @set_tx_csum: Deprecated in favour of generic netdev features. Turn
814 * transmit checksums on or off. Returns a egative error code or zero.
815 * @get_sg: Deprecated as redundant. Report whether scatter-gather is
816 * enabled.
817 * @set_sg: Deprecated in favour of generic netdev features. Turn
818 * scatter-gather on or off. Returns a negative error code or zero.
819 * @get_tso: Deprecated as redundant. Report whether TCP segmentation
820 * offload is enabled.
821 * @set_tso: Deprecated in favour of generic netdev features. Turn TCP
822 * segmentation offload on or off. Returns a negative error code or zero.
823 * @self_test: Run specified self-tests
824 * @get_strings: Return a set of strings that describe the requested objects
825 * @set_phys_id: Identify the physical devices, e.g. by flashing an LED
826 * attached to it. The implementation may update the indicator
827 * asynchronously or synchronously, but in either case it must return
828 * quickly. It is initially called with the argument %ETHTOOL_ID_ACTIVE,
829 * and must either activate asynchronous updates and return zero, return
830 * a negative error or return a positive frequency for synchronous
831 * indication (e.g. 1 for one on/off cycle per second). If it returns
832 * a frequency then it will be called again at intervals with the
833 * argument %ETHTOOL_ID_ON or %ETHTOOL_ID_OFF and should set the state of
834 * the indicator accordingly. Finally, it is called with the argument
835 * %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a
836 * negative error code or zero.
837 * @get_ethtool_stats: Return extended statistics about the device.
838 * This is only useful if the device maintains statistics not
839 * included in &struct rtnl_link_stats64.
840 * @begin: Function to be called before any other operation. Returns a
841 * negative error code or zero.
842 * @complete: Function to be called after any other operation except
843 * @begin. Will be called even if the other operation failed.
844 * @get_ufo: Deprecated as redundant. Report whether UDP fragmentation
845 * offload is enabled.
846 * @set_ufo: Deprecated in favour of generic netdev features. Turn UDP
847 * fragmentation offload on or off. Returns a negative error code or zero.
848 * @get_flags: Deprecated as redundant. Report features included in
849 * &enum ethtool_flags that are enabled.
850 * @set_flags: Deprecated in favour of generic netdev features. Turn
851 * features included in &enum ethtool_flags on or off. Returns a
852 * negative error code or zero.
853 * @get_priv_flags: Report driver-specific feature flags.
854 * @set_priv_flags: Set driver-specific feature flags. Returns a negative
855 * error code or zero.
856 * @get_sset_count: Get number of strings that @get_strings will write.
857 * @get_rxnfc: Get RX flow classification rules. Returns a negative
858 * error code or zero.
859 * @set_rxnfc: Set RX flow classification rules. Returns a negative
860 * error code or zero.
861 * @flash_device: Write a firmware image to device's flash memory.
862 * Returns a negative error code or zero.
863 * @reset: Reset (part of) the device, as specified by a bitmask of
864 * flags from &enum ethtool_reset_flags. Returns a negative
865 * error code or zero.
866 * @set_rx_ntuple: Set an RX n-tuple rule. Returns a negative error code
867 * or zero.
868 * @get_rx_ntuple: Deprecated.
869 * @get_rxfh_indir: Get the contents of the RX flow hash indirection table.
870 * Returns a negative error code or zero.
871 * @set_rxfh_indir: Set the contents of the RX flow hash indirection table.
872 * Returns a negative error code or zero.
873 * @get_channels: Get number of channels.
874 * @set_channels: Set number of channels. Returns a negative error code or
875 * zero.
876 * @get_dump_flag: Get dump flag indicating current dump length, version,
877 * and flag of the device.
878 * @get_dump_data: Get dump data.
879 * @set_dump: Set dump specific flags to the device.
880 *
881 * All operations are optional (i.e. the function pointer may be set
882 * to %NULL) and callers must take this into account. Callers must
883 * hold the RTNL, except that for @get_drvinfo the caller may or may
884 * not hold the RTNL.
885 *
886 * See the structures used by these operations for further documentation.
887 *
888 * See &struct net_device and &struct net_device_ops for documentation
889 * of the generic netdev features interface.
742 */ 890 */
743struct ethtool_ops { 891struct ethtool_ops {
744 int (*get_settings)(struct net_device *, struct ethtool_cmd *); 892 int (*get_settings)(struct net_device *, struct ethtool_cmd *);
@@ -777,7 +925,7 @@ struct ethtool_ops {
777 int (*set_tso)(struct net_device *, u32); 925 int (*set_tso)(struct net_device *, u32);
778 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); 926 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
779 void (*get_strings)(struct net_device *, u32 stringset, u8 *); 927 void (*get_strings)(struct net_device *, u32 stringset, u8 *);
780 int (*phys_id)(struct net_device *, u32); 928 int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state);
781 void (*get_ethtool_stats)(struct net_device *, 929 void (*get_ethtool_stats)(struct net_device *,
782 struct ethtool_stats *, u64 *); 930 struct ethtool_stats *, u64 *);
783 int (*begin)(struct net_device *); 931 int (*begin)(struct net_device *);
@@ -801,6 +949,13 @@ struct ethtool_ops {
801 struct ethtool_rxfh_indir *); 949 struct ethtool_rxfh_indir *);
802 int (*set_rxfh_indir)(struct net_device *, 950 int (*set_rxfh_indir)(struct net_device *,
803 const struct ethtool_rxfh_indir *); 951 const struct ethtool_rxfh_indir *);
952 void (*get_channels)(struct net_device *, struct ethtool_channels *);
953 int (*set_channels)(struct net_device *, struct ethtool_channels *);
954 int (*get_dump_flag)(struct net_device *, struct ethtool_dump *);
955 int (*get_dump_data)(struct net_device *,
956 struct ethtool_dump *, void *);
957 int (*set_dump)(struct net_device *, struct ethtool_dump *);
958
804}; 959};
805#endif /* __KERNEL__ */ 960#endif /* __KERNEL__ */
806 961
@@ -869,6 +1024,11 @@ struct ethtool_ops {
869 1024
870#define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ 1025#define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */
871#define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ 1026#define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */
1027#define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */
1028#define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */
1029#define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */
1030#define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */
1031#define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */
872 1032
873/* compatibility with older code */ 1033/* compatibility with older code */
874#define SPARC_ETH_GSET ETHTOOL_GSET 1034#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -896,6 +1056,8 @@ struct ethtool_ops {
896#define SUPPORTED_10000baseKX4_Full (1 << 18) 1056#define SUPPORTED_10000baseKX4_Full (1 << 18)
897#define SUPPORTED_10000baseKR_Full (1 << 19) 1057#define SUPPORTED_10000baseKR_Full (1 << 19)
898#define SUPPORTED_10000baseR_FEC (1 << 20) 1058#define SUPPORTED_10000baseR_FEC (1 << 20)
1059#define SUPPORTED_20000baseMLD2_Full (1 << 21)
1060#define SUPPORTED_20000baseKR2_Full (1 << 22)
899 1061
900/* Indicates what features are advertised by the interface. */ 1062/* Indicates what features are advertised by the interface. */
901#define ADVERTISED_10baseT_Half (1 << 0) 1063#define ADVERTISED_10baseT_Half (1 << 0)
@@ -919,6 +1081,8 @@ struct ethtool_ops {
919#define ADVERTISED_10000baseKX4_Full (1 << 18) 1081#define ADVERTISED_10000baseKX4_Full (1 << 18)
920#define ADVERTISED_10000baseKR_Full (1 << 19) 1082#define ADVERTISED_10000baseKR_Full (1 << 19)
921#define ADVERTISED_10000baseR_FEC (1 << 20) 1083#define ADVERTISED_10000baseR_FEC (1 << 20)
1084#define ADVERTISED_20000baseMLD2_Full (1 << 21)
1085#define ADVERTISED_20000baseKR2_Full (1 << 22)
922 1086
923/* The following are all involved in forcing a particular link 1087/* The following are all involved in forcing a particular link
924 * mode for the device for setting things. When getting the 1088 * mode for the device for setting things. When getting the
@@ -991,6 +1155,8 @@ struct ethtool_ops {
991#define IPV4_FLOW 0x10 /* hash only */ 1155#define IPV4_FLOW 0x10 /* hash only */
992#define IPV6_FLOW 0x11 /* hash only */ 1156#define IPV6_FLOW 0x11 /* hash only */
993#define ETHER_FLOW 0x12 /* spec only (ether_spec) */ 1157#define ETHER_FLOW 0x12 /* spec only (ether_spec) */
1158/* Flag to enable additional fields in struct ethtool_rx_flow_spec */
1159#define FLOW_EXT 0x80000000
994 1160
995/* L3-L4 network traffic flow hash options */ 1161/* L3-L4 network traffic flow hash options */
996#define RXH_L2DA (1 << 1) 1162#define RXH_L2DA (1 << 1)