How to change HTB rate of a classid

htbtc

I have tc htb qdisc setup that looks like

     1:0
      |
     1:1
    /   \
 1:10   1:11

# tc -s -d class show dev br0

Shows class 1:10 with 1024kbit rate and ceil:

class htb 1:10 parent 1:1 prio quantum rate 1024Kbit ceil 1024Kbit linklayer ethernet burst 15Kb/1 mpu 0b cburst 1599b/1 mpu 0b level 0 
 Sent 3271331 bytes 3482 pkt (dropped 0, overlimits 2132 requeues 0) 
 backlog 0b 0p requeues 0
 lended: 3482 borrowed: 0 giants: 0
 tokens: 1866943 ctokens: 187255

I want to change to rate/ceil of class 1:10. What I tried:

# tc class change dev br0 classid 1:10 rate 1kbit

And

# tc class change dev br0 parent 1:0 classid 1:10 rate 1kbit prio 1

I can't find any example in the internet that uses the change command of tc. I remember there was an example somewhere in the lartc documentations, but I can't find it anymore. TC man page says it has the same command syntax as add, but I couldn't make it work. The error says:

 Error: Qdisc "rate" is classless.

Best Answer

Perhaps you could try something like this:

 sudo tc class change dev br0 parent 1:1 classid 1:10 htb rate 1kbit ceil 5kbit burst 16b