quinn-udp: retry GSO batch after disabling offload#2724
Conversation
608e04a to
565fcd6
Compare
|
Very much in favor. Thanks for working on it. We (Firefox) ran into the same issue. We currently re-send within Firefox. Instead re-sending in quinn-udp would be much cleanre. |
296845f to
adc90b9
Compare
thomaseizinger
left a comment
There was a problem hiding this comment.
Concept ACK, a few nits
| state.max_gso_segments.store(1, Ordering::Relaxed); | ||
|
|
||
| // Immediately retry this batch as individual datagrams rather than waiting | ||
| // for the QUIC layer to time out and retransmit. These sends run with GSO |
There was a problem hiding this comment.
Nit: Refer to "upper" layer here.
| #[allow(unused_variables)] // only used on Linux | ||
| state: &UdpSocketState, | ||
| io: SockRef<'_>, | ||
| io: &SockRef<'_>, |
There was a problem hiding this comment.
We can avoid this by re-borrowing the ref instead:
let io = SockRef::from(&*io);There was a problem hiding this comment.
Yeah I opted for & because it's feels less magic, but IDK.
adc90b9 to
3535538
Compare
| let segment_size = transmit | ||
| .segment_size | ||
| .unwrap_or(transmit.contents.len()) | ||
| .max(1); |
There was a problem hiding this comment.
What is that for?
If contents.len is 0, we can just return Ok(()), right? And if segment_size is 0, we should probably fail?
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3535538 to
c6ad76d
Compare
|
Note that this also gets fixed in #2748 which may be preferable to merge because it also fixes another issue. |
Fixes #2399
The first batch that causes a GSO failure is often the initial packet, which takes forever to retry sending at the QUIC layer because of the default RTT. This should improves connection time dramatically on some Linux devices (apparently Android).