summaryrefslogtreecommitdiffstats
path: root/src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh')
-rw-r--r--src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh b/src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh
new file mode 100644
index 000000000..f23a6d594
--- /dev/null
+++ b/src/seastar/dpdk/examples/ipsec-secgw/test/data_rxtx.sh
@@ -0,0 +1,62 @@
+#! /bin/bash
+
+TCP_PORT=22222
+
+ping_test1()
+{
+ dst=$1
+
+ i=0
+ st=0
+ while [[ $i -ne 1200 && $st -eq 0 ]];
+ do
+ let i++
+ ping -c 1 -s ${i} ${dst}
+ st=$?
+ done
+
+ if [[ $st -ne 0 ]]; then
+ echo "ERROR: $0 failed for dst=${dst}, sz=${i}"
+ fi
+ return $st;
+}
+
+ping6_test1()
+{
+ dst=$1
+
+ i=0
+ st=0
+ while [[ $i -ne 1200 && $st -eq 0 ]];
+ do
+ let i++
+ ping6 -c 1 -s ${i} ${dst}
+ st=$?
+ done
+
+ if [[ $st -ne 0 ]]; then
+ echo "ERROR: $0 failed for dst=${dst}, sz=${i}"
+ fi
+ return $st;
+}
+
+scp_test1()
+{
+ dst=$1
+
+ for sz in 1234 23456 345678 4567890 56789102 ; do
+ x=`basename $0`.${sz}
+ dd if=/dev/urandom of=${x} bs=${sz} count=1
+ scp ${x} [${dst}]:${x}
+ scp [${dst}]:${x} ${x}.copy1
+ diff -u ${x} ${x}.copy1
+ st=$?
+ rm -f ${x} ${x}.copy1
+ ssh ${REMOTE_HOST} rm -f ${x}
+ if [[ $st -ne 0 ]]; then
+ return $st
+ fi
+ done
+
+ return 0;
+}