[PATCH mptcp-next] Squash to "mptcp: allow overridden write_space to be invoked"

Geliang Tang posted 1 patch 4 days, 6 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/f044ee2401fe23dbb0d917765ca07c1d8f601758.1770277185.git.tanggeliang@kylinos.cn
net/mptcp/protocol.c | 1 +
1 file changed, 1 insertion(+)
[PATCH mptcp-next] Squash to "mptcp: allow overridden write_space to be invoked"
Posted by Geliang Tang 4 days, 6 hours ago
From: Geliang Tang <tanggeliang@kylinos.cn>

The default value of sk->sk_write_space is sock_def_write_space,
which causes the original patch to change the behavior. For MPTCP
sockets, sk->sk_write_space should be set to sk_stream_write_space
here.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index c88882062c40..f58df4651b12 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3065,6 +3065,7 @@ static int mptcp_init_sock(struct sock *sk)
 	sk_sockets_allocated_inc(sk);
 	sk->sk_rcvbuf = READ_ONCE(net->ipv4.sysctl_tcp_rmem[1]);
 	sk->sk_sndbuf = READ_ONCE(net->ipv4.sysctl_tcp_wmem[1]);
+	sk->sk_write_space = sk_stream_write_space;
 
 	return 0;
 }
-- 
2.52.0
Re: [PATCH mptcp-next] Squash to "mptcp: allow overridden write_space to be invoked"
Posted by Matthieu Baerts 3 days, 19 hours ago
Hi Geliang,

On 05/02/2026 08:39, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> The default value of sk->sk_write_space is sock_def_write_space,
> which causes the original patch to change the behavior. For MPTCP
> sockets, sk->sk_write_space should be set to sk_stream_write_space
> here.

Thanks for the fix. I also updated the commit message of the exported
commit. Can you please check it is OK before me sending it (hopefully
this Friday):

New patches for t/upstream:
- 55e4e979ac67: Squash to "mptcp: allow overridden write_space to be
invoked"
- 42f06f700e58: tg:msg: clarify the behaviour is not changed
- Results: 073024280a58..7b6c434aafe6 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/526555deb2ae5fac245a38f29a157c396ef1e4ee/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next] Squash to "mptcp: allow overridden write_space to be invoked"
Posted by MPTCP CI 4 days, 5 hours ago
Hi Geliang,

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): packetdrill_dss 🔴
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Critical: Call Traces at boot time ❌
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/21703567755

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


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)