Warning: This file is not a C or C++ file. It does not have highlighting.
1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
---|---|
2 | /* |
3 | * ethtool.h: Defines for Linux ethtool. |
4 | * |
5 | * Copyright (C) 1998 David S. Miller (davem@redhat.com) |
6 | * Copyright 2001 Jeff Garzik <jgarzik@pobox.com> |
7 | * Portions Copyright 2001 Sun Microsystems (thockin@sun.com) |
8 | * Portions Copyright 2002 Intel (eli.kupermann@intel.com, |
9 | * christopher.leech@intel.com, |
10 | * scott.feldman@intel.com) |
11 | * Portions Copyright (C) Sun Microsystems 2008 |
12 | */ |
13 | |
14 | #ifndef _UAPI_LINUX_ETHTOOL_H |
15 | #define _UAPI_LINUX_ETHTOOL_H |
16 | |
17 | #include <linux/kernel.h> |
18 | #include <linux/types.h> |
19 | #include <linux/if_ether.h> |
20 | |
21 | #define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */ |
22 | |
23 | /** |
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. |
35 | * |
36 | * This can be used to configure RX, TX and other channels. |
37 | */ |
38 | |
39 | struct ethtool_channels { |
40 | __u32 cmd; |
41 | __u32 max_rx; |
42 | __u32 max_tx; |
43 | __u32 max_other; |
44 | __u32 max_combined; |
45 | __u32 rx_count; |
46 | __u32 tx_count; |
47 | __u32 other_count; |
48 | __u32 combined_count; |
49 | }; |
50 | |
51 | #define ETHTOOL_FWVERS_LEN 32 |
52 | #define ETHTOOL_BUSINFO_LEN 32 |
53 | #define ETHTOOL_EROMVERS_LEN 32 |
54 | |
55 | /** |
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 |
66 | * an empty string. |
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 |
78 | * command, in bytes |
79 | * |
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). |
82 | * |
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. |
86 | */ |
87 | struct ethtool_drvinfo { |
88 | __u32 cmd; |
89 | char driver[32]; |
90 | char version[32]; |
91 | char fw_version[ETHTOOL_FWVERS_LEN]; |
92 | char bus_info[ETHTOOL_BUSINFO_LEN]; |
93 | char erom_version[ETHTOOL_EROMVERS_LEN]; |
94 | char reserved2[12]; |
95 | __u32 n_priv_flags; |
96 | __u32 n_stats; |
97 | __u32 testinfo_len; |
98 | __u32 eedump_len; |
99 | __u32 regdump_len; |
100 | }; |
101 | |
102 | #define ETHTOOL_GDRVINFO 0x00000003 |
103 | |
104 | #endif /* _UAPI_LINUX_ETHTOOL_H */ |
105 |
Warning: This file is not a C or C++ file. It does not have highlighting.