aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorKan Liang <kan.liang@intel.com>2016-02-19 09:24:01 -0500
committerDavid S. Miller <davem@davemloft.net>2016-02-19 22:54:09 -0500
commitac2c7ad0e5d6030452c9af2fafd192e17fd04264 (patch)
tree96499dfee0829222beab55ac0042ca8515436857 /include/uapi/linux
parent5fd003f56c2c584b62a0486ad25bbd4be02b8b6c (diff)
net/ethtool: introduce a new ioctl for per queue setting
Introduce a new ioctl ETHTOOL_PERQUEUE for per queue parameters setting. The following patches will enable some SUB_COMMANDs for per queue setting. Signed-off-by: Kan Liang <kan.liang@intel.com> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/ethtool.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 190aea0faaf4..f15ae02621a1 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1202,6 +1202,21 @@ enum ethtool_sfeatures_retval_bits {
1202#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT) 1202#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
1203#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT) 1203#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
1204 1204
1205#define MAX_NUM_QUEUE 4096
1206
1207/**
1208 * struct ethtool_per_queue_op - apply sub command to the queues in mask.
1209 * @cmd: ETHTOOL_PERQUEUE
1210 * @sub_command: the sub command which apply to each queues
1211 * @queue_mask: Bitmap of the queues which sub command apply to
1212 * @data: A complete command structure following for each of the queues addressed
1213 */
1214struct ethtool_per_queue_op {
1215 __u32 cmd;
1216 __u32 sub_command;
1217 __u32 queue_mask[DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
1218 char data[];
1219};
1205 1220
1206/* CMDs currently supported */ 1221/* CMDs currently supported */
1207#define ETHTOOL_GSET 0x00000001 /* Get settings. */ 1222#define ETHTOOL_GSET 0x00000001 /* Get settings. */
@@ -1285,6 +1300,8 @@ enum ethtool_sfeatures_retval_bits {
1285#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */ 1300#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */
1286#define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */ 1301#define ETHTOOL_GPHYSTATS 0x0000004a /* get PHY-specific statistics */
1287 1302
1303#define ETHTOOL_PERQUEUE 0x0000004b /* Set per queue options */
1304
1288/* compatibility with older code */ 1305/* compatibility with older code */
1289#define SPARC_ETH_GSET ETHTOOL_GSET 1306#define SPARC_ETH_GSET ETHTOOL_GSET
1290#define SPARC_ETH_SSET ETHTOOL_SSET 1307#define SPARC_ETH_SSET ETHTOOL_SSET