Lines Matching +full:default +full:- +full:blocked
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"
141 rm -f "$cin" "$cout"
142 rm -f "$sin" "$sout"
143 rm -f "$capout"
164 # - drop 1% -> reorder 25%
165 # <- TSO off -
171 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
172 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
174 ip -net "$ns1" link set ns1eth2 up
175 ip -net "$ns1" route add default via 10.0.1.2
176 ip -net "$ns1" route add default via dead:beef:1::2
178 ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
179 ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
180 ip -net "$ns2" link set ns2eth1 up
182 ip -net "$ns2" addr add 10.0.2.1/24 dev ns2eth3
183 ip -net "$ns2" addr add dead:beef:2::1/64 dev ns2eth3 nodad
184 ip -net "$ns2" link set ns2eth3 up
185 ip -net "$ns2" route add default via 10.0.2.2
186 ip -net "$ns2" route add default via dead:beef:2::2
187 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1
188 ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1
190 ip -net "$ns3" addr add 10.0.2.2/24 dev ns3eth2
191 ip -net "$ns3" addr add dead:beef:2::2/64 dev ns3eth2 nodad
192 ip -net "$ns3" link set ns3eth2 up
194 ip -net "$ns3" addr add 10.0.3.2/24 dev ns3eth4
195 ip -net "$ns3" addr add dead:beef:3::2/64 dev ns3eth4 nodad
196 ip -net "$ns3" link set ns3eth4 up
197 ip -net "$ns3" route add default via 10.0.2.1
198 ip -net "$ns3" route add default via dead:beef:2::1
199 ip netns exec "$ns3" sysctl -q net.ipv4.ip_forward=1
200 ip netns exec "$ns3" sysctl -q net.ipv6.conf.all.forwarding=1
202 ip -net "$ns4" addr add 10.0.3.1/24 dev ns4eth3
203 ip -net "$ns4" addr add dead:beef:3::1/64 dev ns4eth3 nodad
204 ip -net "$ns4" link set ns4eth3 up
205 ip -net "$ns4" route add default via 10.0.3.2
206 ip -net "$ns4" route add default via dead:beef:3::2
210 ip netns exec $i sysctl -q net.mptcp.checksum_enabled=1
219 if ip netns exec $ns ethtool -K $dev $flags 2>/dev/null; then
220 mptcp_lib_pr_info "set $ns dev $dev: ethtool -K $flags"
232 [ $pick1 -ne 0 ] && flags="tso off"
233 [ $pick2 -ne 0 ] && flags="$flags gso off"
234 [ $pick3 -ne 0 ] && flags="$flags gro off"
236 [ -z "$flags" ] && return
251 MPTCP_LIB_TEST_FORMAT="%02u %-69s" \
260 print_larger_title "New MPTCP socket can be blocked via sysctl"
270 # net.mptcp.enabled should be enabled by default
271 if [ "$(ip netns exec ${disabled_ns} sysctl net.mptcp.enabled | awk '{ print $3 }')" -ne 1 ]; then
272 mptcp_lib_pr_fail "net.mptcp.enabled sysctl is not 1 by default"
273 mptcp_lib_result_fail "net.mptcp.enabled sysctl is not 1 by default"
277 ip netns exec ${disabled_ns} sysctl -q net.mptcp.enabled=0
280 LC_ALL=C ip netns exec ${disabled_ns} ./mptcp_connect -p 10000 -s MPTCP 127.0.0.1 < "$cin" 2>&1 | \
281 grep -q "^socket: Protocol not available$" && err=1
284 if [ ${err} -eq 0 ]; then
285 mptcp_lib_pr_fail "New MPTCP socket cannot be blocked via sysctl"
286 mptcp_lib_result_fail "New MPTCP socket cannot be blocked via sysctl"
292 mptcp_lib_result_pass "New MPTCP socket can be blocked via sysctl"
301 local ping_args="-q -c 1"
306 ping_args="${ping_args} -6"
311 if [ $rc -ne 0 ] ; then
312 mptcp_lib_pr_fail "$listener_ns -> $connect_addr connectivity"
333 if [ "$rcvbuf" -gt 0 ]; then
334 extra_args+=" -R $rcvbuf"
337 if [ "$sndbuf" -gt 0 ]; then
338 extra_args+=" -S $sndbuf"
341 if [ -n "$testmode" ]; then
342 extra_args+=" -m $testmode"
345 if [ -n "$extra_args" ] && $options_log; then
357 …pretty_title="$(printf "%.3s %-5s -> %.3s (%-20s) %-5s" ${connector_ns} ${cl_proto} ${listener_ns}…
360 local tap_title="${connector_ns:0:3} ${cl_proto} -> ${listener_ns:0:3} (${addr_port}) ${srv_proto}"
365 if [ -z $SUDO_USER ] ; then
368 capuser="-Z $SUDO_USER"
371 …local capfile="${rndh}-${connector_ns:0:3}-${listener_ns:0:3}-${cl_proto}-${srv_proto}-${connect_a…
372 local capopt="-i any -s 65535 -B 32768 ${capuser}"
374 …ip netns exec ${listener_ns} tcpdump ${capopt} -w "${capfile}-listener.pcap" >> "${capout}" 2>&1…
377 …ip netns exec ${connector_ns} tcpdump ${capopt} -w "${capfile}-connector.pcap" >> "${capout}" 2>&1…
384 nstat -n
387 nstat -n
407 ./mptcp_connect -t ${timeout_poll} -l -p $port -s ${srv_proto} \
417 ./mptcp_connect -t ${timeout_poll} -p $port -s ${cl_proto} \
443 duration=$((stop-start))
445 if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
486 if [ ${stat_synrx_now_l} -lt ${expect_synrx} ]; then
491 if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ] && [ ${stat_ooo_now} -eq 0 ]; then
492 if [ ${stat_ooo_now} -eq 0 ]; then
507 local csum_err_s_nr=$((csum_err_s - stat_csum_err_s))
508 if [ $csum_err_s_nr -gt 0 ]; then
513 local csum_err_c_nr=$((csum_err_c - stat_csum_err_c))
514 if [ $csum_err_c_nr -gt 0 ]; then
520 if [ ${stat_ooo_now} -eq 0 ] && [ ${stat_tcpfb_last_l} -ne ${stat_tcpfb_now_l} ]; then
525 if [ $cookies -eq 2 ];then
526 if [ $stat_cookietx_last -ge $stat_cookietx_now ] ;then
529 if [ $stat_cookierx_last -ge $stat_cookierx_now ] ;then
533 if [ $stat_cookietx_last -ne $stat_cookietx_now ] ;then
536 if [ $stat_cookierx_last -ne $stat_cookierx_now ] ;then
541 if [ ${stat_synrx_now_l} -gt ${expect_synrx} ]; then
545 if [ ${stat_ackrx_now_l} -gt ${expect_ackrx} ]; then
550 if [ $retc -eq 0 ] && [ $rets -eq 0 ]; then
554 if [ -n "${extra}" ]; then
561 [ $retc -eq 0 ] && [ $rets -eq 0 ]
572 if [ $SIZE -eq 0 ]; then
580 rem=$((SIZE - (ksize * 1024)))
585 echo "Created $name (size $(stat -c "%s" "$name") B) containing data sent by $who"
598 if [ $loopback -eq 0 ] && [ ${listener_ns} = ${connector_ns} ]; then
617 if [ $lret -ne 0 ]; then
622 if [ $do_tcp -eq 0 ]; then
632 if [ $lret -ne 0 ]; then
640 if [ $lret -ne 0 ]; then
645 if [ $do_tcp -gt 1 ] ;then
649 if [ $lret -ne 0 ]; then
690 if ! ip netns exec "$listener_ns" nft -f /dev/stdin <<"EOF"
694 type filter hook prerouting priority -150;
711 r6flag="-6"
716 if ! ip -net "$listener_ns" $r6flag rule add fwmark 1 lookup 100; then
724 if ! ip -net "$listener_ns" route add local $local_addr/0 dev lo table 100; then
726 ip -net "$listener_ns" $r6flag rule del fwmark 1 lookup 100
735 port=$((20000 - 1))
736 local extra_args="-o TRANSPARENT"
742 ip -net "$listener_ns" $r6flag rule del fwmark 1 lookup 100
743 ip -net "$listener_ns" route del local $local_addr/0 dev lo table 100
745 if [ $lret -ne 0 ]; then
761 run_tests_lo "$ns1" "$ns1" 10.0.1.1 1 "-P ${peekmode}"
762 run_tests_lo "$ns1" "$ns1" dead:beef:1::1 1 "-P ${peekmode}"
776 ip netns exec "$ns1" sysctl -q net.ipv4.tcp_fastopen=2
777 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_fastopen=1
779 run_tests_lo "$ns1" "$ns2" 10.0.1.1 0 "-o MPTFO"
780 run_tests_lo "$ns1" "$ns2" 10.0.1.1 0 "-o MPTFO"
782 run_tests_lo "$ns1" "$ns2" dead:beef:1::1 0 "-o MPTFO"
783 run_tests_lo "$ns1" "$ns2" dead:beef:1::1 0 "-o MPTFO"
785 ip netns exec "$ns1" sysctl -q net.ipv4.tcp_fastopen=0
786 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_fastopen=0
812 run_tests_lo "$ns1" "$ns1" 10.0.1.1 1 "-I 3 -i $old_cin"
813 run_tests_lo "$ns1" "$ns1" dead:beef:1::1 1 "-I 3 -i $old_cin"
825 time_run=$((time_end-time_start))
834 if [ ${ret} -ne 0 ]; then
886 [ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss delay ${t…
888 test "$tc_delay" -gt 0 && tc_info+="delay $tc_delay ms "
892 if [ -z "${tc_reorder}" ]; then
894 reorder1=$((100 - reorder1))
897 if [ $reorder_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then
903 elif [ "$reorder_delay" -gt 0 ];then
911 tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${reorder_delay}ms $tc_reorder
923 # ns1<->ns2 is not subject to reordering/tc delays. Use it to test
926 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=2
928 ip netns exec "$ns2" sysctl -q net.ipv4.tcp_syncookies=1