]> rtime.felk.cvut.cz Git - can-eth-gw.git/blobdiff - bench/bench
updated kernel module benchmark, added endianness conversion
[can-eth-gw.git] / bench / bench
index 15a003faa3d3c19d8fe558c9d0ac2dbc7cc42f8e..294b813c988b269dde61c0d629a943d603d372b1 100755 (executable)
@@ -15,20 +15,21 @@ fi
 # bench kernel
 #-----------------
 modprobe canethgw
+mkcegwdev
 
-cegw --listen udp@127.0.0.1:10501
-cegw --add -s can@vcan0 -d udp@127.0.0.1:10502
-cegw --add -s udp@127.0.0.1:10502 -d can@vcan0
+cegw vcan0 127.0.0.1:10501 127.0.0.1:10502 &
+JOB=$!
 
 sleep $SLEEP
-echo "#kernel udp->can" | tee -a result | cut -c 2-
+echo "#kernel udp->can" | tee -a result | cut -c 2-
 cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> $RESULTFILE
 
 sleep $SLEEP
-echo "#kernel can->udp" | tee -a result | cut -c 2-
+echo "#kernel can->udp" | tee -a result | cut -c 2-
 cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> $RESULTFILE
 
 sleep $SLEEP
+kill $JOB
 modprobe -r canethgw
 
 #-----------------
@@ -38,11 +39,11 @@ canethgw -s can@vcan0 -d udp@127.0.0.1:10502 -l udp@127.0.0.1:10501 &
 PID=$!
 sleep $SLEEP
 
-echo "#user udp->can" | tee -a result | cut -c 2-
+echo "#user udp->can" | tee -a result | cut -c 2-
 cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> $RESULTFILE
 
 sleep $SLEEP
-echo "#user can->udp" | tee -a result | cut -c 2-
+echo "#user can->udp" | tee -a result | cut -c 2-
 cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> $RESULTFILE
 
 sleep $SLEEP