feat(iroh): Make poll_writable precise by using NodeMap::addr_for_send#3266
Closed
matheus23 wants to merge 3 commits into
Closed
feat(iroh): Make poll_writable precise by using NodeMap::addr_for_send#3266matheus23 wants to merge 3 commits into
poll_writable precise by using NodeMap::addr_for_send#3266matheus23 wants to merge 3 commits into
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3266/docs/iroh/ Last updated: 2025-05-20T15:12:46Z |
Member
Author
|
This PR:
Latest PR to main:
|
Member
Author
|
I guess it clearly makes a difference? 😅 |
Member
Author
|
Don't think I'll merge this near-term. |
1c22b91 to
19dfdb5
Compare
Member
Author
|
This PR after rebasing on
|
Member
Author
|
Closing this in favor of #3279 (and it's using n0-computer/noq#67 which enables the same thing). |
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
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.
For now just a PR to look at netsim numbers.
Description
Every send side of a connection gets its own
UdpPoller.If we pass in the
Connection::remote_address()toAsyncUdpSocket::create_io_pollerin quinn (n0-computer/noq#57) then we can determine which path we're going to use intry_sendviaNodeMap::addr_for_sendwithinIoPoller::poll_writable.This allows us to accurately (ignoring race conditions between
try_sendandpoll_writable) report readiness.Notes & open questions
Needs changes to quinn's
AsyncUdpSockettrait.It's possible to circumvent them, but it's verrrry annoying to do so.
(The trick would be to wrap calls to
quinn::Endpoint::connect_withandquinn::Incoming::accept[_with]with a lock and pre-load the remote address somewhere so thatMagicSock::create_io_pollercan fetch it back when it's called throughconnect_with/accept[_with]. I couldn't get that to work easily without panicing 😬 )Change checklist