Skip to contentSkip to conversation

selftests: mptcp: Add a check for 'add_addr_accepted'

PATCH In review Gang Yan 4 participants 5 messages Nov 6, 2025 – Nov 11, 2025

Subsystems (3)
lore
Share & tools
lore

Gang Yan

author
#0 lore raw

PATCH 1/1 selftests: mptcp: Add a check for 'add_addr_accepted'

From: Gang Yan <[email protected]>

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'.

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 +++++++
 1 file changed, 7 insertions(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +7 -0
index 4faf58fecc94..cca97a8ad0d6 100755
@@ -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
Signature · 1 line
2.43.0
#1 lore raw

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)

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Gang Yan

Hi Gang,

Thanks for this follow-up patch.

Quoted 8 lines · Gang Yan

From: Gang Yan <[email protected]>

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'.

Looks good!

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

Quoted 55 lines

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 7 +++++++

 1 file changed, 7 insertions(+)
tools/testing/selftests/net/mptcp/mptcp_join.sh +0 -0
index 4faf58fecc94..cca97a8ad0d6 100755
@@ -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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		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

tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -0
+		chk_mptcp_info add_addr_signal 3 add_addr_accepted 2

  mptcp_lib_kill_wait $tests_pid

  kill_events_pids

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Gang Yan

Hi Gang,

Quoted 6 lines · Gang Yan

From: Gang Yan <[email protected]>

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!

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

Signature · 1 line
Sponsored by the NGI0 Core fund.
maintainer
#4 lore raw
In reply to Gang Yan

Hi Gang, Geliang,

Quoted 6 lines · Gang Yan

From: Gang Yan <[email protected]>

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

Signature · 1 line
Sponsored by the NGI0 Core fund.