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"
38 # delay 0 means maximum speed.
40 CLONE_SKB="clone_skb 1000000"
41 # NIC adds 4 bytes CRC
42 PKT_SIZE="pkt_size 60"
44 # COUNT 0 means forever
46 COUNT="count 10000000"
49 PGDEV=/proc/net/pktgen/eth1
50 echo "Configuring $PGDEV"
55 pgset "dst 10.10.11.2"
56 pgset "dst_mac 00:04:23:08:91:dc"
60 PGDEV=/proc/net/pktgen/pgctrl
62 echo "Running... ctrl^C to stop"
66 # Result can be vieved in /proc/net/pktgen/eth1