11 result=`cat $PGDEV | fgrep "Result: OK:"`
12 if [ "$result" = "" ]; then
13 cat $PGDEV | fgrep Result:
17 # Config Start Here -----------------------------------------------------------
21 # Each CPU has own thread. Two CPU exammple. We add eth1, eth2 respectivly.
23 PGDEV=/proc/net/pktgen/kpktgend_0
24 echo "Removing all devices"
25 pgset "rem_device_all"
27 pgset "add_device eth1"
28 echo "Setting max_before_softirq 10000"
29 pgset "max_before_softirq 10000"
34 # We need to do alloc for every skb since we cannot clone here.
36 CLONE_SKB="clone_skb 0"
37 # NIC adds 4 bytes CRC
38 PKT_SIZE="pkt_size 60"
40 # COUNT 0 means forever
42 COUNT="count 10000000"
45 PGDEV=/proc/net/pktgen/eth1
46 echo "Configuring $PGDEV"
51 # Random address with in the min-max range
52 pgset "flag IPDST_RND"
53 pgset "dst_min 10.0.0.0"
54 pgset "dst_max 10.255.255.255"
56 # 8k Concurrent flows at 4 pkts
60 pgset "dst_mac 00:04:23:08:91:dc"
63 PGDEV=/proc/net/pktgen/pgctrl
65 echo "Running... ctrl^C to stop"
69 # Result can be vieved in /proc/net/pktgen/eth1