forked from quinn-rs/quinn
-
Notifications
You must be signed in to change notification settings - Fork 3
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
flub
wants to merge
270
commits into
iroh-0.11.x
Choose a base branch
from
multipath-quinn-0.11.x
base: iroh-0.11.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add multipath #28
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updates the requirements on [rustls-platform-verifier](https://github.com/rustls/rustls-platform-verifier) to permit the latest version. - [Release notes](https://github.com/rustls/rustls-platform-verifier/releases) - [Changelog](https://github.com/rustls/rustls-platform-verifier/blob/main/CHANGELOG) - [Commits](rustls/rustls-platform-verifier@v/0.4.0...v/0.4.0) --- updated-dependencies: - dependency-name: rustls-platform-verifier dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
For symmetry with encode.
This will be useful for NEW_TOKEN usage, as validation tokens will only include IP address and not port.
Prior to this commit, decoding a socket addr from a RetryToken called get_u8 and get_u16, which would have panicked if an encrypted token were minted that terminated after that point. This replaces them with calls that short-circuit, for consistency with other parts of the code there.
This will be useful for NEW_TOKEN usage, as it will make there be more than one call site for this.
Organizes encoding payload section versus encrypting section.
Prior to this commit, a RetryToken encodes the client's address as if it were a field, but rather than it actually being a field, it's threaded in to encode, and validated in-place in decode. It's unclear to me why this is. This commit makes the remote address simply a field of the RetryToken struct.
As of the previous commit, RetryToken::decode fails only with the Unusable variant, and validation only occurs in IncomingToken::from_header, which uses InvalidRetryTokenError directly. This allows us to remove ValidationError altogether.
This probably won't affect much, but is slightly more defensive.
Endpoint.handle_first_packet is only called from one place, in Endpoint.handle. handle is quite long, whereas handle_first_packet is around a third its size. This commit moves more logic from handle to handle_first_packet to even them out.
Now that Endpoint.handle is smaller, there is less of a need for the section divider-style comments.
Endpoint.handle now always constructs a DatagramConnectionEvent unless it encounters a PacketDecodeError. This will be useful for the following commit.
This reduces line of code.
Prior to this commit, Endpoint.handle turns into a series of `if (condition) { return (value) }` statements once the PartialDecode is complete. Since all of that is already rightward-shifted, we can just convert it into a big if-else chain to reduce LOC and make control flow more obvious.
Reduces LOC.
Replaces them with more modern and appropriate constructors or constants.
On Windows, to enable ECN reporting, one sets the `IPV6_RECVECN` socket option. The Windows IP stack will then report ECN markings via the `IPV6_ECN` message type. Previously `quinn-udp` would use `IPV6_ECN` for both. With this commit `IPV6_RECVECN` is used to set the socket option and `IPV6_ECN` is used to read the option. Given that both constants evaluate to the same value (i.e. `50`) the previous behavior does not result in an actual bug. See also: - https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options - https://www.ietf.org/archive/id/draft-duke-tsvwg-udp-ecn-01.html - https://docs.rs/windows-sys/latest/windows_sys/Win32/Networking/WinSock/constant.IPV6_RECVECN.html - https://docs.rs/windows-sys/latest/windows_sys/Win32/Networking/WinSock/constant.IPV6_ECN.html
Equivalent to quinn-rs#2125 for IPv4. On Windows, to enable ECN reporting on IPv4, one sets the `IP_RECVECN` socket option. The Windows IP stack will then report ECN markings via the `IP_ECN` message type. Previously `quinn-udp` would use `IP_ECN` for both. With this commit `IP_RECVECN` is used to set the socket option and `IP_ECN` is used to read the option. Given that both constants evaluate to the same value (i.e. `50`) the previous behavior does not result in an actual bug. See also: - https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options - https://www.ietf.org/archive/id/draft-duke-tsvwg-udp-ecn-01.html - https://docs.rs/windows-sys/latest/windows_sys/Win32/Networking/WinSock/constant.IP_RECVECN.html - https://docs.rs/windows-sys/latest/windows_sys/Win32/Networking/WinSock/constant.IP_ECN.html
We need to make sure there's something ACK-eliciting. So there needs to be a can_send.other. But the maybe_queue_probe function already has this functionality in it. Just call it, even if the work that function does has weird lines. For now keep it the same.
This doesn't do selection correctly yet. And there's still a bunch to clean up. But the main structure is there now.
I mostly want to be able to write `path.data` to refer to the PathData rather than `path.path` or so.
I mostly want to be able to write `path.data` to refer to the PathData rather than `path.path` or so.
There are no public APIs that accept BytesSource. This commit makes it not be re-exported publically.
Changes the implementation of `SendStream::stopped` such that the returned future is static and no longer lifetime-bound onto a mutable reference to the send stream. This allows to use the stopped future with combinators or in a separate task while still sending on the stream concurrently. Internally, this is done changing the implementation of the stopped notification to use a cloneable tokio::sync::Notify instead of storing a single waker.
Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.3.2 to 0.3.3. - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](rust-random/getrandom@v0.3.2...v0.3.3) --- updated-dependencies: - dependency-name: getrandom dependency-version: 0.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [rustls-platform-verifier](https://github.com/rustls/rustls-platform-verifier) from 0.5.1 to 0.5.3. - [Release notes](https://github.com/rustls/rustls-platform-verifier/releases) - [Changelog](https://github.com/rustls/rustls-platform-verifier/blob/main/CHANGELOG) - [Commits](rustls/rustls-platform-verifier@v/0.5.1...v/0.5.3) --- updated-dependencies: - dependency-name: rustls-platform-verifier dependency-version: 0.5.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
This commit makes there be fewer places where SendStream::execute_poll is called directly. AsyncWrite implementations now go through poll_write, and poll_write now goes through the write future. This means that execute_poll is now only called directly from write and write_chunks.
If there's an active path we only want to send packets that must be sent on a backup path on the backup path. All the other packets should go on the active path, even if the active path is congestion blocked.
This commit uses an allow directive to suppress the following error: ``` warning: the `Err`-variant returned from this function is very large --> quinn-proto/src/endpoint.rs:525:10 | 525 | ) -> Result<(ConnectionHandle, Connection), AcceptError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 136 bytes | = help: try reducing the size of `endpoint::AcceptError`, for example by boxing large elements or replacing it with `Box<endpoint::AcceptError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default ``` Because AcceptError and all of its descendants fields are public, excepting a descendant that contains a usize, it is impossible to reduce the byte size of AcceptError without semver breakage.
Clippy is warning that the size of RetryError (both proto and quinn's versions) are excessively large for a Result Err variant. This function fixes these warnings by boxing the contents of both.
* make transport config and transport parameters uniform * remove comment from docs * keep track of the local and remote max path ids * add constant * clippy fixes
Green CI again on stable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.