11 result=`cat $PGDEV | fgrep "Result: OK:"`
12 if [ "$result" = "" ]; then
13 cat $PGDEV | fgrep Result:
22 # Config Start Here -----------------------------------------------------------
26 # Each CPU has own thread. Two CPU exammple. We add eth1, eth2 respectivly.
28 PGDEV=/proc/net/pktgen/kpktgend_0
29 echo "Removing all devices"
30 pgset "rem_device_all"
32 pgset "add_device eth1"
33 echo "Setting max_before_softirq 10000"
34 pgset "max_before_softirq 10000"
40 # We need to do alloc for every skb since we cannot clone here.
42 CLONE_SKB="clone_skb 0"
43 # NIC adds 4 bytes CRC
44 PKT_SIZE="pkt_size 60"
46 # COUNT 0 means forever
48 COUNT="count 10000000"
51 PGDEV=/proc/net/pktgen/eth1
52 echo "Configuring $PGDEV"
57 # Random address with in the min-max range
58 pgset "flag IPDST_RND"
59 pgset "dst_min 10.0.0.0"
60 pgset "dst_max 10.255.255.255"
62 pgset "dst_mac 00:04:23:08:91:dc"
65 PGDEV=/proc/net/pktgen/pgctrl
67 echo "Running... ctrl^C to stop"
71 # Result can be vieved in /proc/net/pktgen/eth1