From: Geliang Tang <geliang@kernel.org>
To: Alan Bateman <alan.bateman@oracle.com>,
net-dev@openjdk.org, "nio-dev@openjdk.org" <nio-dev@openjdk.org>
Cc: Matthieu Baerts <matttbe@kernel.org>,
Mat Martineau <martineau@kernel.org>,
mptcp@lists.linux.dev, Gang Yan <yangang@kylinos.cn>,
Xiang Gao <gaoxiang@kylinos.cn>,
core-libs-dev@openjdk.org
Subject: Re: Add Multipath TCP (MPTCP) Support to the Java Networking API
Date: Fri, 05 Sep 2025 18:05:15 +0800 [thread overview]
Message-ID: <7de753a3852e66e42e3087e14e94de9a95b3ed59.camel@kernel.org> (raw)
In-Reply-To: <7403952e-14c1-4ba2-871e-0e2174fd5167@oracle.com>
Hi Alan,
Thanks for your reply.
On Fri, 2025-09-05 at 10:28 +0100, Alan Bateman wrote:
>
> On 05/09/2025 09:43, Geliang Tang wrote:
>
>
> >
> > :
> >
> > 3. Proposed Java API Changes
> >
> > The goal is to allow Java applications to opt-in to using MPTCP
> > when
> > creating sockets, without breaking existing code. The proposed
> > changes
> > are additive and backward-compatible.
> >
> > The core idea is to add a boolean mptcp parameter through the API
> > layers, from the public Socket class down to the native system
> > call.
> >
>
> (moving the discussion to nio-dev and net-dev).
>
> Adding new constructors to legacy Socket/ServerSocket may work for
> your initial prototype but would be problematic to propose as it
> would bake non-standard features into the standard API. Also many
> high performance servers use SocketChannel rather than Socket.
>
> One suggestion for a next prototype is to model the enablement of
> MultiPath TCP as as a JDK-specific socket option (see
> jdk.net.ExtendingSocketOptions). All of the standard APIs for
> networking sockets define a setOption method for setting socket
I was initially concerned that calling setOption() after Socket()
creation to convert TCP to MPTCP was too late. Creating an MPTCP socket
must be done during the socket() system call.
> options. If modeled as a socket option then enabling can create a new
> AF_INET6/SOCK_STREAM/IPPROTO_MPTCP socket and then dup2 it into place
Until I saw here, it should be feasible if the socket can be created
again and dup when calling setOption().
I will try to reimplement MPTCP support using
jdk.net.ExtendingSocketOptions soon and give you feedback.
Thanks,
-Geliang
> so that the original AF_INET6/SOCK_STREAM/0 socket is closed.
> Enabling can be made to fail if the socket is already bound. It could
> copy over existing socket options if needed. Look at the built-in
> (and no longer used) SDP support for an example that does similar
> with AF_INET_SDP/SOCK_STREAM/0. The only API surface would be a
> socket option defined in jdk.net.ExtendingSocketOptions.
>
> -Alan
>
>
next prev parent reply other threads:[~2025-09-05 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 8:43 Add Multipath TCP (MPTCP) Support to the Java Networking API Geliang Tang
[not found] ` <7403952e-14c1-4ba2-871e-0e2174fd5167@oracle.com>
2025-09-05 10:05 ` Geliang Tang [this message]
2025-09-05 10:11 ` Geliang Tang
2025-09-18 7:36 ` Geliang Tang
[not found] ` <2b699d6c-d05b-4445-9448-99348eebdf4a@oracle.com>
2025-09-23 9:55 ` Geliang Tang
-- strict thread matches above, loose matches on Subject: below --
2025-09-05 1:43 Geliang Tang
2025-09-05 9:00 ` Geliang Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7de753a3852e66e42e3087e14e94de9a95b3ed59.camel@kernel.org \
--to=geliang@kernel.org \
--cc=alan.bateman@oracle.com \
--cc=core-libs-dev@openjdk.org \
--cc=gaoxiang@kylinos.cn \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=net-dev@openjdk.org \
--cc=nio-dev@openjdk.org \
--cc=yangang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.