[PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'

Gang Yan posted 1 patch 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20251106075457.41025-1-gang.yan@linux.dev
tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 +++++++
1 file changed, 7 insertions(+)
[PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'
Posted by Gang Yan 3 weeks ago
From: Gang Yan <yangang@kylinos.cn>

The previous 'delete re-add signal' test did not validate the
'add_addr_signal' and 'add_addr_accepted' counters. These counters
are crucial for ensuring the MPTCP path manager correctly handles the
subflow creation via 'ADD_ADDR'.

Signed-off-by: Gang Yan <yangang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 4faf58fecc94..cca97a8ad0d6 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -4203,38 +4203,45 @@ endpoint_tests()
 			$ns1 10.0.2.1 id 1 flags signal
 		chk_subflow_nr "before delete" 2
 		chk_mptcp_info subflows 1 subflows 1
+		chk_mptcp_info add_addr_signal 2 add_addr_accepted 1
 
 		pm_nl_del_endpoint $ns1 1 10.0.2.1
 		pm_nl_del_endpoint $ns1 2 224.0.0.1
 		sleep 0.5
 		chk_subflow_nr "after delete" 1
 		chk_mptcp_info subflows 0 subflows 0
+		chk_mptcp_info add_addr_signal 0 add_addr_accepted 0
 
 		pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
 		pm_nl_add_endpoint $ns1 10.0.3.1 id 2 flags signal
 		wait_mpj $ns2
 		chk_subflow_nr "after re-add" 3
 		chk_mptcp_info subflows 2 subflows 2
+		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
 
 		pm_nl_del_endpoint $ns1 42 10.0.1.1
 		sleep 0.5
 		chk_subflow_nr "after delete ID 0" 2
 		chk_mptcp_info subflows 2 subflows 2
+		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
 
 		pm_nl_add_endpoint $ns1 10.0.1.1 id 99 flags signal
 		wait_mpj $ns2
 		chk_subflow_nr "after re-add ID 0" 3
 		chk_mptcp_info subflows 3 subflows 3
+		chk_mptcp_info add_addr_signal 3 add_addr_accepted 2
 
 		pm_nl_del_endpoint $ns1 99 10.0.1.1
 		sleep 0.5
 		chk_subflow_nr "after re-delete ID 0" 2
 		chk_mptcp_info subflows 2 subflows 2
+		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
 
 		pm_nl_add_endpoint $ns1 10.0.1.1 id 88 flags signal
 		wait_mpj $ns2
 		chk_subflow_nr "after re-re-add ID 0" 3
 		chk_mptcp_info subflows 3 subflows 3
+		chk_mptcp_info add_addr_signal 3 add_addr_accepted 2
 		mptcp_lib_kill_wait $tests_pid
 
 		kill_events_pids
-- 
2.43.0
Re: [PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'
Posted by Matthieu Baerts 2 weeks, 2 days ago
Hi Gang, Geliang,

On 06/11/2025 08:54, Gang Yan wrote:
> From: Gang Yan <yangang@kylinos.cn>
> 
> The previous 'delete re-add signal' test did not validate the
> 'add_addr_signal' and 'add_addr_accepted' counters. These counters
> are crucial for ensuring the MPTCP path manager correctly handles the
> subflow creation via 'ADD_ADDR'.

Now in our tree:

New patches for t/upstream-net and t/upstream:
- 58e7695feb9b: selftests: mptcp: add a check for 'add_addr_accepted'
- Results: b0e64e85315f..0a46d88dd962 (export-net)
- Results: bb0c4d401f7c..3ba6375d918e (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/0b60ebf29888f051796d8dc8749bf405c89cc176/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/ef24db85cc1df050e9b6c0245267f15852f2d75e/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'
Posted by Matthieu Baerts 2 weeks, 2 days ago
Hi Gang,

On 06/11/2025 08:54, Gang Yan wrote:
> From: Gang Yan <yangang@kylinos.cn>
> 
> The previous 'delete re-add signal' test did not validate the
> 'add_addr_signal' and 'add_addr_accepted' counters. These counters
> are crucial for ensuring the MPTCP path manager correctly handles the
> subflow creation via 'ADD_ADDR'.

Thank you for the patch!

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

I'm going to apply it in 'net', just after your fix, because it is still
in the queue and can go alongside to 'net'.

I will just add something in the commit message to explain it is linked
to the previous patch.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'
Posted by Geliang Tang 3 weeks ago
Hi Gang,

Thanks for this follow-up patch.

On Thu, 2025-11-06 at 15:54 +0800, Gang Yan wrote:
> From: Gang Yan <yangang@kylinos.cn>
> 
> The previous 'delete re-add signal' test did not validate the
> 'add_addr_signal' and 'add_addr_accepted' counters. These counters
> are crucial for ensuring the MPTCP path manager correctly handles the
> subflow creation via 'ADD_ADDR'.
> 
> Signed-off-by: Gang Yan <yangang@kylinos.cn>

Looks good!

Reviewed-by: Geliang Tang <geliang@kernel.org>

Except that we typically do not use capital letters to start the
subject line. Let's have Matt update the subject when applying this
patch.

Thanks,
-Geliang

> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 4faf58fecc94..cca97a8ad0d6 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -4203,38 +4203,45 @@ endpoint_tests()
>  			$ns1 10.0.2.1 id 1 flags signal
>  		chk_subflow_nr "before delete" 2
>  		chk_mptcp_info subflows 1 subflows 1
> +		chk_mptcp_info add_addr_signal 2 add_addr_accepted 1
>  
>  		pm_nl_del_endpoint $ns1 1 10.0.2.1
>  		pm_nl_del_endpoint $ns1 2 224.0.0.1
>  		sleep 0.5
>  		chk_subflow_nr "after delete" 1
>  		chk_mptcp_info subflows 0 subflows 0
> +		chk_mptcp_info add_addr_signal 0 add_addr_accepted 0
>  
>  		pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
>  		pm_nl_add_endpoint $ns1 10.0.3.1 id 2 flags signal
>  		wait_mpj $ns2
>  		chk_subflow_nr "after re-add" 3
>  		chk_mptcp_info subflows 2 subflows 2
> +		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
>  
>  		pm_nl_del_endpoint $ns1 42 10.0.1.1
>  		sleep 0.5
>  		chk_subflow_nr "after delete ID 0" 2
>  		chk_mptcp_info subflows 2 subflows 2
> +		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
>  
>  		pm_nl_add_endpoint $ns1 10.0.1.1 id 99 flags signal
>  		wait_mpj $ns2
>  		chk_subflow_nr "after re-add ID 0" 3
>  		chk_mptcp_info subflows 3 subflows 3
> +		chk_mptcp_info add_addr_signal 3 add_addr_accepted 2
>  
>  		pm_nl_del_endpoint $ns1 99 10.0.1.1
>  		sleep 0.5
>  		chk_subflow_nr "after re-delete ID 0" 2
>  		chk_mptcp_info subflows 2 subflows 2
> +		chk_mptcp_info add_addr_signal 2 add_addr_accepted 2
>  
>  		pm_nl_add_endpoint $ns1 10.0.1.1 id 88 flags signal
>  		wait_mpj $ns2
>  		chk_subflow_nr "after re-re-add ID 0" 3
>  		chk_mptcp_info subflows 3 subflows 3
> +		chk_mptcp_info add_addr_signal 3 add_addr_accepted 2
>  		mptcp_lib_kill_wait $tests_pid
>  
>  		kill_events_pids

Re: [PATCH, mptcp-next] selftests: mptcp: Add a check for 'add_addr_accepted'
Posted by MPTCP CI 3 weeks ago
Hi Gang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_mptcp_connect_sendfile 🔴
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/19129123754

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/e9de5b91f0a3
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1020287


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)