]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - tests/ethflood64k.sh
Attempt to kill remote pings in a more reliable way
[can-benchmark.git] / tests / ethflood64k.sh
index 97020930a02b90842798a68ac64c514b49ab4231..50ed6522381cf610c22c9afd0e6cf46d3f6f9139 100755 (executable)
@@ -3,23 +3,41 @@
 . _lib.sh
 
 t() {
 . _lib.sh
 
 t() {
-    ssh root@${SSH_CONNECTION%% *} 'ping -qfs 64000 "${SSH_CONNECTION%% *}"' &
-    PID_PING=$!
-    PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
-    vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER -t 1 -d $CAN0 -w 2 -c 10000
-    kill $PID_S
-    kill $PID_PING
+    for i in norm boost; do
+       for budget in 300 1 1000; do
+           if [ $budget -eq 300 -o $DRIVER == "socketcan" ]; then
+               if [ $i != "boost" ] || boost_irq_prio 90; then
+                   echo $budget > /proc/sys/net/core/netdev_budget
+                   ssh root@${SSH_CONNECTION%% *} 'ping -fs 64000 ${SSH_CONNECTION%% *}' &
+                   PID_PING=$!
+                   echo 0 1 > $DRIVER-$i-$budget-1000.dat
+                   PID_S=`vca_canping -s 1 -b -R FF:$RTPRIO -d $CAN1`
+                   vca_canping -m 1 -R FF:$RTPRIO -v -g $DRIVER-$i-$budget -t 1 -d $CAN0 -w 0 -c $COUNT
+                   kill $PID_S
+                   kill $PID_PING
+                   sleep 1 # Wait for remote buffers to become empty
+               fi
+           fi
+       done
+    done
 }
 
 
 
 }
 
 
 
-PLOT_CMD='
-set title "Round-trip time with ethenet load - ping -fs 64000 (`uname -r`)"
+p() { cat <<EOF
+set title "Round-trip time with ethernet load - ping -fs 64000"
 set logscale y
 set grid
 set logscale y
 set grid
-set xlabel "Time [{/Symbol m}s]"
+set xlabel "Time [ms]"
 set ylabel "Latency profile [messages]"
 set ylabel "Latency profile [messages]"
-plot [0:] "socketcan-1000.dat" with lp title "Socketcan",\
-          "lincan-1000.dat" with lp title "Lincan"
-'
-
+plot [0:] \
+          "socketcan-norm-300-1000.dat" with lp lt 1 title "Socketcan",\
+          "lincan-norm-300-1000.dat" with lp lt 2 title "Lincan",\
+          "socketcan-boost-300-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio",\
+          "lincan-boost-300-1000.dat" with lp lt 2 title "Lincan boosted IRQ prio",\
+          "socketcan-norm-1-1000.dat" with lp lt 1 title "Socketcan netdev\\\\_budget=1",\
+          "socketcan-boost-1-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio, netdev\\\\_budget=1",\
+          "socketcan-norm-1000-1000.dat" with lp lt 1 title "Socketcan, netdev\\\\_budget=1000",\
+          "socketcan-boost-1000-1000.dat" with lp lt 1 title "Socketcan boosted IRQ prio, netdev\\\\_budget=1000"
+EOF
+}