1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * ethtool.h: Defines for Linux ethtool.
11 * Portions Copyright (C) Sun Microsystems 2008
14 #ifndef _UAPI_LINUX_ETHTOOL_H
15 #define _UAPI_LINUX_ETHTOOL_H
17 #include <linux/kernel.h>
18 #include <linux/types.h>
19 #include <linux/if_ether.h>
21 #define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */
24 * struct ethtool_channels - configuring number of network channel
25 * @cmd: ETHTOOL_{G,S}CHANNELS
26 * @max_rx: Read only. Maximum number of receive channel the driver support.
27 * @max_tx: Read only. Maximum number of transmit channel the driver support.
28 * @max_other: Read only. Maximum number of other channel the driver support.
29 * @max_combined: Read only. Maximum number of combined channel the driver
30 * support. Set of queues RX, TX or other.
31 * @rx_count: Valid values are in the range 1 to the max_rx.
32 * @tx_count: Valid values are in the range 1 to the max_tx.
33 * @other_count: Valid values are in the range 1 to the max_other.
34 * @combined_count: Valid values are in the range 1 to the max_combined.
36 * This can be used to configure RX, TX and other channels.
39 struct ethtool_channels {
51 #define ETHTOOL_FWVERS_LEN 32
52 #define ETHTOOL_BUSINFO_LEN 32
53 #define ETHTOOL_EROMVERS_LEN 32
56 * struct ethtool_drvinfo - general driver and device information
57 * @cmd: Command number = %ETHTOOL_GDRVINFO
58 * @driver: Driver short name. This should normally match the name
59 * in its bus driver structure (e.g. pci_driver::name). Must
60 * not be an empty string.
61 * @version: Driver version string; may be an empty string
62 * @fw_version: Firmware version string; may be an empty string
63 * @erom_version: Expansion ROM version string; may be an empty string
64 * @bus_info: Device bus address. This should match the dev_name()
65 * string for the underlying bus device, if there is one. May be
67 * @reserved2: Reserved for future use; see the note on reserved space.
68 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
69 * %ETHTOOL_SPFLAGS commands; also the number of strings in the
70 * %ETH_SS_PRIV_FLAGS set
71 * @n_stats: Number of u64 statistics returned by the %ETHTOOL_GSTATS
72 * command; also the number of strings in the %ETH_SS_STATS set
73 * @testinfo_len: Number of results returned by the %ETHTOOL_TEST
74 * command; also the number of strings in the %ETH_SS_TEST set
75 * @eedump_len: Size of EEPROM accessible through the %ETHTOOL_GEEPROM
76 * and %ETHTOOL_SEEPROM commands, in bytes
77 * @regdump_len: Size of register dump returned by the %ETHTOOL_GREGS
80 * Users can use the %ETHTOOL_GSSET_INFO command to get the number of
81 * strings in any string set (from Linux 2.6.34).
83 * Drivers should set at most @driver, @version, @fw_version and
84 * @bus_info in their get_drvinfo() implementation. The ethtool
85 * core fills in the other fields using other driver operations.
87 struct ethtool_drvinfo {
91 char fw_version[ETHTOOL_FWVERS_LEN];
92 char bus_info[ETHTOOL_BUSINFO_LEN];
93 char erom_version[ETHTOOL_EROMVERS_LEN];
102 #define ETHTOOL_GDRVINFO 0x00000003
104 #endif /* _UAPI_LINUX_ETHTOOL_H */