Skip to content

feat(wasix): support TCB OOB and exceptfds - #6861

Open
kilyanni wants to merge 2 commits into
wasmerio:mainfrom
kilyanni:oob-readiness-refactor
Open

feat(wasix): support TCB OOB and exceptfds#6861
kilyanni wants to merge 2 commits into
wasmerio:mainfrom
kilyanni:oob-readiness-refactor

Conversation

@kilyanni

@kilyanni kilyanni commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Support TCB out-of-band data and exceptfds

  • Propagates EPOLLPRI/priority readiness through the virtual I/O selector.
  • Maps exceptional polling to WASIX FdExcept and EPOLLPRI.
  • Uses non-destructive FIONREAD checks so read-readiness polling does not consume data or cross the TCP urgent mark.
  • Keeps OOB-specific work off the normal TCP receive path, so this should hopefully not affect perf on the normal happy path.

wasix-libc support to follow

Re: wasix-org/wasix-libc#127

@kilyanni
kilyanni requested review from Arshia001 and a lite review from Copilot August 6, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kilyanni
kilyanni force-pushed the oob-readiness-refactor branch from a735880 to 6066d4a Compare August 6, 2026 12:47
@kilyanni
kilyanni marked this pull request as ready for review August 6, 2026 12:47
@kilyanni
kilyanni force-pushed the oob-readiness-refactor branch from 6066d4a to 7915146 Compare August 7, 2026 11:33
@kilyanni

kilyanni commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Previously only handled the read half, added the write half as well now

Comment on lines +1632 to +1639
InodeSocketKind::TcpStream { socket, .. } => {
let received = if self.oob {
socket.try_recv_oob(self.data, peek)
} else {
socket.try_recv(self.data, peek)
};
received.and_then(|amt| socket.addr_peer().map(|addr| (amt, addr)))
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all other matches here, I added only an if oob arm, but this fn didn't have a TCP arm at all, so this changes non-OOB behavior as well.

I think that it missing was a latent bug in our recvfrom, so added both OOB and non-OOB paths

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants