GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Support MPTCP for epoll LinuxSocket by jjz921024 · Pull Request #17091 · netty/netty

Conversation

@jjz921024

@jjz921024 jjz921024 commented Jul 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation:
This pr want to close #13607 . Let the epoll and io_uring native transports opt into MPTCP (IPPROTO_MPTCP, available since Linux 5.6) for striped throughput and seamless handover across network paths. By default, they still use plain TCP, this just adds an option to opt into MPTCP.

Modification:

  • Native (netty_unix_socket.c): thread protocol through _socket() / newSocketStreamFd() and add isMptcpSupported0() kernel probe; bump newSocketStreamFd JNI signature to (ZZ)I.
  • unix/Socket.java: cache kernel support in initialize() and expose via Socket.isMptcpSupported(); add newSocketStream0(family, mptcp) overloads.
  • epoll: add newSocketStream(family, mptcp) and constructors (SocketProtocolFamily, boolean mptcp) on EpollSocketChannel and EpollServerSocketChannel; throw
    ChannelException when MPTCP is requested on an unsupported kernel.
  • Tests: add EpollMptcpTest covering the MPTCP supported and unsupported paths.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

He-Pin reacted with thumbs up emoji jjz921024 reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction
@jjz921024
feat: Support MPTCP for epoll and io_uring LinuxSocket
2ea93ba
@jjz921024
jjz921024 force-pushed the mptcp branch from aea2751 to 2ea93ba Compare July 10, 2026 19:53
@jjz921024
feat: move guard from LinuxSocket to Socket
b699e7e
@jjz921024
jjz921024 force-pushed the mptcp branch from 0588bfb to b699e7e Compare July 11, 2026 02:45
jjz921024 added 2 commits July 11, 2026 11:55
@jjz921024
fix unit tests
7bbc534
@jjz921024
fix unit tests
2607ba6
@jjz921024 jjz921024 mentioned this pull request Jul 13, 2026
Implementing MPTCP support in Netty #13607
Open
jjz921024 added 2 commits July 13, 2026 12:44
@jjz921024
fix unit tests
af653a1
@jjz921024
polish code
348ae35
@dreamlike-ocean

dreamlike-ocean commented Jul 25, 2026

Copy link
Copy Markdown
Member

Could you investigate the behavior of io.netty.channel.uring.AbstractIoUringStreamChannel#socketIsEmpty when using MPTCP with io_uring?

While investigating UDS recently, I found that its behavior isn't entirely consistent with TCP: #17127.

Since MPTCP doesn't necessarily follow the same internal code path as TCP in the Linux kernel, I suspect that some CQE flags may not be present in the receive CQEs for MPTCP. If that's the case, it could lead to performance issues in certain scenarios.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jjz921024

jjz921024 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@dreamlike-ocean Hi. You're right. I also went through most of the io_uring features and flags that Netty's io_uring transport uses, and verified against Linux 6.17 that MPTCP sockets don't support recv bundle, zero-copy send, and the SOCK_NONEMPTY flag:

  1. IORING_CQE_F_SOCK_NONEMPTY is never set on MPTCP, so socketIsEmpty() always returns true. Every read costs an extra poll.
  2. IORING_RECVSEND_BUNDLE recv bundle only fills one buffer on MPTCP
  3. zero-copy send fails with -EOPNOTSUPP

So, since these three issues, maybe it's better to land MPTCP support on epoll first and treat io_uring MPTCP as a follow-up? or consider gating these features off (or documenting them) when MPTCP is selected on io_uring,

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
Merge branch '4.2' into mptcp
4fedfee
@normanmaurer

normanmaurer commented Oct 21, 2026

Copy link
Copy Markdown
Member

@dreamlike-ocean thoughts ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dreamlike-ocean

dreamlike-ocean commented Oct 21, 2026

Copy link
Copy Markdown
Member

I think we can implement MPTCP on epoll first. as long as unix-common exposes the relevant syscall, that's enough for us, and we can add MPTCP to io_uring later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jjz921024
remove mptcp from io_uring
402a378
@jjz921024 jjz921024 changed the title feat: Support MPTCP for epoll and io_uring LinuxSocket feat: Support MPTCP for epoll LinuxSocket Oct 22, 2026
@jjz921024

jjz921024 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@normanmaurer @dreamlike-ocean Hi, I've removed the MPTCP related changes from the io_uring transport, so this PR is now epoll-only.

dreamlike-ocean reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

normanmaurer and others added 2 commits October 22, 2026 15:00
@normanmaurer
Keep Socket.newSocketStream0(boolean) to fix the revapi failure
98641ab
Motivation:

The MPTCP change replaced the protected
`Socket.newSocketStream0(boolean ipv6)` with
`newSocketStream0(boolean ipv6, boolean mptcp)`. Revapi reports this as
`java.method.numberOfParametersChanged`, and the build fails. The method
is protected on a public class, so subclasses outside of Netty may call
it.

Modification:

Re-add `newSocketStream0(boolean ipv6)` and let it delegate to
`newSocketStream0(ipv6, false)`.

Result:

No API break, and the revapi check passes again.
@jjz921024
Merge branch '4.2' into mptcp
6bc7342
@testlens-app

testlens-app Bot commented Oct 24, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 6bc7342
▶️ Tests: 49881 executed
⚪️ Checks: 26/26 completed


Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer

normanmaurer commented Oct 29, 2026

Copy link
Copy Markdown
Member

@jjz921024 can you please sign our ICLA and let me know once done ? https://netty.io/s/icla

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jjz921024

jjz921024 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@jjz921024 can you please sign our ICLA and let me know once done ? https://netty.io/s/icla

@normanmaurer Done, I've signed the ICLA. Please let me know if you need anything else.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implementing MPTCP support in Netty

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jjz921024 @dreamlike-ocean @normanmaurer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.