/*
 * sfq - Exercise SFQ
 *
 * We have three flows, one of them is very bursty. FIFO or SFQ without
 * perturbation simply kill the less bursty flows.
 */

#include "ip.def"

#define FLOW(n) TCP_PCK($src=10.0.0.9 $dst=10.0.0.##n \
		        $sport=PORT_HTTP $dport=PORT_USER) \
			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
; DO NOT use "end" here, because SFQ does not stop its timer
