diff options
author | Govindarajulu Varadarajan <_govind@gmx.com> | 2014-09-02 17:47:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-05 15:12:20 -0400 |
commit | f0db9b073415848709dd59a6394969882f517da9 (patch) | |
tree | f9d5de4b8528c4f5c55d04c5642ac4053489fe5e /include/uapi/linux/ethtool.h | |
parent | a03bb56e67c357980dae886683733dab5583dc14 (diff) |
ethtool: Add generic options for tunables
This patch adds new ethtool cmd, ETHTOOL_GTUNABLE & ETHTOOL_STUNABLE for getting
tunable values from driver.
Add get_tunable and set_tunable to ethtool_ops. Driver implements these
functions for getting/setting tunable value.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/ethtool.h')
-rw-r--r-- | include/uapi/linux/ethtool.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index e3c7a719c76b..7a364f2f3d3f 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
@@ -209,6 +209,32 @@ struct ethtool_value { | |||
209 | __u32 data; | 209 | __u32 data; |
210 | }; | 210 | }; |
211 | 211 | ||
212 | enum tunable_id { | ||
213 | ETHTOOL_ID_UNSPEC, | ||
214 | ETHTOOL_RX_COPYBREAK, | ||
215 | }; | ||
216 | |||
217 | enum tunable_type_id { | ||
218 | ETHTOOL_TUNABLE_UNSPEC, | ||
219 | ETHTOOL_TUNABLE_U8, | ||
220 | ETHTOOL_TUNABLE_U16, | ||
221 | ETHTOOL_TUNABLE_U32, | ||
222 | ETHTOOL_TUNABLE_U64, | ||
223 | ETHTOOL_TUNABLE_STRING, | ||
224 | ETHTOOL_TUNABLE_S8, | ||
225 | ETHTOOL_TUNABLE_S16, | ||
226 | ETHTOOL_TUNABLE_S32, | ||
227 | ETHTOOL_TUNABLE_S64, | ||
228 | }; | ||
229 | |||
230 | struct ethtool_tunable { | ||
231 | __u32 cmd; | ||
232 | __u32 id; | ||
233 | __u32 type_id; | ||
234 | __u32 len; | ||
235 | void *data[0]; | ||
236 | }; | ||
237 | |||
212 | /** | 238 | /** |
213 | * struct ethtool_regs - hardware register dump | 239 | * struct ethtool_regs - hardware register dump |
214 | * @cmd: Command number = %ETHTOOL_GREGS | 240 | * @cmd: Command number = %ETHTOOL_GREGS |
@@ -1152,6 +1178,8 @@ enum ethtool_sfeatures_retval_bits { | |||
1152 | 1178 | ||
1153 | #define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ | 1179 | #define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ |
1154 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ | 1180 | #define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ |
1181 | #define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */ | ||
1182 | #define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ | ||
1155 | 1183 | ||
1156 | /* compatibility with older code */ | 1184 | /* compatibility with older code */ |
1157 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1185 | #define SPARC_ETH_GSET ETHTOOL_GSET |