File: pol_single_drop.tcsim

package info (click to toggle)
tcng 10b-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,632 kB
  • ctags: 2,515
  • sloc: ansic: 19,038; pascal: 4,640; yacc: 2,619; sh: 1,908; perl: 1,546; lex: 772; makefile: 755
file content (20 lines) | stat: -rw-r--r-- 404 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
/*
 * Single policer, drops
 */

dev eth0 10000 { /* 10 Mbps */
    $p = police(rate 500kbps,mtu 130B,burst 130B);
    dsmark (indices 2) {
        class (1,mask 0,value 1)
	    if (conform police $p || drop) && count police $p;
        class (0)
	    if 1;
    }
}

every 0.001s send 0 x 125       /* 1 Mbps */
time 0.1s

/*
 * Should enqueue 101 packets, mark 50% of them as "1", and drop the rest
 */