-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
fix: respecting max_datagrams in poll_transmit #2185
base: main
Are you sure you want to change the base?
fix: respecting max_datagrams in poll_transmit #2185
Conversation
That code exists so that the application layer can easily opt out of GSO without needing to replace the UDP socket abstraction. |
How about |
Oh, you were concerned about the upper bound? We could probably get rid of that entirely, yeah. |
d339e2c
to
aeffe92
Compare
Is this something that could be done here in this PR? |
Sure, in a separate commit. |
(Be sure to rebase on main to appease CI.) |
aeffe92
to
5900957
Compare
Should we keep the current quinn behavior by moving this max cap over there? From what I see, currently linux systems would start dumping 64 segments instead of 10. Maybe set a default of max 10 in there, but also expose a way to set accordingly? |
That'd be safer than removing it outright, though bare quinn-proto users will still be affected. IMO we should consider relaxing it entirely, but if you're not interested in doing testing that (especially on Windows where the kernel-enforced limit is a full 512 datagrams) we could leave it to future work.
We should avoid offering configuration knobs unless there's clear motivation to support multiple cases, i.e. evidence that no one value is adequate for the vast majority of users. |
Could I then move the 10 limit to quinn in this PR and then open an issue to follow up relaxing it? I could maybe work on that later. As far as where to cap it, maybe here is a good place: |
SGTM, thanks!
Yep, that's the spot. |
…tu is large enough to batch When a TLP is the first in the batch and initial mtu is large enough to allow for batching it still should stay under the max_datagrams limit
8e7e23a
to
5b6baab
Compare
Hello,
I've been playing with quinn-proto recently and I noticed that, sometimes, when the maximum segment is large enough quinn will go over the max_datagrams limit of poll_transmit. I believe this PR will fix this issue.
Also, considering that quin-proto is a low level crate, it feels like this code:
quinn/quinn-proto/src/connection/mod.rs
Lines 454 to 457 in 434c358
should be removed and left for the upper level code to decide what max limit they truly want to use.