From: Tonghao Zhang <redacted>
tbf has only one qdisc class. When adding qdisc for it,
we should check the classid, otherwise the parentid:1
classid is available, no matter what classid tc specified.
$ tc qdisc add dev eth1 handle 10: root tbf rate 0.5mbit burst 5kb latency 70ms
$ tc class show dev eth1
class tbf 10:1 parent 10:
$ tc qdisc add dev eth1 parent 10:2 handle 20: pfifo_fast
or
$ tc qdisc add dev eth1 parent 10:0 handle 20: pfifo_fast
$ tc class show dev eth1
class tbf 10:1 parent 10: leaf 20:
Signed-off-by: Tonghao Zhang <redacted>
---
net/sched/sch_tbf.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
From: Cong Wang <hidden> Date: 2018-12-19 17:40:15
On Tue, Dec 18, 2018 at 11:08 PM [off-list ref] wrote:
From: Tonghao Zhang <redacted>
tbf has only one qdisc class. When adding qdisc for it,
we should check the classid, otherwise the parentid:1
classid is available, no matter what classid tc specified.
$ tc qdisc add dev eth1 handle 10: root tbf rate 0.5mbit burst 5kb latency 70ms
$ tc class show dev eth1
class tbf 10:1 parent 10:
$ tc qdisc add dev eth1 parent 10:2 handle 20: pfifo_fast
or
$ tc qdisc add dev eth1 parent 10:0 handle 20: pfifo_fast
$ tc class show dev eth1
class tbf 10:1 parent 10: leaf 20:
On Thu, Dec 20, 2018 at 1:40 AM Cong Wang [off-list ref] wrote:
On Tue, Dec 18, 2018 at 11:08 PM [off-list ref] wrote:
quoted
From: Tonghao Zhang <redacted>
tbf has only one qdisc class. When adding qdisc for it,
we should check the classid, otherwise the parentid:1
classid is available, no matter what classid tc specified.
$ tc qdisc add dev eth1 handle 10: root tbf rate 0.5mbit burst 5kb latency 70ms
$ tc class show dev eth1
class tbf 10:1 parent 10:
$ tc qdisc add dev eth1 parent 10:2 handle 20: pfifo_fast
or
$ tc qdisc add dev eth1 parent 10:0 handle 20: pfifo_fast
$ tc class show dev eth1
class tbf 10:1 parent 10: leaf 20:
I think it is the intended behavior of tbf class.
The parent id such as parent-id:0 is invalid for other qdisc, is
available for tbf. It is confused for administrator.
Should we add that check ?