| result=`cat $PGDEV | fgrep "Result: OK:"` |
| if [ "$result" = "" ]; then |
| cat $PGDEV | fgrep Result: |
| # Config Start Here ----------------------------------------------------------- |
| # Each CPU has its own thread. Two CPU example. We add eth1 to the first |
| # and leave the second idle. |
| PGDEV=/proc/net/pktgen/kpktgend_0 |
| echo "Removing all devices" |
| # We need to remove old config since we dont use this thread. We can only |
| # one NIC on one CPU due to affinity reasons. |
| PGDEV=/proc/net/pktgen/kpktgend_1 |
| echo "Removing all devices" |
| # delay 0 means maximum speed. |
| CLONE_SKB="clone_skb 1000000" |
| PGDEV=/proc/net/pktgen/eth1 |
| echo "Configuring $PGDEV" |
| pgset "dst_mac 00:04:23:08:91:dc" |
| PGDEV=/proc/net/pktgen/pgctrl |
| echo "Running... ctrl^C to stop" |
| cat /proc/net/pktgen/eth1 |