WebTransport sendGroup support (and improve sendOrder)#3467
WebTransport sendGroup support (and improve sendOrder)#3467jesup wants to merge 5 commits intousers/jesup/sub_protocolfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds WebTransport send group support to the QUIC transport and HTTP/3 layers, implementing the spec requirement that WebTransportSendGroups are treated as bandwidth-equals with per-group sendOrder namespacing. The changes introduce a SendGroupId type, per-group scheduling queues with round-robin fairness at the transport layer, and session-scoped send group registration/validation at the HTTP/3 layer.
Changes:
- New
SendGroupIdandSendGrouptypes inneqo-http3, with a global atomic counter for unique IDs and a sentinel value (0) reserved for ungrouped streams. - Transport-layer scheduling refactored from flat
sendordered/regularqueues to per-groupPerGroupQueueswith round-robin between groups and sendOrder-based priority within each group. - HTTP/3 APIs for creating, registering, and validating send groups on WebTransport sessions, including stream creation with send group assignment.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
neqo-http3/src/features/extended_connect/send_group.rs |
New file: SendGroupId newtype with atomic counter and SendGroup struct |
neqo-http3/src/features/extended_connect/mod.rs |
Adds pub mod send_group |
neqo-http3/src/features/extended_connect/webtransport_session.rs |
Session-level send group registration, validation, and storage |
neqo-http3/src/features/extended_connect/webtransport_streams.rs |
WebTransportSendStream gains send_group field and trait impls |
neqo-http3/src/features/extended_connect/session.rs |
Protocol trait extended with send group methods; forwarding impls |
neqo-http3/src/lib.rs |
Re-exports SendGroupId; adds Stream/SendStream trait methods |
neqo-http3/src/connection.rs |
Http3Connection gains send group set/clear, register/validate, and stream creation with send group |
neqo-http3/src/connection_client.rs |
Public API: webtransport_set_sendgroup, webtransport_register_send_group, webtransport_create_stream_with_send_group |
neqo-transport/src/send_stream.rs |
PerGroupQueues, refactored SendStreams with per_group IndexMap and round-robin scheduling |
neqo-transport/src/streams.rs |
New SendGroupId type alias and set_sendgroup forwarding |
neqo-transport/src/connection/mod.rs |
Public stream_sendgroup API on Connection |
neqo-http3/src/features/extended_connect/tests/webtransport/sessions.rs |
Comprehensive tests for send group creation, validation, cross-session rejection, fair bandwidth allocation, and sendOrder within groups |
c2bb439 to
58be5ff
Compare
|
Given the large merge conflicts, can you do another rebase before review? Can also review now, though I am afraid comments might get lost. |
|
It needs a rebase so CI runs |
c140eef to
723a367
Compare
9c15fa5 to
9a89365
Compare
|
This PR is part of a stack of 13 bookmarks:
Created with jj-stack |
9a89365 to
d564de8
Compare
Fixes existing bug where low priority streams could be starved forever: After the highest-sendOrder stream within a group exhausted its queued data (but remained open), PerGroupQueues::next_stream_id() kept returning it, permanently starving lower-sendOrder streams in the same group.
d564de8 to
f5b9bdc
Compare
Failed Interop TestsNone ❓ All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-pr as clientNone ❓ neqo-pr as serverNone ❓ Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-pr as clientNone ❓ neqo-pr as serverNone ❓ |
No description provided.