#!/bin/bash #modprobe pktgen function pgset() { local result echo $1 > $PGDEV result=`cat $PGDEV | fgrep "Result: OK:"` if [ "$result" = "" ]; then cat $PGDEV | fgrep Result: fi } # Config Start Here ----------------------------------------------------------- # thread config # Each CPU has its own thread. One CPU example. We add eth1. # IPv6. Note increase in minimal packet length PGDEV=/proc/net/pktgen/kpktgend_0 echo "Removing all devices" pgset "rem_device_all" echo "Adding eth1" pgset "add_device eth1" # device config # delay 0 CLONE_SKB="clone_skb 1000000" # NIC adds 4 bytes CRC PKT_SIZE="pkt_size 66" # COUNT 0 means forever #COUNT="count 0" COUNT="count 10000000" DELAY="delay 0" PGDEV=/proc/net/pktgen/eth1 echo "Configuring $PGDEV" pgset "$COUNT" pgset "$CLONE_SKB" pgset "$PKT_SIZE" pgset "$DELAY" pgset "dst6 fec0::1" pgset "src6 fec0::2" pgset "dst_mac 00:04:23:08:91:dc" # Time to run PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" trap true INT pgset "start" echo "Done" cat /proc/net/pktgen/eth1 ption> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools/power/cpupower
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2017-01-29 12:40:52 +0100
committerKalle Valo <kvalo@codeaurora.org>2017-01-31 09:08:52 +0200
commit33e962c8871f015f5c8978384553dddcf5b81b22 (patch)
tree43aff96c2ee21d9e0fa2018457778a4de52053cd /tools/power/cpupower
parent575ddce0507789bf9830d089557d2199d2f91865 (diff)
rt2x00: fix clk_get call
clk_get() takes two arguments and might return ERR_PTR(), so we have to nullify pointer on that case, to do not break further call to clk_get_rate(). Reported-by: Felix Fietkau <nbd@nbd.name> Fixes: 34db70b92fae ("rt2x00: add copy of clk for soc devices") Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'tools/power/cpupower')