File: sfq

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 (23 lines) | stat: -rw-r--r-- 614 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
/*
 * sfq - Exercise SFQ
 *
 * We have three flows, one of them is very bursty. FIFO or SFQ without
 * perturbation simply kill the less bursty flows.
 */

#define FLOW(n) TCP_PCK($ip_src=10.0.0.9 $ip_dst=10.0.0.##n) \
			0 x 960 /* 1000-header = 960 bytes */

dev eth0 1000 /* 1 Mbps */

tc qdisc add dev eth0 root handle 1:0 sfq perturb 1

every 0.005s send FLOW(1)		/* 1.60 Mbps */
every 0.003s send FLOW(2)		/* 2.67 Mbps */
every 0.008s send FLOW(3)		/* 1.00 Mbps */
every 0.008s send FLOW(3)		/* 1.00 Mbps */
every 0.008s send FLOW(3)		/* 1.00 Mbps */
every 0.008s send FLOW(3)		/* 1.00 Mbps */

time 10s
end