<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 18/09/2025 08:36, Geliang Tang
      wrote:<span style="white-space: pre-wrap">
</span></div>
    <blockquote type="cite" cite="mid:717920eaaa9d4d0da181d84dd11334dae2568f34.camel@kernel.org">
      <pre wrap="" class="moz-quote-pre">
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 <a class="moz-txt-link-rfc2396E" href="mailto:alan.bateman@oracle.com"><alan.bateman@oracle.com></a>

I also included a test example for this option. All modifications can
be found here:

<a class="moz-txt-link-freetext" href="https://github.com/openjdk/jdk/compare/master...geliangtang:jdk:master">https://github.com/openjdk/jdk/compare/master...geliangtang:jdk:master</a>

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?
</pre>
    </blockquote>
    <br>
    Thanks for confirming that the direction suggested works. This at
    least demonstrates a feasible direction that does not impact the
    standard API.<br>
    <br>
    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?<br>
    <br>
    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?<br>
    <br>
    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).<br>
    <br>
    -Alan.<br>
    <br>
  </body>
</html>