include/linux/ethtool.h
Source file repositories/reference/linux-study-clean/include/linux/ethtool.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ethtool.h- Extension
.h- Size
- 62020 bytes
- Lines
- 1568
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitmap.hlinux/compat.hlinux/if_ether.hlinux/netlink.hlinux/timer_types.huapi/linux/ethtool.huapi/linux/ethtool_netlink_generated.huapi/linux/net_tstamp.hlinux/rculist.h
Detected Declarations
struct compat_ethtool_rx_flow_specstruct compat_ethtool_rxnfcstruct kernel_ethtool_ringparamstruct net_devicestruct netlink_ext_ackstruct ethtool_link_ext_state_infostruct ethtool_link_ext_statsstruct ethtool_rxfh_contextstruct link_mode_infostruct ethtool_link_ksettingsstruct ethtool_keeestruct kernel_ethtool_coalescestruct ethtool_eth_mac_statsstruct ethtool_eth_phy_statsstruct ethtool_phy_statsstruct ethtool_eth_ctrl_statsstruct ethtool_pause_statsstruct ethtool_fec_hist_rangestruct ethtool_fec_histstruct ethtool_fec_hist_valuestruct ethtool_fec_statsstruct ethtool_fec_statstruct ethtool_rmon_hist_rangestruct ethtool_rmon_statsstruct ethtool_ts_statsstruct ethtool_module_eepromstruct ethtool_module_power_mode_paramsstruct ethtool_mm_statestruct ethtool_mm_cfgstruct ethtool_mm_statsstruct ethtool_mmsvstruct ethtool_mmsv_opsstruct ethtool_mmsvstruct ethtool_rxfh_paramstruct ethtool_rxfh_fieldsstruct kernel_ethtool_ts_infostruct ethtool_opsstruct ethtool_rx_flow_rulestruct ethtool_rx_flow_spec_inputstruct ethtool_netdev_statestruct phy_devicestruct phy_tdr_configstruct phy_plca_cfgstruct phy_plca_statusstruct ethtool_phy_opsstruct ethtool_forced_speed_mapenum ethtool_phys_id_stateenum ethtool_supported_ring_param
Annotated Snippet
* See &struct net_device and &struct net_device_ops for documentation
* of the generic netdev features interface.
*/
struct ethtool_ops {
u32 supported_input_xfrm:8;
u32 cap_link_lanes_supported:1;
u32 rxfh_per_ctx_fields:1;
u32 rxfh_per_ctx_key:1;
u32 cap_rss_rxnfc_adds:1;
u32 rxfh_indir_space;
u16 rxfh_key_space;
u16 rxfh_priv_size;
u32 rxfh_max_num_contexts;
u32 supported_coalesce_params;
u32 supported_ring_params;
u32 supported_hwtstamp_qualifiers;
u32 op_needs_rtnl;
void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
int (*get_regs_len)(struct net_device *);
void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
u32 (*get_msglevel)(struct net_device *);
void (*set_msglevel)(struct net_device *, u32);
int (*nway_reset)(struct net_device *);
u32 (*get_link)(struct net_device *);
int (*get_link_ext_state)(struct net_device *,
struct ethtool_link_ext_state_info *);
void (*get_link_ext_stats)(struct net_device *dev,
struct ethtool_link_ext_stats *stats);
int (*get_eeprom_len)(struct net_device *);
int (*get_eeprom)(struct net_device *,
struct ethtool_eeprom *, u8 *);
int (*set_eeprom)(struct net_device *,
struct ethtool_eeprom *, u8 *);
int (*get_coalesce)(struct net_device *,
struct ethtool_coalesce *,
struct kernel_ethtool_coalesce *,
struct netlink_ext_ack *);
int (*set_coalesce)(struct net_device *,
struct ethtool_coalesce *,
struct kernel_ethtool_coalesce *,
struct netlink_ext_ack *);
void (*get_ringparam)(struct net_device *,
struct ethtool_ringparam *,
struct kernel_ethtool_ringparam *,
struct netlink_ext_ack *);
int (*set_ringparam)(struct net_device *,
struct ethtool_ringparam *,
struct kernel_ethtool_ringparam *,
struct netlink_ext_ack *);
void (*get_pause_stats)(struct net_device *dev,
struct ethtool_pause_stats *pause_stats);
void (*get_pauseparam)(struct net_device *,
struct ethtool_pauseparam*);
int (*set_pauseparam)(struct net_device *,
struct ethtool_pauseparam*);
void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
void (*get_strings)(struct net_device *, u32 stringset, u8 *);
int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state);
void (*get_ethtool_stats)(struct net_device *,
struct ethtool_stats *, u64 *);
int (*begin)(struct net_device *);
void (*complete)(struct net_device *);
u32 (*get_priv_flags)(struct net_device *);
int (*set_priv_flags)(struct net_device *, u32);
int (*get_sset_count)(struct net_device *, int);
int (*get_rxnfc)(struct net_device *,
struct ethtool_rxnfc *, u32 *rule_locs);
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
int (*flash_device)(struct net_device *, struct ethtool_flash *);
int (*reset)(struct net_device *, u32 *);
u32 (*get_rx_ring_count)(struct net_device *dev);
u32 (*get_rxfh_key_size)(struct net_device *);
u32 (*get_rxfh_indir_size)(struct net_device *);
int (*get_rxfh)(struct net_device *, struct ethtool_rxfh_param *);
int (*set_rxfh)(struct net_device *, struct ethtool_rxfh_param *,
struct netlink_ext_ack *extack);
int (*get_rxfh_fields)(struct net_device *,
struct ethtool_rxfh_fields *);
int (*set_rxfh_fields)(struct net_device *,
const struct ethtool_rxfh_fields *,
struct netlink_ext_ack *extack);
int (*create_rxfh_context)(struct net_device *,
struct ethtool_rxfh_context *ctx,
const struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack);
int (*modify_rxfh_context)(struct net_device *,
struct ethtool_rxfh_context *ctx,
const struct ethtool_rxfh_param *rxfh,
Annotation
- Immediate include surface: `linux/bitmap.h`, `linux/compat.h`, `linux/if_ether.h`, `linux/netlink.h`, `linux/timer_types.h`, `uapi/linux/ethtool.h`, `uapi/linux/ethtool_netlink_generated.h`, `uapi/linux/net_tstamp.h`.
- Detected declarations: `struct compat_ethtool_rx_flow_spec`, `struct compat_ethtool_rxnfc`, `struct kernel_ethtool_ringparam`, `struct net_device`, `struct netlink_ext_ack`, `struct ethtool_link_ext_state_info`, `struct ethtool_link_ext_stats`, `struct ethtool_rxfh_context`, `struct link_mode_info`, `struct ethtool_link_ksettings`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.