# @name Ethernet performance using IPERF on two interfaces simultaneously
# @desc Run Iperf as a server in a host PC on two different interfaces 
# and as a client in the target machine
# Test different different bandwidths, from 100M to 1000M
# @requires net/dual_mac

ETH_S_PERF_DUAL_ETH_IPERF_UDP_1G_100B source 'common.sh'; iface=`get_eth_all_iface_name.sh` || die "error getting eth interface name"; arr=($iface); echo ${arr[@]}; if [ "${#arr[@]}" -ne "2" ] ; then die "Only two ethernet interfaces are expected but found ${#arr[@]} interfaces. This is a dual mac test."; fi; iperfhost_env=(); for intface in "${arr[@]}"; do iperfhost_env+=($'IPERF'$intface'HOST'); done; echo "${iperfhost_env[@]}"; run_processes.sh -c "run_iperf.sh -v 3 -H $"${iperfhost_env[0]}" -- -w 128k -l 1500 -f M -u -t 60 -b 100M# run_iperf.sh -v 3 -H $"${iperfhost_env[1]}" -- -l 1400 -f M -u -t 60 -b 100M"
ETH_S_PERF_DUAL_ETH_IPERF_UDP_1G_250B source 'common.sh'; iface=`get_eth_all_iface_name.sh` || die "error getting eth interface name"; arr=($iface); echo ${arr[@]}; if [ "${#arr[@]}" -ne "2" ] ; then die "Only two ethernet interfaces are expected but found ${#arr[@]} interfaces. This is a dual mac test."; fi; iperfhost_env=(); for intface in "${arr[@]}"; do iperfhost_env+=($'IPERF'$intface'HOST'); done; echo "${iperfhost_env[@]}"; run_processes.sh -c "run_iperf.sh -v 3 -H $"${iperfhost_env[0]}" -- -w 128k -l 1500 -f M -u -t 60 -b 250M# run_iperf.sh -v 3 -H $"${iperfhost_env[1]}" -- -l 1400 -f M -u -t 60 -b 250M"
ETH_S_PERF_DUAL_ETH_IPERF_UDP_1G_500B source 'common.sh'; iface=`get_eth_all_iface_name.sh` || die "error getting eth interface name"; arr=($iface); echo ${arr[@]}; if [ "${#arr[@]}" -ne "2" ] ; then die "Only two ethernet interfaces are expected but found ${#arr[@]} interfaces. This is a dual mac test."; fi; iperfhost_env=(); for intface in "${arr[@]}"; do iperfhost_env+=($'IPERF'$intface'HOST'); done; echo "${iperfhost_env[@]}"; run_processes.sh -c "run_iperf.sh -v 3 -H $"${iperfhost_env[0]}" -- -w 128k -l 1500 -f M -u -t 60 -b 500M# run_iperf.sh -v 3 -H $"${iperfhost_env[1]}" -- -l 1400 -f M -u -t 60 -b 500M"
ETH_S_PERF_DUAL_ETH_IPERF_UDP_1G_750B source 'common.sh'; iface=`get_eth_all_iface_name.sh` || die "error getting eth interface name"; arr=($iface); echo ${arr[@]}; if [ "${#arr[@]}" -ne "2" ] ; then die "Only two ethernet interfaces are expected but found ${#arr[@]} interfaces. This is a dual mac test."; fi; iperfhost_env=(); for intface in "${arr[@]}"; do iperfhost_env+=($'IPERF'$intface'HOST'); done; echo "${iperfhost_env[@]}"; run_processes.sh -c "run_iperf.sh -v 3 -H $"${iperfhost_env[0]}" -- -w 128k -l 1500 -f M -u -t 60 -b 750M# run_iperf.sh -v 3 -H $"${iperfhost_env[1]}" -- -l 1400 -f M -u -t 60 -b 750M"
ETH_S_PERF_DUAL_ETH_IPERF_UDP_1G_1500B source 'common.sh'; iface=`get_eth_all_iface_name.sh` || die "error getting eth interface name"; arr=($iface); echo ${arr[@]}; if [ "${#arr[@]}" -ne "2" ] ; then die "Only two ethernet interfaces are expected but found ${#arr[@]} interfaces. This is a dual mac test."; fi; iperfhost_env=(); for intface in "${arr[@]}"; do iperfhost_env+=($'IPERF'$intface'HOST'); done; echo "${iperfhost_env[@]}"; run_processes.sh -c "run_iperf.sh -v 3 -H $"${iperfhost_env[0]}" -- -w 128k -l 1500 -f M -u -t 60 -b 1000M# run_iperf.sh -v 3 -H $"${iperfhost_env[1]}" -- -l 1400 -f M -u -t 60 -b 1000M"
