tools/testing/selftests/net/mptcp/config | 5 +- .../selftests/net/mptcp/mptcp_connect.sh | 48 +++- .../testing/selftests/net/mptcp/mptcp_join.sh | 111 ++++++-- .../testing/selftests/net/mptcp/mptcp_lib.sh | 23 ++ .../selftests/net/mptcp/mptcp_sockopt.sh | 94 +++++-- .../selftests/net/mptcp/simult_flows.sh | 28 +- .../selftests/net/mptcp/userspace_pm.sh | 257 ++++++++++-------- 7 files changed, 391 insertions(+), 175 deletions(-)
From: Gang Yan <yangang@kylinos.cn>
This series is for make the selftest useful in the kernel which IPV6 is
compiled as a module.
With this series applied, the output with CONFIG_IPV6=m will be like:
mptcp_connect.sh:
'''
Selftest Test: ./mptcp_connect.sh
TAP version 13
1..1
# [SKIP] MPTCP IPv6 support is not available
# INFO: MPTCP IPv6 not available, running IPv4-only tests
# INFO: set ns3-Ij7oet dev ns3eth2: ethtool -K gro off
# INFO: set ns4-MNMck3 dev ns4eth3: ethtool -K tso off gso off
# Created /tmp/tmp.MPGwnjy7S8 (size 7478906 B) containing data sent by client
# Created /tmp/tmp.xLzF6OOxGG (size 1934300 B) containing data sent by server
# 01 New MPTCP socket can be blocked via sysctl [ OK ]
...
# 31 ns2 MPTCP -> ns1 (10.0.1.1:10028 ) MPTCP (duration 141ms) [ OK ]
# INFO: with MPTFO end
# /dev/stdin:2:1-2: Error: Could not process rule: Operation not supported
# table inet mangle {
# ^^
# /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
# table inet mangle {
# ^^^^^^
# /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
# table inet mangle {
# ^^^^^^
# /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
# table inet mangle {
# ^^^^^^
# [SKIP] tproxy ipv4, could not load nft ruleset
# INFO: nft inet table needs CONFIG_IPV6=y
# INFO: disconnect
# 32 ns1 MPTCP -> ns1 (10.0.1.1:10029 ) MPTCP (duration 276ms) [ OK ]
# 33 ns1 MPTCP -> ns1 (10.0.1.1:10030 ) TCP (duration 232ms) [ OK ]
# 34 ns1 TCP -> ns1 (10.0.1.1:10031 ) MPTCP (duration 223ms) [ OK ]
# Time: 55 seconds
ok 1 test: selftest_mptcp_connect
'''
mptcp_sockopt.sh:
'''
Selftest Test: ./mptcp_sockopt.sh
TAP version 13
1..1
# [SKIP] MPTCP IPv6 support is not available
# Created /tmp/tmp.xrhCxOCqCb (size 1 KB) containing data sent by client
# Created /tmp/tmp.u2QBzkEsfF (size 1 KB) containing data sent by server
# 01 Transfer v4 [ OK ]
# 02 Mark v4 [ OK ]
# 03 Transfer v6 [SKIP] MPTCP IPv6 not available
# 04 Mark v6 [SKIP] MPTCP IPv6 not available
# 05 SOL_MPTCP sockopt v4 [ OK ]
# 06 SOL_MPTCP sockopt v6 [SKIP] MPTCP IPv6 not available
# 07 TCP_INQ cmsg/ioctl -t tcp [ OK ]
# 08 TCP_INQ cmsg/ioctl -6 -t tcp [SKIP] MPTCP IPv6 not available
# 09 TCP_INQ cmsg/ioctl -r tcp [ OK ]
# 10 TCP_INQ cmsg/ioctl -6 -r tcp [SKIP] MPTCP IPv6 not available
# 11 TCP_INQ cmsg/ioctl -r tcp -t tcp [ OK ]
ok 1 test: selftest_mptcp_sockopt
# time=17
'''
simult_subflow.sh:
'''
Selftest Test: ./simult_flows.sh
TAP version 13
1..1
# [SKIP] MPTCP IPv6 support is not available
# 01 balanced bwidth 7383 max 7906 [ OK ]
# 02 balanced bwidth - reverse direction 7380 max 7906 [ OK ]
# 03 balanced bwidth with unbalanced delay 7493 max 7906 [ OK ]
# 04 balanced bwidth with unbalanced delay - reverse direction 7442 max 7906 [ OK ]
# 05 unbalanced bwidth 11426 max 11921 [ OK ]
# 06 unbalanced bwidth - reverse direction 11391 max 11921 [ OK ]
# 07 unbalanced bwidth with unbalanced delay 11424 max 11921 [ OK ]
# 08 unbalanced bwidth with unbalanced delay - reverse direction 11573 max 11921 [ OK ]
# 09 unbalanced bwidth with opposed, unbalanced delay 11584 max 11921 [ OK ]
# 10 unbalanced bwidth with opposed, unbalanced delay - reverse direction11559 max 11921 [ OK ]
ok 1 test: selftest_simult_flows
# time=105
'''
./mptcp_join.sh:
'''
Selftest Test: ./mptcp_join.sh
TAP version 13
1..1
# [SKIP] MPTCP IPv6 support is not available
# 001 no JOIN
# join Rx [ OK ]
# join Tx [ OK ]
...
# 022 with multiple laminar endpoints
# MPTCP IPv6 support is not available [SKIP]
...
'''
userspace_pm.sh:
'''
Selftest Test: ./userspace_pm.sh
TAP version 13
1..1
# [SKIP] MPTCP IPv6 support is not available
# INFO: Init
# 01 Created network namespaces ns1, ns2 [ OK ]
# INFO: Make connections
# INFO: Connection info: 10.0.1.2:47434 -> 10.0.1.1:50002
# 03 Established IPv6 MPTCP Connection ns2 => ns1 [SKIP]
# INFO: Will be using address IDs 27 (client) and 31 (server)
# INFO: Announce tests
...
# 32 CREATE_LISTENER 10.0.2.2 (client port) [ OK ]
# 33 CLOSE_LISTENER 10.0.2.2 (client port) [ OK ]
# INFO: Cleanup
# INFO: Done
ok 1 test: selftest_userspace_pm
# time=23
'''
---
Changelog:
v2:
- Patch2 uses " mptcpv6_init(\.|$)" to replace " mptcpv6_init$", and
trims some code comments and commit message.
- Patch5 refactors IPv6 guards in mptcp_sockopt.sh, unifies skip logic,
removes redundant wrappers and duplicated title prints, and adds an
early v6 check for TCP_INQ tests.
- Patch6 removes 2 lines of redundant inline comment.
- Patch8 adds 'skip_if' helper, and rewrites all 29 IPv6 subtest guards
in mptcp_join.sh to fix TAP log misordering and updates its commit
message with accurate test group info.
- Patch9 adds missing skip branches for seven IPv6 code paths in
userspace_pm.sh to generate proper TAP skip entries.
v1:
Link: https://patchwork.kernel.org/project/mptcp/cover/cover.1781196828.git.yangang@kylinos.cn/
Gang Yan (9):
DO-NOT-MERGE: mptcp: test IPV6=m in docker-virtme
selftests: mptcp: mptcp_lib add runtime IPv6 availability detection
helper
selftests: mptcp: mptcp_connect.sh degrades to v4-only when MPTCP IPv6
is missing
selftests: mptcp: mptcp_connect.sh don't fail because of nft rules in
IPV6-less kernel
selftests: mptcp: mptcp_sockopt.sh skips v6 paths when MPTCP IPv6 is
missing
selftests: mptcp: simult_flows.sh skips v6 setup when MPTCP IPv6 is
missing
selftests: mptcp: mptcp_join.sh: pick v4 bind default when MPTCP IPv6
is missing
selftests: mptcp: mptcp_join.sh skips v6 subtests when MPTCP IPv6 is
missing
selftests: mptcp: userspace_pm.sh skips v6 paths when MPTCP IPv6 is
missing
tools/testing/selftests/net/mptcp/config | 5 +-
.../selftests/net/mptcp/mptcp_connect.sh | 48 +++-
.../testing/selftests/net/mptcp/mptcp_join.sh | 111 ++++++--
.../testing/selftests/net/mptcp/mptcp_lib.sh | 23 ++
.../selftests/net/mptcp/mptcp_sockopt.sh | 94 +++++--
.../selftests/net/mptcp/simult_flows.sh | 28 +-
.../selftests/net/mptcp/userspace_pm.sh | 257 ++++++++++--------
7 files changed, 391 insertions(+), 175 deletions(-)
--
2.43.0
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): Unstable: 11 failed test(s): packetdrill_add_addr packetdrill_dss packetdrill_fastclose packetdrill_fastopen packetdrill_mp_capable packetdrill_mp_join packetdrill_mp_prio packetdrill_mp_reset packetdrill_regressions packetdrill_sockopts packetdrill_syscalls ⚠️
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- 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/27699327347
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ae964d2c6e8f
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1112987
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)
June 17, 2026 at 10:46 PM, "Gang Yan" <gang.yan@linux.dev mailto:gang.yan@linux.dev?to=%22Gang%20Yan%22%20%3Cgang.yan%40linux.dev%3E > wrote:
Hi Matt,
As we discussed during yesterday's Weekly Meeting, I’ve quickly gone
through this patch series thread[1].
This patch converts CONFIG_IPV6 from a tristate option to a bool. From the
discussion in the thread v1, ARM-based devices like mobile phones can still
set CONFIG_IPV6=n. In such cases, our CONFIG_MPTCP_IPV6 will also be disabled,
which results in kselftest failures even when CONFIG_MPTCP=y.
Given that, I believe it’s still valuable to mark and skip all IPv6-dependent
test cases within our self-test suite.
WDYT?
[1] https://lore.kernel.org/all/20260325120928.15848-2-fmancera@suse.de/
Thanks,
Gang
>
> From: Gang Yan <yangang@kylinos.cn>
>
> This series is for make the selftest useful in the kernel which IPV6 is
> compiled as a module.
>
> With this series applied, the output with CONFIG_IPV6=m will be like:
>
> mptcp_connect.sh:
> '''
> Selftest Test: ./mptcp_connect.sh
> TAP version 13
> 1..1
> # [SKIP] MPTCP IPv6 support is not available
> # INFO: MPTCP IPv6 not available, running IPv4-only tests
> # INFO: set ns3-Ij7oet dev ns3eth2: ethtool -K gro off
> # INFO: set ns4-MNMck3 dev ns4eth3: ethtool -K tso off gso off
> # Created /tmp/tmp.MPGwnjy7S8 (size 7478906 B) containing data sent by client
> # Created /tmp/tmp.xLzF6OOxGG (size 1934300 B) containing data sent by server
> # 01 New MPTCP socket can be blocked via sysctl [ OK ]
> ...
> # 31 ns2 MPTCP -> ns1 (10.0.1.1:10028 ) MPTCP (duration 141ms) [ OK ]
> # INFO: with MPTFO end
> # /dev/stdin:2:1-2: Error: Could not process rule: Operation not supported
> # table inet mangle {
> # ^^
> # /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
> # table inet mangle {
> # ^^^^^^
> # /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
> # table inet mangle {
> # ^^^^^^
> # /dev/stdin:2:12-17: Error: Could not process rule: No such file or directory
> # table inet mangle {
> # ^^^^^^
> # [SKIP] tproxy ipv4, could not load nft ruleset
> # INFO: nft inet table needs CONFIG_IPV6=y
> # INFO: disconnect
> # 32 ns1 MPTCP -> ns1 (10.0.1.1:10029 ) MPTCP (duration 276ms) [ OK ]
> # 33 ns1 MPTCP -> ns1 (10.0.1.1:10030 ) TCP (duration 232ms) [ OK ]
> # 34 ns1 TCP -> ns1 (10.0.1.1:10031 ) MPTCP (duration 223ms) [ OK ]
> # Time: 55 seconds
> ok 1 test: selftest_mptcp_connect
> '''
>
> mptcp_sockopt.sh:
> '''
> Selftest Test: ./mptcp_sockopt.sh
> TAP version 13
> 1..1
> # [SKIP] MPTCP IPv6 support is not available
> # Created /tmp/tmp.xrhCxOCqCb (size 1 KB) containing data sent by client
> # Created /tmp/tmp.u2QBzkEsfF (size 1 KB) containing data sent by server
> # 01 Transfer v4 [ OK ]
> # 02 Mark v4 [ OK ]
> # 03 Transfer v6 [SKIP] MPTCP IPv6 not available
> # 04 Mark v6 [SKIP] MPTCP IPv6 not available
> # 05 SOL_MPTCP sockopt v4 [ OK ]
> # 06 SOL_MPTCP sockopt v6 [SKIP] MPTCP IPv6 not available
> # 07 TCP_INQ cmsg/ioctl -t tcp [ OK ]
> # 08 TCP_INQ cmsg/ioctl -6 -t tcp [SKIP] MPTCP IPv6 not available
> # 09 TCP_INQ cmsg/ioctl -r tcp [ OK ]
> # 10 TCP_INQ cmsg/ioctl -6 -r tcp [SKIP] MPTCP IPv6 not available
> # 11 TCP_INQ cmsg/ioctl -r tcp -t tcp [ OK ]
> ok 1 test: selftest_mptcp_sockopt
> # time=17
> '''
>
> simult_subflow.sh:
> '''
> Selftest Test: ./simult_flows.sh
> TAP version 13
> 1..1
> # [SKIP] MPTCP IPv6 support is not available
> # 01 balanced bwidth 7383 max 7906 [ OK ]
> # 02 balanced bwidth - reverse direction 7380 max 7906 [ OK ]
> # 03 balanced bwidth with unbalanced delay 7493 max 7906 [ OK ]
> # 04 balanced bwidth with unbalanced delay - reverse direction 7442 max 7906 [ OK ]
> # 05 unbalanced bwidth 11426 max 11921 [ OK ]
> # 06 unbalanced bwidth - reverse direction 11391 max 11921 [ OK ]
> # 07 unbalanced bwidth with unbalanced delay 11424 max 11921 [ OK ]
> # 08 unbalanced bwidth with unbalanced delay - reverse direction 11573 max 11921 [ OK ]
> # 09 unbalanced bwidth with opposed, unbalanced delay 11584 max 11921 [ OK ]
> # 10 unbalanced bwidth with opposed, unbalanced delay - reverse direction11559 max 11921 [ OK ]
> ok 1 test: selftest_simult_flows
> # time=105
> '''
>
> ./mptcp_join.sh:
> '''
> Selftest Test: ./mptcp_join.sh
> TAP version 13
> 1..1
> # [SKIP] MPTCP IPv6 support is not available
> # 001 no JOIN
> # join Rx [ OK ]
> # join Tx [ OK ]
> ...
> # 022 with multiple laminar endpoints
> # MPTCP IPv6 support is not available [SKIP]
> ...
> '''
>
> userspace_pm.sh:
> '''
> Selftest Test: ./userspace_pm.sh
> TAP version 13
> 1..1
> # [SKIP] MPTCP IPv6 support is not available
> # INFO: Init
> # 01 Created network namespaces ns1, ns2 [ OK ]
> # INFO: Make connections
> # INFO: Connection info: 10.0.1.2:47434 -> 10.0.1.1:50002
> # 03 Established IPv6 MPTCP Connection ns2 => ns1 [SKIP]
> # INFO: Will be using address IDs 27 (client) and 31 (server)
> # INFO: Announce tests
> ...
> # 32 CREATE_LISTENER 10.0.2.2 (client port) [ OK ]
> # 33 CLOSE_LISTENER 10.0.2.2 (client port) [ OK ]
> # INFO: Cleanup
> # INFO: Done
> ok 1 test: selftest_userspace_pm
> # time=23
> '''
> ---
> Changelog:
> v2:
> - Patch2 uses " mptcpv6_init(\.|$)" to replace " mptcpv6_init$", and
> trims some code comments and commit message.
> - Patch5 refactors IPv6 guards in mptcp_sockopt.sh, unifies skip logic,
> removes redundant wrappers and duplicated title prints, and adds an
> early v6 check for TCP_INQ tests.
> - Patch6 removes 2 lines of redundant inline comment.
> - Patch8 adds 'skip_if' helper, and rewrites all 29 IPv6 subtest guards
> in mptcp_join.sh to fix TAP log misordering and updates its commit
> message with accurate test group info.
> - Patch9 adds missing skip branches for seven IPv6 code paths in
> userspace_pm.sh to generate proper TAP skip entries.
>
> v1:
> Link: https://patchwork.kernel.org/project/mptcp/cover/cover.1781196828.git.yangang@kylinos.cn/
>
> Gang Yan (9):
> DO-NOT-MERGE: mptcp: test IPV6=m in docker-virtme
> selftests: mptcp: mptcp_lib add runtime IPv6 availability detection
> helper
> selftests: mptcp: mptcp_connect.sh degrades to v4-only when MPTCP IPv6
> is missing
> selftests: mptcp: mptcp_connect.sh don't fail because of nft rules in
> IPV6-less kernel
> selftests: mptcp: mptcp_sockopt.sh skips v6 paths when MPTCP IPv6 is
> missing
> selftests: mptcp: simult_flows.sh skips v6 setup when MPTCP IPv6 is
> missing
> selftests: mptcp: mptcp_join.sh: pick v4 bind default when MPTCP IPv6
> is missing
> selftests: mptcp: mptcp_join.sh skips v6 subtests when MPTCP IPv6 is
> missing
> selftests: mptcp: userspace_pm.sh skips v6 paths when MPTCP IPv6 is
> missing
>
> tools/testing/selftests/net/mptcp/config | 5 +-
> .../selftests/net/mptcp/mptcp_connect.sh | 48 +++-
> .../testing/selftests/net/mptcp/mptcp_join.sh | 111 ++++++--
> .../testing/selftests/net/mptcp/mptcp_lib.sh | 23 ++
> .../selftests/net/mptcp/mptcp_sockopt.sh | 94 +++++--
> .../selftests/net/mptcp/simult_flows.sh | 28 +-
> .../selftests/net/mptcp/userspace_pm.sh | 257 ++++++++++--------
> 7 files changed, 391 insertions(+), 175 deletions(-)
>
> --
> 2.43.0
>
Hi Gang, On 18/06/2026 04:55, gang.yan@linux.dev wrote: > June 17, 2026 at 10:46 PM, "Gang Yan" <gang.yan@linux.dev mailto:gang.yan@linux.dev?to=%22Gang%20Yan%22%20%3Cgang.yan%40linux.dev%3E > wrote: > > > Hi Matt, > > As we discussed during yesterday's Weekly Meeting, I’ve quickly gone > through this patch series thread[1]. > > This patch converts CONFIG_IPV6 from a tristate option to a bool. From the > discussion in the thread v1, ARM-based devices like mobile phones can still > set CONFIG_IPV6=n. In such cases, our CONFIG_MPTCP_IPV6 will also be disabled, > which results in kselftest failures even when CONFIG_MPTCP=y. I don't think that will be the case :) The trend is more to have IPv6 only, than v4 only. > Given that, I believe it’s still valuable to mark and skip all IPv6-dependent > test cases within our self-test suite. I don't know. I did a quick review, and maybe the code could be reduced, but still I don't think such modification would be accepted, and it would probably be easier not to introduce all these extra checks in the selftests, and maintain that with new tests that will be added later on. I do think the best is to talk to people still using CONFIG_IPV6=m. The thread you mentioned explains why it is likely a bad idea. In short: the IPv6 module will certainly be loaded very early in the boot process simply to have IPv6 on the localhost interface. The IPv6 module is just an overhead, and more prone to (security) bugs. Could you then please first check if CONFIG_IPV6 could be set to =y on your side, because that will be the new value anyway when switching to a more recent kernel version? Cheers, Matt -- Sponsored by the NGI0 Core fund.
© 2016 - 2026 Red Hat, Inc.