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.

Dependency Surface

Detected Declarations

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

Implementation Notes