.../share/classes/java/net/ServerSocket.java | 66 ++++++++++++++ .../share/classes/java/net/Socket.java | 88 +++++++++++++++++++ .../share/classes/java/net/SocketImpl.java | 8 ++ .../share/classes/sun/nio/ch/Net.java | 26 +++++- .../classes/sun/nio/ch/NioSocketImpl.java | 19 +++- src/java.base/unix/native/libnio/ch/Net.c | 5 +- src/java.base/windows/native/libnio/ch/Net.c | 2 +- .../java/net/ServerSocket/MPTCPServer.java | 58 ++++++++++++ test/jdk/java/net/Socket/MPTCPClient.java | 62 +++++++++++++ 9 files changed, 326 insertions(+), 8 deletions(-) create mode 100644 test/jdk/java/net/ServerSocket/MPTCPServer.java create mode 100644 test/jdk/java/net/Socket/MPTCPClient.java
The Multipath TCP (MPTCP) protocol (v1 / RFC 8684) has been added in the upstream Linux kernel since v5.6. This patch series introduces comprehensive Multipath TCP (MPTCP) support to the Java Networking API, enabling applications to leverage MPTCP's capabilities for improved reliability and throughput. The implementation provides: 1. Core infrastructure for MPTCP socket creation (Patch 1) 2. Server and client socket creation APIs (Patches 2-3) 3. Integration with NIO socket implementation (Patch 4) 4. High-level Socket and ServerSocket support (Patches 5-6) 5. Comprehensive test cases (Patch 7) Key features: - Backward compatible API extensions - Platform-independent implementation - Explicit MPTCP enablement through new constructors - Full integration with existing socket functionality - Test coverage for basic MPTCP operations The changes maintain all existing functionality while adding MPTCP capabilities. When MPTCP is not enabled or not supported by the system, the implementation gracefully falls back to regular TCP behavior. This work enables Java applications to benefit from MPTCP's capabilities: - Seamless handover between network interfaces - Aggregated bandwidth from multiple paths - Improved resilience to network failures The implementation has been tested on Linux systems with MPTCP kernel support enabled. https://github.com/openjdk/jdk Geliang Tang (7): Add MPTCP support for socket creation Add MPTCP server socket creation support Add MPTCP client socket creation support Add MPTCP support to NioSocketImpl Add MPTCP support to ServerSocket class Add MPTCP support to Socket class Add test cases for MPTCP socket functionality .../share/classes/java/net/ServerSocket.java | 66 ++++++++++++++ .../share/classes/java/net/Socket.java | 88 +++++++++++++++++++ .../share/classes/java/net/SocketImpl.java | 8 ++ .../share/classes/sun/nio/ch/Net.java | 26 +++++- .../classes/sun/nio/ch/NioSocketImpl.java | 19 +++- src/java.base/unix/native/libnio/ch/Net.c | 5 +- src/java.base/windows/native/libnio/ch/Net.c | 2 +- .../java/net/ServerSocket/MPTCPServer.java | 58 ++++++++++++ test/jdk/java/net/Socket/MPTCPClient.java | 62 +++++++++++++ 9 files changed, 326 insertions(+), 8 deletions(-) create mode 100644 test/jdk/java/net/ServerSocket/MPTCPServer.java create mode 100644 test/jdk/java/net/Socket/MPTCPClient.java -- 2.48.1
Hi Geliang, On 23/07/2025 07:16, Geliang Tang wrote: > The Multipath TCP (MPTCP) protocol (v1 / RFC 8684) has been added in > the upstream Linux kernel since v5.6. > > This patch series introduces comprehensive Multipath TCP (MPTCP) support > to the Java Networking API, enabling applications to leverage MPTCP's > capabilities for improved reliability and throughput. Thank you for having looked at that. > The implementation provides: > 1. Core infrastructure for MPTCP socket creation (Patch 1) > 2. Server and client socket creation APIs (Patches 2-3) > 3. Integration with NIO socket implementation (Patch 4) > 4. High-level Socket and ServerSocket support (Patches 5-6) > 5. Comprehensive test cases (Patch 7) > > Key features: > - Backward compatible API extensions > - Platform-independent implementation > - Explicit MPTCP enablement through new constructors > - Full integration with existing socket functionality > - Test coverage for basic MPTCP operations > > The changes maintain all existing functionality while adding MPTCP > capabilities. When MPTCP is not enabled or not supported by the system, the > implementation gracefully falls back to regular TCP behavior. I don't think it is the case: if the system doesn't support it, an error will be returned. If the other host doesn't support it or didn't request it, a fallback will be done. Also, don't hesitate to share a link to https://mptcp.dev to help reviewers understanding what MPTCP is. > This work enables Java applications to benefit from MPTCP's capabilities: > - Seamless handover between network interfaces > - Aggregated bandwidth from multiple paths > - Improved resilience to network failures > > The implementation has been tested on Linux systems with MPTCP kernel > support enabled. > > https://github.com/openjdk/jdk I have a few comments, but I don't know the project, and I didn't code in Java for a while. Then, feel free to send this version or an updated one to the Java Net maintainers (not sure how, but I'm sure you will figure out :) ). Do not hesitate to share the link here. > Geliang Tang (7): > Add MPTCP support for socket creation > Add MPTCP server socket creation support > Add MPTCP client socket creation support > Add MPTCP support to NioSocketImpl > Add MPTCP support to ServerSocket class > Add MPTCP support to Socket class > Add test cases for MPTCP socket functionality > > .../share/classes/java/net/ServerSocket.java | 66 ++++++++++++++ > .../share/classes/java/net/Socket.java | 88 +++++++++++++++++++ > .../share/classes/java/net/SocketImpl.java | 8 ++ > .../share/classes/sun/nio/ch/Net.java | 26 +++++- > .../classes/sun/nio/ch/NioSocketImpl.java | 19 +++- > src/java.base/unix/native/libnio/ch/Net.c | 5 +- > src/java.base/windows/native/libnio/ch/Net.c | 2 +- > .../java/net/ServerSocket/MPTCPServer.java | 58 ++++++++++++ > test/jdk/java/net/Socket/MPTCPClient.java | 62 +++++++++++++ > 9 files changed, 326 insertions(+), 8 deletions(-) > create mode 100644 test/jdk/java/net/ServerSocket/MPTCPServer.java > create mode 100644 test/jdk/java/net/Socket/MPTCPClient.java > Cheers, Matt -- Sponsored by the NGI0 Core fund.
Hi Matt, On Thu, 2025-07-31 at 00:03 +0200, Matthieu Baerts wrote: > Hi Geliang, > > On 23/07/2025 07:16, Geliang Tang wrote: > > The Multipath TCP (MPTCP) protocol (v1 / RFC 8684) has been added > > in > > the upstream Linux kernel since v5.6. > > > > This patch series introduces comprehensive Multipath TCP (MPTCP) > > support > > to the Java Networking API, enabling applications to leverage > > MPTCP's > > capabilities for improved reliability and throughput. > > Thank you for having looked at that. > > > The implementation provides: > > 1. Core infrastructure for MPTCP socket creation (Patch 1) > > 2. Server and client socket creation APIs (Patches 2-3) > > 3. Integration with NIO socket implementation (Patch 4) > > 4. High-level Socket and ServerSocket support (Patches 5-6) > > 5. Comprehensive test cases (Patch 7) > > > > Key features: > > - Backward compatible API extensions > > - Platform-independent implementation > > - Explicit MPTCP enablement through new constructors > > - Full integration with existing socket functionality > > - Test coverage for basic MPTCP operations > > > > The changes maintain all existing functionality while adding MPTCP > > capabilities. When MPTCP is not enabled or not supported by the > > system, the > > implementation gracefully falls back to regular TCP behavior. > > I don't think it is the case: if the system doesn't support it, an > error > will be returned. > > If the other host doesn't support it or didn't request it, a fallback > will be done. > > Also, don't hesitate to share a link to https://mptcp.dev to help > reviewers understanding what MPTCP is. > > > This work enables Java applications to benefit from MPTCP's > > capabilities: > > - Seamless handover between network interfaces > > - Aggregated bandwidth from multiple paths > > - Improved resilience to network failures > > > > The implementation has been tested on Linux systems with MPTCP > > kernel > > support enabled. > > > > https://github.com/openjdk/jdk > I have a few comments, but I don't know the project, and I didn't > code > in Java for a while. Then, feel free to send this version or an > updated > one to the Java Net maintainers (not sure how, but I'm sure you will > figure out :) ). Do not hesitate to share the link here. How about I submit a pull request to openjdk? > > > Geliang Tang (7): > > Add MPTCP support for socket creation > > Add MPTCP server socket creation support > > Add MPTCP client socket creation support > > Add MPTCP support to NioSocketImpl > > Add MPTCP support to ServerSocket class > > Add MPTCP support to Socket class > > Add test cases for MPTCP socket functionality > > > > .../share/classes/java/net/ServerSocket.java | 66 ++++++++++++++ > > .../share/classes/java/net/Socket.java | 88 > > +++++++++++++++++++ > > .../share/classes/java/net/SocketImpl.java | 8 ++ > > .../share/classes/sun/nio/ch/Net.java | 26 +++++- > > .../classes/sun/nio/ch/NioSocketImpl.java | 19 +++- > > src/java.base/unix/native/libnio/ch/Net.c | 5 +- > > src/java.base/windows/native/libnio/ch/Net.c | 2 +- > > .../java/net/ServerSocket/MPTCPServer.java | 58 ++++++++++++ > > test/jdk/java/net/Socket/MPTCPClient.java | 62 +++++++++++++ > > 9 files changed, 326 insertions(+), 8 deletions(-) > > create mode 100644 test/jdk/java/net/ServerSocket/MPTCPServer.java > > create mode 100644 test/jdk/java/net/Socket/MPTCPClient.java > > > > Cheers, > Matt
Hi Geliang, On 31/07/2025 09:49, Geliang Tang wrote: > Hi Matt, > > On Thu, 2025-07-31 at 00:03 +0200, Matthieu Baerts wrote: >> Hi Geliang, >> >> On 23/07/2025 07:16, Geliang Tang wrote: >>> The Multipath TCP (MPTCP) protocol (v1 / RFC 8684) has been added >>> in >>> the upstream Linux kernel since v5.6. >>> >>> This patch series introduces comprehensive Multipath TCP (MPTCP) >>> support >>> to the Java Networking API, enabling applications to leverage >>> MPTCP's >>> capabilities for improved reliability and throughput. >> >> Thank you for having looked at that. >> >>> The implementation provides: >>> 1. Core infrastructure for MPTCP socket creation (Patch 1) >>> 2. Server and client socket creation APIs (Patches 2-3) >>> 3. Integration with NIO socket implementation (Patch 4) >>> 4. High-level Socket and ServerSocket support (Patches 5-6) >>> 5. Comprehensive test cases (Patch 7) >>> >>> Key features: >>> - Backward compatible API extensions >>> - Platform-independent implementation >>> - Explicit MPTCP enablement through new constructors >>> - Full integration with existing socket functionality >>> - Test coverage for basic MPTCP operations >>> >>> The changes maintain all existing functionality while adding MPTCP >>> capabilities. When MPTCP is not enabled or not supported by the >>> system, the >>> implementation gracefully falls back to regular TCP behavior. >> >> I don't think it is the case: if the system doesn't support it, an >> error >> will be returned. >> >> If the other host doesn't support it or didn't request it, a fallback >> will be done. >> >> Also, don't hesitate to share a link to https://mptcp.dev to help >> reviewers understanding what MPTCP is. >> >>> This work enables Java applications to benefit from MPTCP's >>> capabilities: >>> - Seamless handover between network interfaces >>> - Aggregated bandwidth from multiple paths >>> - Improved resilience to network failures >>> >>> The implementation has been tested on Linux systems with MPTCP >>> kernel >>> support enabled. >>> >>> https://github.com/openjdk/jdk >> I have a few comments, but I don't know the project, and I didn't >> code >> in Java for a while. Then, feel free to send this version or an >> updated >> one to the Java Net maintainers (not sure how, but I'm sure you will >> figure out :) ). Do not hesitate to share the link here. > > How about I submit a pull request to openjdk? I don't think that is that simple... Apparently you need to sign the OCA, create a bug report, then later on, send a PR: https://openjdk.org/guide/#i-have-a-patch-what-do-i-do Not that easy to contribute... Cheers, Matt -- Sponsored by the NGI0 Core fund.
© 2016 - 2025 Red Hat, Inc.