Skip to content

Add multipath #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 340 commits into
base: iroh-0.11.x
Choose a base branch
from
Draft

Add multipath #28

wants to merge 340 commits into from

Conversation

flub
Copy link
Collaborator

@flub flub commented Jan 15, 2025

No description provided.

@flub flub changed the title Add multipath to Quinn Add multipath Jan 15, 2025
flub and others added 19 commits February 10, 2025 16:35
This is a bit sad because it splits the use in poll_transmit.  It will
need more adjustments once poll_transmit starts sending on multiple
paths though.
This is a bit sad because it splits the use in poll_transmit.  It will
need more adjustments once poll_transmit starts sending on multiple
paths though.
On MacOS < 14, with `fast-apple-datapath` feature, calls to
`libc::CMSG_NXTHDR` might continuously return empty (i.e. all zero)
`libc::cmsghdr` instead of a null pointer. This results in a busy loop
in `decode_recv`:

``` rust
let cmsg_iter = unsafe { cmsg::Iter::new(hdr) };
for cmsg in cmsg_iter {
	match (cmsg.cmsg_level, cmsg.cmsg_type) {
```
https://github.com/quinn-rs/quinn/blob/b4378bb39dab4b58a1e6a3fea4fff9f87033dab6/quinn-udp/src/unix.rs#L685C1-L687C50

This commit fixes the above, returning a `null_mut()` pointer on an
empty `libc::cmsgdhr`, thus terminating the `cmsg_iter`.

See also mozilla/neqo#2427 for details.
This was the only case where `Instant::now()` is used in quinn-proto or quinn-udp for anything other than tests or rate-limiting logging. Making this change to keep these two crates more IO-agnostic.
@MikeRomaniuk
Copy link

Hi there!
Can you please say how much of the work is done already (just a ballpark figure will be enough)?
I would like to use quinn and the multipath feature feature is very important to me.
If this would be possible (I would need to ask the stakeholders) I may contribute to the development of the feature.

flub and others added 30 commits June 13, 2025 16:46
This always accepts the status set by the peer, the draft says it is
only a suggestion.
- PTO is computed for the right path
- crypto keys update uses 3 * max PTO of all paths
- draining state uses 3 * max PTO of all paths
- PTO is computed for the right path
- crypto keys update uses 3 * max PTO of all paths
- draining state uses 3 * max PTO of all paths
- [x] Basic idle timeout scaffolding.
- [x] Handle `PathIdle` timer expiry.
- [x] Basic keep alive scaffolding.
- [x] Handle `PathKeepAlive` timer expiry.
- [x] quinn-proto API for setting path idle and keepalive.
- [x] quinn API for setting path idle and keepalive.
- [x] Allow setting path idle & keepalive defaults in `TransportConfig`.

The following might perhaps better flow over to another PR
- [ ] Abandon the path correctly.
- [ ] Close the connection if there is no remaining path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.