Add Multipath TCP (MPTCP) Support to the Java Networking API
Alan Bateman
alan.bateman at oracle.com
Thu Sep 18 11:30:16 UTC 2025
On 18/09/2025 08:36, Geliang Tang wrote:
> I have completed the implementation. Thanks to Xiang Gao and Gang Yan
> for their help. I added a new option named TCP_MPTCPIFY in
> jdk.net.ExtendedSocketOptions (the name was chosen to align with
> 'mptcpize' tool in mptcpd and 'mptcpify' in BCC). When this option is
> set, it calls the JNI function mptcpify0.
>
> Following your suggestion, mptcpify0 is implemented by referencing
> Java_sun_net_sdp_SdpSupport_convert0. It creates a new MPTCP socket,
> uses dup2 to duplicate it, and then closes the redundant socket.
>
> I have added your tag in the patch:
>
> Suggested-by: Alan Bateman<alan.bateman at oracle.com>
>
> I also included a test example for this option. All modifications can
> be found here:
>
> https://github.com/openjdk/jdk/compare/master...geliangtang:jdk:master
>
> Please provide any feedback or suggestions. As for the next steps,
> should I create a new issue for this feature and submit a proper pull
> request?
Thanks for confirming that the direction suggested works. This at least
demonstrates a feasible direction that does not impact the standard API.
As regards next steps then I think start a thread on net-dev to try to
get input. I think it would be useful to show potential scenarios where
it would be useful and what performance benefits might come from it. I
think also useful to talk about whether this is something that an
application has to opt into, maybe there are other configuration
approaches that would not require application changes?
I think it would be useful to discuss testing. If this feature were
integrated into the JDK then how would it be tested? Who would test and
maintain it? There is a JDK release every 6 months, is someone going
test it with each release?
If it goes ahead then there the name of the extended socket option and
its API docs will need discussion. Details around state will need to be
specified, would it be supported to set TCP_MPTCP when bound or
connected, does it make sense to ever attempt to set it to false after
setting it to true (these are just examples of the details that will
need to be specified, they are not important right now).
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/net-dev/attachments/20250918/1cdef669/attachment.htm>
More information about the net-dev
mailing list