2 # SPDX-License-Identifier: GPL-2.0
12 result
=`cat $PGDEV | fgrep "Result: OK:"`
13 if [ "$result" = "" ]; then
14 cat $PGDEV | fgrep Result
:
18 # Config Start Here -----------------------------------------------------------
22 # One CPU means one thread. One CPU example. We add eth1, eth2 respectivly.
24 PGDEV
=/proc
/net
/pktgen
/kpktgend_0
25 echo "Removing all devices"
26 pgset
"rem_device_all"
28 pgset
"add_device eth1"
30 pgset
"add_device eth2"
34 # delay 0 means maximum speed.
36 CLONE_SKB
="clone_skb 1000000"
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 pgset
"dst 10.10.11.2"
52 pgset
"dst_mac 00:04:23:08:91:dc"
54 PGDEV
=/proc
/net
/pktgen
/eth2
55 echo "Configuring $PGDEV"
60 pgset
"dst 192.168.2.2"
61 pgset
"dst_mac 00:04:23:08:91:de"
64 PGDEV
=/proc
/net
/pktgen
/pgctrl
66 echo "Running... ctrl^C to stop"
70 cat /proc
/net
/pktgen
/eth1
/proc
/net
/pktgen
/eth2