]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blob - doc/can/examples/htb1.txt
02dc18b3f7f5689f495213d3c8464c318d909e32
[lisovros/iproute2_canprio.git] / doc / can / examples / htb1.txt
1 DEV=can0
2
3 tc qdisc add dev ${DEV} root handle 1: htb 
4
5 tc class add dev ${DEV} parent 1: classid 1:1 htb rate 100kbps ceil 100kbps 
6 tc class add dev ${DEV} parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps
7 tc class add dev ${DEV} parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps
8 tc class add dev ${DEV} parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps
9
10 tc filter add dev ${DEV} parent 1:0 prio 1 \
11         can sffid 0x123 effid 0x123 flowid 1:10
12 tc filter add dev ${DEV} parent 1:0 prio 2 \
13         can sffid 0x124 effid 0x124 flowid 1:11
14 tc filter add dev ${DEV} parent 1:0 prio 3 \
15         can sffid 0x125 effid 0x125 flowid 1:12
16
17 tc qdisc add dev ${DEV} parent 1:12 handle 40: sfq perturb 10
18
19
20 #The second line creates a "root" class, 1:1 under the qdisc 1:. The definition
21 #of a root class is one with the htb qdisc as its parent. A root class, like 
22 #other classes under an htb qdisc allows its children to borrow from each other,
23 #but one root class cannot borrow from another. We could have created the other
24 #three classes directly under the htb qdisc, but then the excess bandwidth from
25 #one would not be available to the others. In this case we do want to allow 
26 #borrowing, so we have to create an extra class to serve as the root and put the
27 #classes that will carry the real data under that.
28
29