Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: ethtool.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* ethtool.h: Defines for Linux ethtool.
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 1998 David S. Miller (davem@redhat.com)
[4] Fix | Delete
* Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
[5] Fix | Delete
* Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
[6] Fix | Delete
* Portions Copyright 2002 Intel (eli.kupermann@intel.com,
[7] Fix | Delete
* christopher.leech@intel.com,
[8] Fix | Delete
* scott.feldman@intel.com)
[9] Fix | Delete
* Portions Copyright (C) Sun Microsystems 2008
[10] Fix | Delete
*/
[11] Fix | Delete
[12] Fix | Delete
#ifndef _LINUX_ETHTOOL_H
[13] Fix | Delete
#define _LINUX_ETHTOOL_H
[14] Fix | Delete
[15] Fix | Delete
#include <linux/kernel.h>
[16] Fix | Delete
#include <linux/types.h>
[17] Fix | Delete
#include <linux/if_ether.h>
[18] Fix | Delete
[19] Fix | Delete
#include <limits.h> /* for INT_MAX */
[20] Fix | Delete
[21] Fix | Delete
/* All structures exposed to userland should be defined such that they
[22] Fix | Delete
* have the same layout for 32-bit and 64-bit userland.
[23] Fix | Delete
*/
[24] Fix | Delete
[25] Fix | Delete
/* Note on reserved space.
[26] Fix | Delete
* Reserved fields must not be accessed directly by user space because
[27] Fix | Delete
* they may be replaced by a different field in the future. They must
[28] Fix | Delete
* be initialized to zero before making the request, e.g. via memset
[29] Fix | Delete
* of the entire structure or implicitly by not being set in a structure
[30] Fix | Delete
* initializer.
[31] Fix | Delete
*/
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* struct ethtool_cmd - DEPRECATED, link control and status
[35] Fix | Delete
* This structure is DEPRECATED, please use struct ethtool_link_settings.
[36] Fix | Delete
* @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET
[37] Fix | Delete
* @supported: Bitmask of %SUPPORTED_* flags for the link modes,
[38] Fix | Delete
* physical connectors and other link features for which the
[39] Fix | Delete
* interface supports autonegotiation or auto-detection.
[40] Fix | Delete
* Read-only.
[41] Fix | Delete
* @advertising: Bitmask of %ADVERTISED_* flags for the link modes,
[42] Fix | Delete
* physical connectors and other link features that are
[43] Fix | Delete
* advertised through autonegotiation or enabled for
[44] Fix | Delete
* auto-detection.
[45] Fix | Delete
* @speed: Low bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
[46] Fix | Delete
* @duplex: Duplex mode; one of %DUPLEX_*
[47] Fix | Delete
* @port: Physical connector type; one of %PORT_*
[48] Fix | Delete
* @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
[49] Fix | Delete
* applicable. For clause 45 PHYs this is the PRTAD.
[50] Fix | Delete
* @transceiver: Historically used to distinguish different possible
[51] Fix | Delete
* PHY types, but not in a consistent way. Deprecated.
[52] Fix | Delete
* @autoneg: Enable/disable autonegotiation and auto-detection;
[53] Fix | Delete
* either %AUTONEG_DISABLE or %AUTONEG_ENABLE
[54] Fix | Delete
* @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO
[55] Fix | Delete
* protocols supported by the interface; 0 if unknown.
[56] Fix | Delete
* Read-only.
[57] Fix | Delete
* @maxtxpkt: Historically used to report TX IRQ coalescing; now
[58] Fix | Delete
* obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
[59] Fix | Delete
* @maxrxpkt: Historically used to report RX IRQ coalescing; now
[60] Fix | Delete
* obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
[61] Fix | Delete
* @speed_hi: High bits of the speed, 1Mb units, 0 to INT_MAX or SPEED_UNKNOWN
[62] Fix | Delete
* @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
[63] Fix | Delete
* %ETH_TP_MDI_*. If the status is unknown or not applicable, the
[64] Fix | Delete
* value will be %ETH_TP_MDI_INVALID. Read-only.
[65] Fix | Delete
* @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of
[66] Fix | Delete
* %ETH_TP_MDI_*. If MDI(-X) control is not implemented, reads
[67] Fix | Delete
* yield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.
[68] Fix | Delete
* When written successfully, the link should be renegotiated if
[69] Fix | Delete
* necessary.
[70] Fix | Delete
* @lp_advertising: Bitmask of %ADVERTISED_* flags for the link modes
[71] Fix | Delete
* and other link features that the link partner advertised
[72] Fix | Delete
* through autonegotiation; 0 if unknown or not applicable.
[73] Fix | Delete
* Read-only.
[74] Fix | Delete
* @reserved: Reserved for future use; see the note on reserved space.
[75] Fix | Delete
*
[76] Fix | Delete
* The link speed in Mbps is split between @speed and @speed_hi. Use
[77] Fix | Delete
* the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to
[78] Fix | Delete
* access it.
[79] Fix | Delete
*
[80] Fix | Delete
* If autonegotiation is disabled, the speed and @duplex represent the
[81] Fix | Delete
* fixed link mode and are writable if the driver supports multiple
[82] Fix | Delete
* link modes. If it is enabled then they are read-only; if the link
[83] Fix | Delete
* is up they represent the negotiated link mode; if the link is down,
[84] Fix | Delete
* the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and
[85] Fix | Delete
* @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.
[86] Fix | Delete
*
[87] Fix | Delete
* Some hardware interfaces may have multiple PHYs and/or physical
[88] Fix | Delete
* connectors fitted or do not allow the driver to detect which are
[89] Fix | Delete
* fitted. For these interfaces @port and/or @phy_address may be
[90] Fix | Delete
* writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.
[91] Fix | Delete
* Otherwise, attempts to write different values may be ignored or
[92] Fix | Delete
* rejected.
[93] Fix | Delete
*
[94] Fix | Delete
* Users should assume that all fields not marked read-only are
[95] Fix | Delete
* writable and subject to validation by the driver. They should use
[96] Fix | Delete
* %ETHTOOL_GSET to get the current values before making specific
[97] Fix | Delete
* changes and then applying them with %ETHTOOL_SSET.
[98] Fix | Delete
*
[99] Fix | Delete
* Drivers that implement set_settings() should validate all fields
[100] Fix | Delete
* other than @cmd that are not described as read-only or deprecated,
[101] Fix | Delete
* and must ignore all fields described as read-only.
[102] Fix | Delete
*
[103] Fix | Delete
* Deprecated fields should be ignored by both users and drivers.
[104] Fix | Delete
*/
[105] Fix | Delete
struct ethtool_cmd {
[106] Fix | Delete
__u32 cmd;
[107] Fix | Delete
__u32 supported;
[108] Fix | Delete
__u32 advertising;
[109] Fix | Delete
__u16 speed;
[110] Fix | Delete
__u8 duplex;
[111] Fix | Delete
__u8 port;
[112] Fix | Delete
__u8 phy_address;
[113] Fix | Delete
__u8 transceiver;
[114] Fix | Delete
__u8 autoneg;
[115] Fix | Delete
__u8 mdio_support;
[116] Fix | Delete
__u32 maxtxpkt;
[117] Fix | Delete
__u32 maxrxpkt;
[118] Fix | Delete
__u16 speed_hi;
[119] Fix | Delete
__u8 eth_tp_mdix;
[120] Fix | Delete
__u8 eth_tp_mdix_ctrl;
[121] Fix | Delete
__u32 lp_advertising;
[122] Fix | Delete
__u32 reserved[2];
[123] Fix | Delete
};
[124] Fix | Delete
[125] Fix | Delete
static __inline__ void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
[126] Fix | Delete
__u32 speed)
[127] Fix | Delete
{
[128] Fix | Delete
ep->speed = (__u16)(speed & 0xFFFF);
[129] Fix | Delete
ep->speed_hi = (__u16)(speed >> 16);
[130] Fix | Delete
}
[131] Fix | Delete
[132] Fix | Delete
static __inline__ __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
[133] Fix | Delete
{
[134] Fix | Delete
return (ep->speed_hi << 16) | ep->speed;
[135] Fix | Delete
}
[136] Fix | Delete
[137] Fix | Delete
/* Device supports clause 22 register access to PHY or peripherals
[138] Fix | Delete
* using the interface defined in <linux/mii.h>. This should not be
[139] Fix | Delete
* set if there are known to be no such peripherals present or if
[140] Fix | Delete
* the driver only emulates clause 22 registers for compatibility.
[141] Fix | Delete
*/
[142] Fix | Delete
#define ETH_MDIO_SUPPORTS_C22 1
[143] Fix | Delete
[144] Fix | Delete
/* Device supports clause 45 register access to PHY or peripherals
[145] Fix | Delete
* using the interface defined in <linux/mii.h> and <linux/mdio.h>.
[146] Fix | Delete
* This should not be set if there are known to be no such peripherals
[147] Fix | Delete
* present.
[148] Fix | Delete
*/
[149] Fix | Delete
#define ETH_MDIO_SUPPORTS_C45 2
[150] Fix | Delete
[151] Fix | Delete
#define ETHTOOL_FWVERS_LEN 32
[152] Fix | Delete
#define ETHTOOL_BUSINFO_LEN 32
[153] Fix | Delete
#define ETHTOOL_EROMVERS_LEN 32
[154] Fix | Delete
[155] Fix | Delete
/**
[156] Fix | Delete
* struct ethtool_drvinfo - general driver and device information
[157] Fix | Delete
* @cmd: Command number = %ETHTOOL_GDRVINFO
[158] Fix | Delete
* @driver: Driver short name. This should normally match the name
[159] Fix | Delete
* in its bus driver structure (e.g. pci_driver::name). Must
[160] Fix | Delete
* not be an empty string.
[161] Fix | Delete
* @version: Driver version string; may be an empty string
[162] Fix | Delete
* @fw_version: Firmware version string; may be an empty string
[163] Fix | Delete
* @erom_version: Expansion ROM version string; may be an empty string
[164] Fix | Delete
* @bus_info: Device bus address. This should match the dev_name()
[165] Fix | Delete
* string for the underlying bus device, if there is one. May be
[166] Fix | Delete
* an empty string.
[167] Fix | Delete
* @reserved2: Reserved for future use; see the note on reserved space.
[168] Fix | Delete
* @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
[169] Fix | Delete
* %ETHTOOL_SPFLAGS commands; also the number of strings in the
[170] Fix | Delete
* %ETH_SS_PRIV_FLAGS set
[171] Fix | Delete
* @n_stats: Number of u64 statistics returned by the %ETHTOOL_GSTATS
[172] Fix | Delete
* command; also the number of strings in the %ETH_SS_STATS set
[173] Fix | Delete
* @testinfo_len: Number of results returned by the %ETHTOOL_TEST
[174] Fix | Delete
* command; also the number of strings in the %ETH_SS_TEST set
[175] Fix | Delete
* @eedump_len: Size of EEPROM accessible through the %ETHTOOL_GEEPROM
[176] Fix | Delete
* and %ETHTOOL_SEEPROM commands, in bytes
[177] Fix | Delete
* @regdump_len: Size of register dump returned by the %ETHTOOL_GREGS
[178] Fix | Delete
* command, in bytes
[179] Fix | Delete
*
[180] Fix | Delete
* Users can use the %ETHTOOL_GSSET_INFO command to get the number of
[181] Fix | Delete
* strings in any string set (from Linux 2.6.34).
[182] Fix | Delete
*
[183] Fix | Delete
* Drivers should set at most @driver, @version, @fw_version and
[184] Fix | Delete
* @bus_info in their get_drvinfo() implementation. The ethtool
[185] Fix | Delete
* core fills in the other fields using other driver operations.
[186] Fix | Delete
*/
[187] Fix | Delete
struct ethtool_drvinfo {
[188] Fix | Delete
__u32 cmd;
[189] Fix | Delete
char driver[32];
[190] Fix | Delete
char version[32];
[191] Fix | Delete
char fw_version[ETHTOOL_FWVERS_LEN];
[192] Fix | Delete
char bus_info[ETHTOOL_BUSINFO_LEN];
[193] Fix | Delete
char erom_version[ETHTOOL_EROMVERS_LEN];
[194] Fix | Delete
char reserved2[12];
[195] Fix | Delete
__u32 n_priv_flags;
[196] Fix | Delete
__u32 n_stats;
[197] Fix | Delete
__u32 testinfo_len;
[198] Fix | Delete
__u32 eedump_len;
[199] Fix | Delete
__u32 regdump_len;
[200] Fix | Delete
};
[201] Fix | Delete
[202] Fix | Delete
#define SOPASS_MAX 6
[203] Fix | Delete
[204] Fix | Delete
/**
[205] Fix | Delete
* struct ethtool_wolinfo - Wake-On-Lan configuration
[206] Fix | Delete
* @cmd: Command number = %ETHTOOL_GWOL or %ETHTOOL_SWOL
[207] Fix | Delete
* @supported: Bitmask of %WAKE_* flags for supported Wake-On-Lan modes.
[208] Fix | Delete
* Read-only.
[209] Fix | Delete
* @wolopts: Bitmask of %WAKE_* flags for enabled Wake-On-Lan modes.
[210] Fix | Delete
* @sopass: SecureOn(tm) password; meaningful only if %WAKE_MAGICSECURE
[211] Fix | Delete
* is set in @wolopts.
[212] Fix | Delete
*/
[213] Fix | Delete
struct ethtool_wolinfo {
[214] Fix | Delete
__u32 cmd;
[215] Fix | Delete
__u32 supported;
[216] Fix | Delete
__u32 wolopts;
[217] Fix | Delete
__u8 sopass[SOPASS_MAX];
[218] Fix | Delete
};
[219] Fix | Delete
[220] Fix | Delete
/* for passing single values */
[221] Fix | Delete
struct ethtool_value {
[222] Fix | Delete
__u32 cmd;
[223] Fix | Delete
__u32 data;
[224] Fix | Delete
};
[225] Fix | Delete
[226] Fix | Delete
#define PFC_STORM_PREVENTION_AUTO 0xffff
[227] Fix | Delete
#define PFC_STORM_PREVENTION_DISABLE 0
[228] Fix | Delete
[229] Fix | Delete
enum tunable_id {
[230] Fix | Delete
ETHTOOL_ID_UNSPEC,
[231] Fix | Delete
ETHTOOL_RX_COPYBREAK,
[232] Fix | Delete
ETHTOOL_TX_COPYBREAK,
[233] Fix | Delete
ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */
[234] Fix | Delete
ETHTOOL_TX_COPYBREAK_BUF_SIZE,
[235] Fix | Delete
/*
[236] Fix | Delete
* Add your fresh new tunable attribute above and remember to update
[237] Fix | Delete
* tunable_strings[] in net/ethtool/common.c
[238] Fix | Delete
*/
[239] Fix | Delete
__ETHTOOL_TUNABLE_COUNT,
[240] Fix | Delete
};
[241] Fix | Delete
[242] Fix | Delete
enum tunable_type_id {
[243] Fix | Delete
ETHTOOL_TUNABLE_UNSPEC,
[244] Fix | Delete
ETHTOOL_TUNABLE_U8,
[245] Fix | Delete
ETHTOOL_TUNABLE_U16,
[246] Fix | Delete
ETHTOOL_TUNABLE_U32,
[247] Fix | Delete
ETHTOOL_TUNABLE_U64,
[248] Fix | Delete
ETHTOOL_TUNABLE_STRING,
[249] Fix | Delete
ETHTOOL_TUNABLE_S8,
[250] Fix | Delete
ETHTOOL_TUNABLE_S16,
[251] Fix | Delete
ETHTOOL_TUNABLE_S32,
[252] Fix | Delete
ETHTOOL_TUNABLE_S64,
[253] Fix | Delete
};
[254] Fix | Delete
[255] Fix | Delete
struct ethtool_tunable {
[256] Fix | Delete
__u32 cmd;
[257] Fix | Delete
__u32 id;
[258] Fix | Delete
__u32 type_id;
[259] Fix | Delete
__u32 len;
[260] Fix | Delete
void *data[0];
[261] Fix | Delete
};
[262] Fix | Delete
[263] Fix | Delete
#define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff
[264] Fix | Delete
#define DOWNSHIFT_DEV_DISABLE 0
[265] Fix | Delete
[266] Fix | Delete
/* Time in msecs after which link is reported as down
[267] Fix | Delete
* 0 = lowest time supported by the PHY
[268] Fix | Delete
* 0xff = off, link down detection according to standard
[269] Fix | Delete
*/
[270] Fix | Delete
#define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0
[271] Fix | Delete
#define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff
[272] Fix | Delete
[273] Fix | Delete
/* Energy Detect Power Down (EDPD) is a feature supported by some PHYs, where
[274] Fix | Delete
* the PHY's RX & TX blocks are put into a low-power mode when there is no
[275] Fix | Delete
* link detected (typically cable is un-plugged). For RX, only a minimal
[276] Fix | Delete
* link-detection is available, and for TX the PHY wakes up to send link pulses
[277] Fix | Delete
* to avoid any lock-ups in case the peer PHY may also be running in EDPD mode.
[278] Fix | Delete
*
[279] Fix | Delete
* Some PHYs may support configuration of the wake-up interval for TX pulses,
[280] Fix | Delete
* and some PHYs may support only disabling TX pulses entirely. For the latter
[281] Fix | Delete
* a special value is required (ETHTOOL_PHY_EDPD_NO_TX) so that this can be
[282] Fix | Delete
* configured from userspace (should the user want it).
[283] Fix | Delete
*
[284] Fix | Delete
* The interval units for TX wake-up are in milliseconds, since this should
[285] Fix | Delete
* cover a reasonable range of intervals:
[286] Fix | Delete
* - from 1 millisecond, which does not sound like much of a power-saver
[287] Fix | Delete
* - to ~65 seconds which is quite a lot to wait for a link to come up when
[288] Fix | Delete
* plugging a cable
[289] Fix | Delete
*/
[290] Fix | Delete
#define ETHTOOL_PHY_EDPD_DFLT_TX_MSECS 0xffff
[291] Fix | Delete
#define ETHTOOL_PHY_EDPD_NO_TX 0xfffe
[292] Fix | Delete
#define ETHTOOL_PHY_EDPD_DISABLE 0
[293] Fix | Delete
[294] Fix | Delete
enum phy_tunable_id {
[295] Fix | Delete
ETHTOOL_PHY_ID_UNSPEC,
[296] Fix | Delete
ETHTOOL_PHY_DOWNSHIFT,
[297] Fix | Delete
ETHTOOL_PHY_FAST_LINK_DOWN,
[298] Fix | Delete
ETHTOOL_PHY_EDPD,
[299] Fix | Delete
/*
[300] Fix | Delete
* Add your fresh new phy tunable attribute above and remember to update
[301] Fix | Delete
* phy_tunable_strings[] in net/ethtool/common.c
[302] Fix | Delete
*/
[303] Fix | Delete
__ETHTOOL_PHY_TUNABLE_COUNT,
[304] Fix | Delete
};
[305] Fix | Delete
[306] Fix | Delete
/**
[307] Fix | Delete
* struct ethtool_regs - hardware register dump
[308] Fix | Delete
* @cmd: Command number = %ETHTOOL_GREGS
[309] Fix | Delete
* @version: Dump format version. This is driver-specific and may
[310] Fix | Delete
* distinguish different chips/revisions. Drivers must use new
[311] Fix | Delete
* version numbers whenever the dump format changes in an
[312] Fix | Delete
* incompatible way.
[313] Fix | Delete
* @len: On entry, the real length of @data. On return, the number of
[314] Fix | Delete
* bytes used.
[315] Fix | Delete
* @data: Buffer for the register dump
[316] Fix | Delete
*
[317] Fix | Delete
* Users should use %ETHTOOL_GDRVINFO to find the maximum length of
[318] Fix | Delete
* a register dump for the interface. They must allocate the buffer
[319] Fix | Delete
* immediately following this structure.
[320] Fix | Delete
*/
[321] Fix | Delete
struct ethtool_regs {
[322] Fix | Delete
__u32 cmd;
[323] Fix | Delete
__u32 version;
[324] Fix | Delete
__u32 len;
[325] Fix | Delete
__u8 data[0];
[326] Fix | Delete
};
[327] Fix | Delete
[328] Fix | Delete
/**
[329] Fix | Delete
* struct ethtool_eeprom - EEPROM dump
[330] Fix | Delete
* @cmd: Command number = %ETHTOOL_GEEPROM, %ETHTOOL_GMODULEEEPROM or
[331] Fix | Delete
* %ETHTOOL_SEEPROM
[332] Fix | Delete
* @magic: A 'magic cookie' value to guard against accidental changes.
[333] Fix | Delete
* The value passed in to %ETHTOOL_SEEPROM must match the value
[334] Fix | Delete
* returned by %ETHTOOL_GEEPROM for the same device. This is
[335] Fix | Delete
* unused when @cmd is %ETHTOOL_GMODULEEEPROM.
[336] Fix | Delete
* @offset: Offset within the EEPROM to begin reading/writing, in bytes
[337] Fix | Delete
* @len: On entry, number of bytes to read/write. On successful
[338] Fix | Delete
* return, number of bytes actually read/written. In case of
[339] Fix | Delete
* error, this may indicate at what point the error occurred.
[340] Fix | Delete
* @data: Buffer to read/write from
[341] Fix | Delete
*
[342] Fix | Delete
* Users may use %ETHTOOL_GDRVINFO or %ETHTOOL_GMODULEINFO to find
[343] Fix | Delete
* the length of an on-board or module EEPROM, respectively. They
[344] Fix | Delete
* must allocate the buffer immediately following this structure.
[345] Fix | Delete
*/
[346] Fix | Delete
struct ethtool_eeprom {
[347] Fix | Delete
__u32 cmd;
[348] Fix | Delete
__u32 magic;
[349] Fix | Delete
__u32 offset;
[350] Fix | Delete
__u32 len;
[351] Fix | Delete
__u8 data[0];
[352] Fix | Delete
};
[353] Fix | Delete
[354] Fix | Delete
/**
[355] Fix | Delete
* struct ethtool_eee - Energy Efficient Ethernet information
[356] Fix | Delete
* @cmd: ETHTOOL_{G,S}EEE
[357] Fix | Delete
* @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations
[358] Fix | Delete
* for which there is EEE support.
[359] Fix | Delete
* @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations
[360] Fix | Delete
* advertised as eee capable.
[361] Fix | Delete
* @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex
[362] Fix | Delete
* combinations advertised by the link partner as eee capable.
[363] Fix | Delete
* @eee_active: Result of the eee auto negotiation.
[364] Fix | Delete
* @eee_enabled: EEE configured mode (enabled/disabled).
[365] Fix | Delete
* @tx_lpi_enabled: Whether the interface should assert its tx lpi, given
[366] Fix | Delete
* that eee was negotiated.
[367] Fix | Delete
* @tx_lpi_timer: Time in microseconds the interface delays prior to asserting
[368] Fix | Delete
* its tx lpi (after reaching 'idle' state). Effective only when eee
[369] Fix | Delete
* was negotiated and tx_lpi_enabled was set.
[370] Fix | Delete
* @reserved: Reserved for future use; see the note on reserved space.
[371] Fix | Delete
*/
[372] Fix | Delete
struct ethtool_eee {
[373] Fix | Delete
__u32 cmd;
[374] Fix | Delete
__u32 supported;
[375] Fix | Delete
__u32 advertised;
[376] Fix | Delete
__u32 lp_advertised;
[377] Fix | Delete
__u32 eee_active;
[378] Fix | Delete
__u32 eee_enabled;
[379] Fix | Delete
__u32 tx_lpi_enabled;
[380] Fix | Delete
__u32 tx_lpi_timer;
[381] Fix | Delete
__u32 reserved[2];
[382] Fix | Delete
};
[383] Fix | Delete
[384] Fix | Delete
/**
[385] Fix | Delete
* struct ethtool_modinfo - plugin module eeprom information
[386] Fix | Delete
* @cmd: %ETHTOOL_GMODULEINFO
[387] Fix | Delete
* @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx
[388] Fix | Delete
* @eeprom_len: Length of the eeprom
[389] Fix | Delete
* @reserved: Reserved for future use; see the note on reserved space.
[390] Fix | Delete
*
[391] Fix | Delete
* This structure is used to return the information to
[392] Fix | Delete
* properly size memory for a subsequent call to %ETHTOOL_GMODULEEEPROM.
[393] Fix | Delete
* The type code indicates the eeprom data format
[394] Fix | Delete
*/
[395] Fix | Delete
struct ethtool_modinfo {
[396] Fix | Delete
__u32 cmd;
[397] Fix | Delete
__u32 type;
[398] Fix | Delete
__u32 eeprom_len;
[399] Fix | Delete
__u32 reserved[8];
[400] Fix | Delete
};
[401] Fix | Delete
[402] Fix | Delete
/**
[403] Fix | Delete
* struct ethtool_coalesce - coalescing parameters for IRQs and stats updates
[404] Fix | Delete
* @cmd: ETHTOOL_{G,S}COALESCE
[405] Fix | Delete
* @rx_coalesce_usecs: How many usecs to delay an RX interrupt after
[406] Fix | Delete
* a packet arrives.
[407] Fix | Delete
* @rx_max_coalesced_frames: Maximum number of packets to receive
[408] Fix | Delete
* before an RX interrupt.
[409] Fix | Delete
* @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that
[410] Fix | Delete
* this value applies while an IRQ is being serviced by the host.
[411] Fix | Delete
* @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames,
[412] Fix | Delete
* except that this value applies while an IRQ is being serviced
[413] Fix | Delete
* by the host.
[414] Fix | Delete
* @tx_coalesce_usecs: How many usecs to delay a TX interrupt after
[415] Fix | Delete
* a packet is sent.
[416] Fix | Delete
* @tx_max_coalesced_frames: Maximum number of packets to be sent
[417] Fix | Delete
* before a TX interrupt.
[418] Fix | Delete
* @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that
[419] Fix | Delete
* this value applies while an IRQ is being serviced by the host.
[420] Fix | Delete
* @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames,
[421] Fix | Delete
* except that this value applies while an IRQ is being serviced
[422] Fix | Delete
* by the host.
[423] Fix | Delete
* @stats_block_coalesce_usecs: How many usecs to delay in-memory
[424] Fix | Delete
* statistics block updates. Some drivers do not have an
[425] Fix | Delete
* in-memory statistic block, and in such cases this value is
[426] Fix | Delete
* ignored. This value must not be zero.
[427] Fix | Delete
* @use_adaptive_rx_coalesce: Enable adaptive RX coalescing.
[428] Fix | Delete
* @use_adaptive_tx_coalesce: Enable adaptive TX coalescing.
[429] Fix | Delete
* @pkt_rate_low: Threshold for low packet rate (packets per second).
[430] Fix | Delete
* @rx_coalesce_usecs_low: How many usecs to delay an RX interrupt after
[431] Fix | Delete
* a packet arrives, when the packet rate is below @pkt_rate_low.
[432] Fix | Delete
* @rx_max_coalesced_frames_low: Maximum number of packets to be received
[433] Fix | Delete
* before an RX interrupt, when the packet rate is below @pkt_rate_low.
[434] Fix | Delete
* @tx_coalesce_usecs_low: How many usecs to delay a TX interrupt after
[435] Fix | Delete
* a packet is sent, when the packet rate is below @pkt_rate_low.
[436] Fix | Delete
* @tx_max_coalesced_frames_low: Maximum nuumber of packets to be sent before
[437] Fix | Delete
* a TX interrupt, when the packet rate is below @pkt_rate_low.
[438] Fix | Delete
* @pkt_rate_high: Threshold for high packet rate (packets per second).
[439] Fix | Delete
* @rx_coalesce_usecs_high: How many usecs to delay an RX interrupt after
[440] Fix | Delete
* a packet arrives, when the packet rate is above @pkt_rate_high.
[441] Fix | Delete
* @rx_max_coalesced_frames_high: Maximum number of packets to be received
[442] Fix | Delete
* before an RX interrupt, when the packet rate is above @pkt_rate_high.
[443] Fix | Delete
* @tx_coalesce_usecs_high: How many usecs to delay a TX interrupt after
[444] Fix | Delete
* a packet is sent, when the packet rate is above @pkt_rate_high.
[445] Fix | Delete
* @tx_max_coalesced_frames_high: Maximum number of packets to be sent before
[446] Fix | Delete
* a TX interrupt, when the packet rate is above @pkt_rate_high.
[447] Fix | Delete
* @rate_sample_interval: How often to do adaptive coalescing packet rate
[448] Fix | Delete
* sampling, measured in seconds. Must not be zero.
[449] Fix | Delete
*
[450] Fix | Delete
* Each pair of (usecs, max_frames) fields specifies that interrupts
[451] Fix | Delete
* should be coalesced until
[452] Fix | Delete
* (usecs > 0 && time_since_first_completion >= usecs) ||
[453] Fix | Delete
* (max_frames > 0 && completed_frames >= max_frames)
[454] Fix | Delete
*
[455] Fix | Delete
* It is illegal to set both usecs and max_frames to zero as this
[456] Fix | Delete
* would cause interrupts to never be generated. To disable
[457] Fix | Delete
* coalescing, set usecs = 0 and max_frames = 1.
[458] Fix | Delete
*
[459] Fix | Delete
* Some implementations ignore the value of max_frames and use the
[460] Fix | Delete
* condition time_since_first_completion >= usecs
[461] Fix | Delete
*
[462] Fix | Delete
* This is deprecated. Drivers for hardware that does not support
[463] Fix | Delete
* counting completions should validate that max_frames == !rx_usecs.
[464] Fix | Delete
*
[465] Fix | Delete
* Adaptive RX/TX coalescing is an algorithm implemented by some
[466] Fix | Delete
* drivers to improve latency under low packet rates and improve
[467] Fix | Delete
* throughput under high packet rates. Some drivers only implement
[468] Fix | Delete
* one of RX or TX adaptive coalescing. Anything not implemented by
[469] Fix | Delete
* the driver causes these values to be silently ignored.
[470] Fix | Delete
*
[471] Fix | Delete
* When the packet rate is below @pkt_rate_high but above
[472] Fix | Delete
* @pkt_rate_low (both measured in packets per second) the
[473] Fix | Delete
* normal {rx,tx}_* coalescing parameters are used.
[474] Fix | Delete
*/
[475] Fix | Delete
struct ethtool_coalesce {
[476] Fix | Delete
__u32 cmd;
[477] Fix | Delete
__u32 rx_coalesce_usecs;
[478] Fix | Delete
__u32 rx_max_coalesced_frames;
[479] Fix | Delete
__u32 rx_coalesce_usecs_irq;
[480] Fix | Delete
__u32 rx_max_coalesced_frames_irq;
[481] Fix | Delete
__u32 tx_coalesce_usecs;
[482] Fix | Delete
__u32 tx_max_coalesced_frames;
[483] Fix | Delete
__u32 tx_coalesce_usecs_irq;
[484] Fix | Delete
__u32 tx_max_coalesced_frames_irq;
[485] Fix | Delete
__u32 stats_block_coalesce_usecs;
[486] Fix | Delete
__u32 use_adaptive_rx_coalesce;
[487] Fix | Delete
__u32 use_adaptive_tx_coalesce;
[488] Fix | Delete
__u32 pkt_rate_low;
[489] Fix | Delete
__u32 rx_coalesce_usecs_low;
[490] Fix | Delete
__u32 rx_max_coalesced_frames_low;
[491] Fix | Delete
__u32 tx_coalesce_usecs_low;
[492] Fix | Delete
__u32 tx_max_coalesced_frames_low;
[493] Fix | Delete
__u32 pkt_rate_high;
[494] Fix | Delete
__u32 rx_coalesce_usecs_high;
[495] Fix | Delete
__u32 rx_max_coalesced_frames_high;
[496] Fix | Delete
__u32 tx_coalesce_usecs_high;
[497] Fix | Delete
__u32 tx_max_coalesced_frames_high;
[498] Fix | Delete
__u32 rate_sample_interval;
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function