File: tbfqdrun

package info (click to toggle)
tcng 10b-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,644 kB
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 751
file content (48 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
BEGIN CONDITIONAL
tcsim
dev eth0
tc qdisc add dev eth0 root handle 1:0 tbf limit 20kB rate 1Mbit burst 3kB
tc qdisc add dev eth0 parent 1:0 pfifo
EOF
# TBF with prio (tc) ----------------------------------------------------------
tcsim | tcsim_filter -d tos | sed 's/ 1024.*//'
dev eth0 10Mbps {
    tbf (mtu 1.5kB,limit 10kB,rate 1kBps,burst 1.5kB) {
	prio {
	    class (1) if raw[0] == 1;
	    class (2) if raw[0] == 2;
	    class (3) if 1;
	}
    }
}

send 3 x 1024
send 2 x 1024
send 1 x 1024
end
EOF
0.000000 D:03
0.520000 D:01
1.540000 D:02
# TBF with prio (ext) ---------------------------------------------------------
LD_LIBRARY_PATH=. PATH=$PATH:tcc/ext tcsim -Xc,-xif:test | \
  tcsim_filter -d tos | sed 's/ 1024.*//'
dev eth0 10Mbps {
    tbf (mtu 1.5kB,limit 10kB,rate 1kBps,burst 1.5kB) {
	prio {
	    class (1) if raw[0] == 1;
	    class (2) if raw[0] == 2;
	    class (3) if 1;
	}
    }
}

send 3 x 1024
send 2 x 1024
send 1 x 1024
end
EOF
0.000000 D:03
0.520000 D:01
1.540000 D:02
END CONDITIONAL