On Wed, 15 Nov 2017 07:06:21 +0530, Nishanth Devarajan wrote:
> This patch adapts the tc command line interface to allow bandwidth limits
> to be specified as a percentage of the interface's capacity.
> 
> For this purpose, we've modified and moved int read_prop() from
> ip/iptuntap.c to lib.utils.c to make it accessible to tc.
> 
> Additionally, adding this functionality requires passing the specified
> device string to each class/qdisc which changes the prototype for a
> couple of functions: the .parse_qopt and .parse_copt interfaces. The
> device string is a required parameter for tc-qdisc and tc-class, and when
> not specified, the kernel returns ENODEV. In this patch, if the user tries
> to specify a bandwidth percentage without naming the device, we return an
> error from userspace.
> 
> Signed-off by: Nishanth Devarajan <ndev2...@gmail.com>

IMHO you need to at least add a big warning in the man page that the
per cent speed means the fraction of *current* speed, and if the speed
changes the value will not be recalculated.

Reply via email to