xref: /OK3568_Linux_fs/kernel/tools/include/uapi/linux/ethtool.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * ethtool.h: Defines for Linux ethtool.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 1998 David S. Miller (davem@redhat.com)
6*4882a593Smuzhiyun  * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
7*4882a593Smuzhiyun  * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
8*4882a593Smuzhiyun  * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
9*4882a593Smuzhiyun  *                                christopher.leech@intel.com,
10*4882a593Smuzhiyun  *                                scott.feldman@intel.com)
11*4882a593Smuzhiyun  * Portions Copyright (C) Sun Microsystems 2008
12*4882a593Smuzhiyun  */
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #ifndef _UAPI_LINUX_ETHTOOL_H
15*4882a593Smuzhiyun #define _UAPI_LINUX_ETHTOOL_H
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #include <linux/kernel.h>
18*4882a593Smuzhiyun #include <linux/types.h>
19*4882a593Smuzhiyun #include <linux/if_ether.h>
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #define ETHTOOL_GCHANNELS       0x0000003c /* Get no of channels */
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun /**
24*4882a593Smuzhiyun  * struct ethtool_channels - configuring number of network channel
25*4882a593Smuzhiyun  * @cmd: ETHTOOL_{G,S}CHANNELS
26*4882a593Smuzhiyun  * @max_rx: Read only. Maximum number of receive channel the driver support.
27*4882a593Smuzhiyun  * @max_tx: Read only. Maximum number of transmit channel the driver support.
28*4882a593Smuzhiyun  * @max_other: Read only. Maximum number of other channel the driver support.
29*4882a593Smuzhiyun  * @max_combined: Read only. Maximum number of combined channel the driver
30*4882a593Smuzhiyun  *	support. Set of queues RX, TX or other.
31*4882a593Smuzhiyun  * @rx_count: Valid values are in the range 1 to the max_rx.
32*4882a593Smuzhiyun  * @tx_count: Valid values are in the range 1 to the max_tx.
33*4882a593Smuzhiyun  * @other_count: Valid values are in the range 1 to the max_other.
34*4882a593Smuzhiyun  * @combined_count: Valid values are in the range 1 to the max_combined.
35*4882a593Smuzhiyun  *
36*4882a593Smuzhiyun  * This can be used to configure RX, TX and other channels.
37*4882a593Smuzhiyun  */
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun struct ethtool_channels {
40*4882a593Smuzhiyun 	__u32	cmd;
41*4882a593Smuzhiyun 	__u32	max_rx;
42*4882a593Smuzhiyun 	__u32	max_tx;
43*4882a593Smuzhiyun 	__u32	max_other;
44*4882a593Smuzhiyun 	__u32	max_combined;
45*4882a593Smuzhiyun 	__u32	rx_count;
46*4882a593Smuzhiyun 	__u32	tx_count;
47*4882a593Smuzhiyun 	__u32	other_count;
48*4882a593Smuzhiyun 	__u32	combined_count;
49*4882a593Smuzhiyun };
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun #endif /* _UAPI_LINUX_ETHTOOL_H */
52