[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54DDD5B5.2050605@cogentembedded.com>
Date: Fri, 13 Feb 2015 13:45:09 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Zhu Yanjun <Yanjun.Zhu@...driver.com>, netdev@...r.kernel.org,
mst@...hat.com, jasowang@...hat.com, viro@...iv.linux.org.uk,
davem@...emloft.net, jonathon.reinhart@...il.com
Subject: Re: [PATCH 1/1] tun: change speed from 10M to dynamically configured
On 2/13/2015 9:19 AM, Zhu Yanjun wrote:
> The default speed of normal nic is 1000M while the default speed
> of tun is 10M. Now the default speed of tun is changed to 1000M.
> And there are 3 options: 10M, 100M and 1000M to the speed of tun.
> The command "ethtool -s tun0 speed 10/100/1000" can configure the
> speed of tun dynamically.
> CC: Michael S. Tsirkin <mst@...hat.com>
> CC: Jason Wang <jasowang@...hat.com>
> CC: Al Viro <viro@...iv.linux.org.uk>
> Reviewed-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
> Reviewed-by: Jonathon Reinhart <jonathon.reinhart@...il.com>
> Signed-off-by: Zhu Yanjun <Yanjun.Zhu@...driver.com>
[...]
> diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h
> index 50ae243..78a09a7 100644
> --- a/include/uapi/linux/if_tun.h
> +++ b/include/uapi/linux/if_tun.h
> @@ -66,6 +66,11 @@
> #define IFF_PERSIST 0x0800
> #define IFF_NOFILTER 0x1000
>
> +/*add speed control, default 1000M*/
Please do add spaces after /* and before */.
> +#define TUN_CTRL_SPD_10 0x0020
> +#define TUN_CTRL_SPD_100 0x0040
> +#define TUN_CTRL_SPD_1000 0x0080
> +
> /* Socket options */
> #define TUN_TX_TIMESTAMP 1
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists