]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: B.W limits can now be specified in %.
authorNishanth Devarajan <ndev2021@gmail.com>
Tue, 21 Nov 2017 02:20:47 +0000 (07:50 +0530)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 24 Nov 2017 19:22:13 +0000 (11:22 -0800)
commit927e3cfb52b58fbdf217d84204d653db101c137a
tree6f963f73d59281cae314635a0ef5a0f1deaf6852
parentb317557f5854bb8e4ed0ff47a2327f652c6e3433
tc: B.W limits can now be specified in %.

This patch adapts the tc command line interface to allow bandwidth limits
to be specified as a percentage of the interface's capacity.

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<ndev2021@gmail.com>
36 files changed:
include/utils.h
ip/iptuntap.c
lib/utils.c
man/man8/tc.8
tc/q_atm.c
tc/q_cbq.c
tc/q_cbs.c
tc/q_choke.c
tc/q_clsact.c
tc/q_codel.c
tc/q_drr.c
tc/q_dsmark.c
tc/q_fifo.c
tc/q_fq.c
tc/q_fq_codel.c
tc/q_gred.c
tc/q_hfsc.c
tc/q_hhf.c
tc/q_htb.c
tc/q_ingress.c
tc/q_mqprio.c
tc/q_multiq.c
tc/q_netem.c
tc/q_pie.c
tc/q_prio.c
tc/q_qfq.c
tc/q_red.c
tc/q_rr.c
tc/q_sfb.c
tc/q_sfq.c
tc/q_tbf.c
tc/tc.c
tc/tc_class.c
tc/tc_qdisc.c
tc/tc_util.c
tc/tc_util.h