Lines Matching +full:rx +full:- +full:eq

2 # SPDX-License-Identifier: GPL-2.0
36 port=$((10000 - 1))
38 if [ $tc_loss -eq 100 ];then
40 elif [ $tc_loss -ge 10 ]; then
42 elif [ $tc_loss -ge 1 ]; then
49 echo "Usage: $0 [ -a ]"
50 echo -e "\t-d: tc/netem delay in milliseconds, e.g. \"-d 10\" (default random)"
51 echo -e "\t-l: tc/netem loss percentage, e.g. \"-l 0.02\" (default random)"
52 …echo -e "\t-r: tc/netem reorder mode, e.g. \"-r 25% 50% gap 5\", use "-r 0" to disable reordering …
53 …echo -e "\t-e: ethtool features to disable, e.g.: \"-e tso -e gso\" (default: randomly disable any…
54 echo -e "\t-4: IPv4 only: disable IPv6 tests (default: test both IPv4 and IPv6)"
55 echo -e "\t-c: capture packets for each test using tcpdump (default: no capture)"
56 echo -e "\t-f: size of file to transfer in bytes (default random)"
57 echo -e "\t-S: set sndbuf value (default: use kernel default)"
58 echo -e "\t-R: set rcvbuf value (default: use kernel default)"
59 echo -e "\t-m: test mode (poll, sendfile; default: poll)"
60 echo -e "\t-t: also run tests with TCP (use twice to non-fallback tcp)"
61 echo -e "\t-C: enable the MPTCP data checksum"
71 if [ $OPTARG -ge 0 ];then
74 echo "-d requires numeric argument, got \"$OPTARG\"" 1>&2
95 if [ $OPTARG -ge 0 ];then
98 echo "-S requires numeric argument, got \"$OPTARG\"" 1>&2
103 if [ $OPTARG -ge 0 ];then
106 echo "-R requires numeric argument, got \"$OPTARG\"" 1>&2
140 rm -f "$cin_disconnect" "$cout_disconnect"
141 rm -f "$cin" "$cout"
142 rm -f "$sin" "$sout"
143 rm -f "$capout"
165 # - drop 1% -> reorder 25%
166 # <- TSO off -
172 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
173 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
175 ip -net "$ns1" link set ns1eth2 up
176 ip -net "$ns1" route add default via 10.0.1.2
177 ip -net "$ns1" route add default via dead:beef:1::2
179 ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
180 ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
181 ip -net "$ns2" link set ns2eth1 up
183 ip -net "$ns2" addr add 10.0.2.1/24 dev ns2eth3
184 ip -net "$ns2" addr add dead:beef:2::1/64 dev ns2eth3 nodad
185 ip -net "$ns2" link set ns2eth3 up
186 ip -net "$ns2" route add default via 10.0.2.2
187 ip -net "$ns2" route add default via dead:beef:2::2
188 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1
189 ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1
191 ip -net "$ns3" addr add 10.0.2.2/24 dev ns3eth2
192 ip -net "$ns3" addr add dead:beef:2::2/64 dev ns3eth2 nodad
193 ip -net "$ns3" link set ns3eth2 up
195 ip -net "$ns3" addr add 10.0.3.2/24 dev ns3eth4
196 ip -net "$ns3" addr add dead:beef:3::2/64 dev ns3eth4 nodad
197 ip -net "$ns3" link set ns3eth4 up
198 ip -net "$ns3" route add default via 10.0.2.1
199 ip -net "$ns3" route add default via dead:beef:2::1
200 ip netns exec "$ns3" sysctl -q net.ipv4.ip_forward=1
201 ip netns exec "$ns3" sysctl -q net.ipv6.conf.all.forwarding=1
203 ip -net "$ns4" addr add 10.0.3.1/24 dev ns4eth3
204 ip -net "$ns4" addr add dead:beef:3::1/64 dev ns4eth3 nodad
205 ip -net "$ns4" link set ns4eth3 up
206 ip -net "$ns4" route add default via 10.0.3.2
207 ip -net "$ns4" route add default via dead:beef:3::2
211 ip netns exec $i sysctl -q net.mptcp.checksum_enabled=1
220 if ip netns exec $ns ethtool -K $dev $flags 2>/dev/null; then
221 mptcp_lib_pr_info "set $ns dev $dev: ethtool -K $flags"
233 [ $pick1 -ne 0 ] && flags="tso off"
234 [ $pick2 -ne 0 ] && flags="$flags gso off"
235 [ $pick3 -ne 0 ] && flags="$flags gro off"
237 [ -z "$flags" ] && return
252 MPTCP_LIB_TEST_FORMAT="%02u %-69s" \
272 if [ "$(ip netns exec ${disabled_ns} sysctl net.mptcp.enabled | awk '{ print $3 }')" -ne 1 ]; then
278 ip netns exec ${disabled_ns} sysctl -q net.mptcp.enabled=0
281 LC_ALL=C ip netns exec ${disabled_ns} ./mptcp_connect -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \
282 grep -q "^socket: Protocol not available$" && err=1
285 if [ ${err} -eq 0 ]; then
302 local ping_args="-q -c 1"
307 ping_args="${ping_args} -6"
312 if [ $rc -ne 0 ] ; then
313 mptcp_lib_pr_fail "$listener_ns -> $connect_addr connectivity"
334 if [ "$rcvbuf" -gt 0 ]; then
335 extra_args+=" -R $rcvbuf"
338 if [ "$sndbuf" -gt 0 ]; then
339 extra_args+=" -S $sndbuf"
342 if [ -n "$testmode" ]; then
343 extra_args+=" -m $testmode"
346 if [ -n "$extra_args" ] && $options_log; then
358 …pretty_title="$(printf "%.3s %-5s -> %.3s (%-20s) %-5s" ${connector_ns} ${cl_proto} ${listener_ns}…
361 local tap_title="${connector_ns:0:3} ${cl_proto} -> ${listener_ns:0:3} (${addr_port}) ${srv_proto}"
366 if [ -z $SUDO_USER ] ; then
369 capuser="-Z $SUDO_USER"
372 …local capfile="${rndh}-${connector_ns:0:3}-${listener_ns:0:3}-${cl_proto}-${srv_proto}-${connect_a…
373 local capopt="-i any -s 65535 -B 32768 ${capuser}"
375 …ip netns exec ${listener_ns} tcpdump ${capopt} -w "${capfile}-listener.pcap" >> "${capout}" 2>&1…
378 …ip netns exec ${connector_ns} tcpdump ${capopt} -w "${capfile}-connector.pcap" >> "${capout}" 2>&1…
385 nstat -n
388 nstat -n
408 ./mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
418 ./mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
444 duration=$((stop-start))
446 if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
448 echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2
449 ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port"
451 echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2
452 ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port"
491 if [ ${stat_synrx_now_l} -lt ${expect_synrx} ]; then
492 mptcp_lib_pr_fail "lower MPC SYN rx (${stat_synrx_now_l})" \
496 if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ] && [ ${stat_ooo_now} -eq 0 ]; then
497 if [ ${stat_ooo_now} -eq 0 ]; then
498 mptcp_lib_pr_fail "lower MPC ACK rx (${stat_ackrx_now_l})" \
512 local csum_err_s_nr=$((csum_err_s - stat_csum_err_s))
513 if [ $csum_err_s_nr -gt 0 ]; then
518 local csum_err_c_nr=$((csum_err_c - stat_csum_err_c))
519 if [ $csum_err_c_nr -gt 0 ]; then
525 if [ ${stat_ooo_now} -eq 0 ] && [ ${stat_tcpfb_last_l} -ne ${stat_tcpfb_now_l} ]; then
530 if [ $cookies -eq 2 ];then
531 if [ $stat_cookietx_last -ge $stat_cookietx_now ] ;then
534 if [ $stat_cookierx_last -ge $stat_cookierx_now ] ;then
538 if [ $stat_cookietx_last -ne $stat_cookietx_now ] ;then
541 if [ $stat_cookierx_last -ne $stat_cookierx_now ] ;then
546 if [ ${stat_synrx_now_l} -gt ${expect_synrx} ]; then
550 if [ ${stat_ackrx_now_l} -gt ${expect_ackrx} ]; then
555 if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then
559 if [ -n "${extra}" ]; then
566 [ $retc -eq 0 ] && [ $rets -eq 0 ]
577 if [ $SIZE -eq 0 ]; then
585 rem=$((SIZE - (ksize * 1024)))
590 echo "Created $name (size $(du -b "$name")) containing data sent by $who"
603 if [ $loopback -eq 0 ] && [ ${listener_ns} = ${connector_ns} ]; then
622 if [ $lret -ne 0 ]; then
627 if [ $do_tcp -eq 0 ]; then
637 if [ $lret -ne 0 ]; then
645 if [ $lret -ne 0 ]; then
650 if [ $do_tcp -gt 1 ] ;then
654 if [ $lret -ne 0 ]; then
695 if ! ip netns exec "$listener_ns" nft -f /dev/stdin <<"EOF"
699 type filter hook prerouting priority -150;
716 r6flag="-6"
721 if ! ip -net "$listener_ns" $r6flag rule add fwmark 1 lookup 100; then
729 if ! ip -net "$listener_ns" route add local $local_addr/0 dev lo table 100; then
731 ip -net "$listener_ns" $r6flag rule del fwmark 1 lookup 100
740 port=$((20000 - 1))
741 local extra_args="-o TRANSPARENT"
747 ip -net "$listener_ns" $r6flag rule del fwmark 1 lookup 100
748 ip -net "$listener_ns" route del local $local_addr/0 dev lo table 100
750 if [ $lret -ne 0 ]; then
766 run_tests_lo "$ns1" "$ns1" 10.0.1.1 1 "-P ${peekmode}"
767 run_tests_lo "$ns1" "$ns1" dead:beef:1::1 1 "-P ${peekmode}"
781 ip netns exec "$ns1" sysctl -q net.ipv4.tcp_fastopen=2
782 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_fastopen=1
784 run_tests_lo "$ns1" "$ns2" 10.0.1.1 0 "-o MPTFO"
785 run_tests_lo "$ns1" "$ns2" 10.0.1.1 0 "-o MPTFO"
787 run_tests_lo "$ns1" "$ns2" dead:beef:1::1 0 "-o MPTFO"
788 run_tests_lo "$ns1" "$ns2" dead:beef:1::1 0 "-o MPTFO"
790 ip netns exec "$ns1" sysctl -q net.ipv4.tcp_fastopen=0
791 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_fastopen=0
817 run_tests_lo "$ns1" "$ns1" 10.0.1.1 1 "-I 3 -i $old_cin"
818 run_tests_lo "$ns1" "$ns1" dead:beef:1::1 1 "-I 3 -i $old_cin"
830 time_run=$((time_end-time_start))
839 if [ ${ret} -ne 0 ]; then
891 [ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss delay ${t…
893 test "$tc_delay" -gt 0 && tc_info+="delay $tc_delay ms "
897 if [ -z "${tc_reorder}" ]; then
899 reorder1=$((100 - reorder1))
902 if [ $reorder_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then
908 elif [ "$reorder_delay" -gt 0 ];then
916 tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${reorder_delay}ms $tc_reorder
928 # ns1<->ns2 is not subject to reordering/tc delays. Use it to test
931 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
933 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=1