Attempt to kill remote pings in a more reliable way
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 31 Aug 2009 19:49:11 +0000 (21:49 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 31 Aug 2009 19:49:11 +0000 (21:49 +0200)
tests/ethflood64k-w2.sh
tests/ethflood64k.sh

index ad7173d..727bb53 100755 (executable)
@@ -5,19 +5,19 @@
 t() {
     for i in norm boost; do
        for budget in 300 1 1000; do
 t() {
     for i in norm boost; do
        for budget in 300 1 1000; do
-           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
            if [ $budget -eq 300 -o $DRIVER == "socketcan" ]; then
                if [ $i != "boost" ] || boost_irq_prio 90; then
            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 2 -c $COUNT
                    kill $PID_S
                    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 2 -c $COUNT
                    kill $PID_S
+                   kill $PID_PING
+                   sleep 1 # Wait for remote buffers to become empty
                fi
            fi
                fi
            fi
-           kill $PID_PING
-           sleep 1 # Wait for remote buffers to become empty
        done
     done
 }
        done
     done
 }
index e6af163..50ed652 100755 (executable)
@@ -5,19 +5,19 @@
 t() {
     for i in norm boost; do
        for budget in 300 1 1000; do
 t() {
     for i in norm boost; do
        for budget in 300 1 1000; do
-           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
            if [ $budget -eq 300 -o $DRIVER == "socketcan" ]; then
                if [ $i != "boost" ] || boost_irq_prio 90; then
            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
                    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
                fi
            fi
-           kill $PID_PING
-           sleep 1 # Wait for remote buffers to become empty
        done
     done
 }
        done
     done
 }