11 result
=`cat $PGDEV | fgrep "Result: OK:"`
12 if [ "$result" = "" ]; then
13 cat $PGDEV | fgrep Result
:
17 # Config Start Here -----------------------------------------------------------
21 # Each CPU has its own thread. Two CPU example. We add eth1, eth2 respectively.
23 PGDEV
=/proc
/net
/pktgen
/kpktgend_0
24 echo "Removing all devices"
25 pgset
"rem_device_all"
27 pgset
"add_device eth1"
29 PGDEV
=/proc
/net
/pktgen
/kpktgend_1
30 echo "Removing all devices"
31 pgset
"rem_device_all"
33 pgset
"add_device eth2"
37 # delay 0 means maximum speed.
39 CLONE_SKB
="clone_skb 1000000"
40 # NIC adds 4 bytes CRC
41 PKT_SIZE
="pkt_size 60"
43 # COUNT 0 means forever
45 COUNT
="count 10000000"
48 PGDEV
=/proc
/net
/pktgen
/eth1
49 echo "Configuring $PGDEV"
54 pgset
"dst 10.10.11.2"
55 pgset
"dst_mac 00:04:23:08:91:dc"
57 PGDEV
=/proc
/net
/pktgen
/eth2
58 echo "Configuring $PGDEV"
63 pgset
"dst 192.168.2.2"
64 pgset
"dst_mac 00:04:23:08:91:de"
67 PGDEV
=/proc
/net
/pktgen
/pgctrl
69 echo "Running... ctrl^C to stop"
73 cat /proc
/net
/pktgen
/eth1
/proc
/net
/pktgen
/eth2