]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: mptcp: join: cover ADD_ADDR tx drop and list progress
authorLi Xiasong <lixiasong1@huawei.com>
Fri, 15 May 2026 04:27:34 +0000 (06:27 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 May 2026 13:36:35 +0000 (15:36 +0200)
Extend add_addr_ports_tests with IPv6 signaling cases that exercise
ADD_ADDR tx-space shortage when tcp_timestamps are enabled.

Add one case to verify PM still progresses to later signal endpoints
after the first one is dropped.

This covers both failure accounting and the non-blocking behavior of
the announce list after a tx-space drop on pure ACK.

Signed-off-by: Li Xiasong <lixiasong1@huawei.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260515-net-mptcp-misc-fixes-7-1-rc4-v2-3-701e96419f2f@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/mptcp/mptcp_join.sh

index beec41f6662a279af0fc46a2b540f2db85b9224b..5acd12021e6e8b18c852d95fc7b5a07124896c63 100755 (executable)
@@ -1828,6 +1828,22 @@ chk_add_tx_nr()
        fi
 }
 
+chk_add_drop_tx_nr()
+{
+       local drop_tx_nr=$1
+       local count
+
+       print_check "add addr tx drop"
+       count=$(mptcp_lib_get_counter ${ns1} "MPTcpExtAddAddrTxDrop")
+       if [ -z "$count" ]; then
+               print_skip
+       elif [ "$count" != "$drop_tx_nr" ]; then
+               fail_test "got $count ADD_ADDR drop[s] TX, expected $drop_tx_nr"
+       else
+               print_ok
+       fi
+}
+
 chk_rm_nr()
 {
        local rm_addr_nr=$1
@@ -3278,6 +3294,21 @@ add_addr_ports_tests()
 
                chk_mpc_endp_attempt ${retl} 1
        fi
+
+       # first signal address drops, second one still progresses
+       if reset "signal addr list progresses after tx drop"; then
+               pm_nl_set_limits $ns1 0 2
+               pm_nl_set_limits $ns2 1 0
+               ip netns exec $ns1 sysctl -q net.ipv4.tcp_timestamps=1
+               ip netns exec $ns2 sysctl -q net.ipv4.tcp_timestamps=1
+
+               pm_nl_add_endpoint $ns1 dead:beef:2::1 flags signal port 10100
+               pm_nl_add_endpoint $ns1 dead:beef:3::1 flags signal
+               run_tests $ns1 $ns2 dead:beef:1::1
+               chk_add_drop_tx_nr 1
+               chk_add_tx_nr 1 1
+               chk_add_nr 1 1 0
+       fi
 }
 
 bind_tests()