fix(proto): send a path's acknowledgements on that path - #801
Open
richinsley wants to merge 1 commit into
Open
richinsley wants to merge 1 commit into
richinsley wants to merge 1 commit into
Conversation
With multipath, PATH_ACK frames for every path were written into whichever path's packet was built first. In practice that is path 0: the transmit loop visits paths in order, and path 0 usually has something to send. So path 1's acknowledgements rode path 0. That ties path 1's loss recovery and congestion feedback to path 0's fate. When path 0 degrades (a cellular link losing signal, a queue building behind it), path 1's acks sit in path 0's queue and path 1's RTT and delivery-rate samples inflate with a queue it is not on, even though path 1 itself is healthy. Observed with a paced media source over two links where one is throttled mid-stream: the surviving link never ramped. Acks for a path are now sent on that path whenever it can carry them (known CIDs, not abandoned, validated), and only piggybacked onto another path's packet when it cannot. `PacketSpace::can_send` takes the predicate so a path with only foreign acks pending is not asked to build a packet. Test: two validated paths with data on both; the server must transmit PATH_ACKs on path 1 as well as on path 0. On main the counts are 6 and 0; with this change 2 and 4.
2 tasks
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.
Description
With multipath, PATH_ACK frames for every path were coalesced into whichever path's packet was built first — in practice path 0, since the transmit loop visits paths in order and path 0 usually has something to send. Path 1's acknowledgements therefore rode path 0, which ties path 1's loss recovery and congestion feedback to path 0's condition: when path 0 degrades, path 1's acks queue behind it and path 1's RTT and delivery-rate samples inflate with a queue path 1 is not on.
This change sends a path's acknowledgements on that path whenever it can carry them (known CIDs, not abandoned, validated), and only piggybacks them onto another path's packet when it cannot.
PacketSpace::can_sendtakes the same predicate so a path with only foreign acks pending is not asked to build a packet it will not fill.Connection::path_carries_own_acks— the predicate. It takes the three fields rather than&selfso callers can hold&mut self.spacesat the same time.populate_packet— other paths' acks are filtered out of this packet when those paths can carry their own. The filter list is built only when more than one path has a packet-number space and is at most the number of paths.PacketSpace::can_send— the same filter when deciding whether a path has acks to send.path_acks_sent_on_own_path: two validated paths with stream data on both (path 0 toggled toBackupand back so both carry data); the server must transmit PATH_ACKs on path 1 as well as on path 0. Onmainthe counts are 6 and 0; with this change 2 and 4.Fixes #799.
API Changes
None.
PacketSpace::can_sendgains a predicate argument but ispub(super).Notes & open questions
BwLimitedRoutingat a single path in the harness — happy to add one if there is.Change checklist
proposed change and wrote an as clear and concise description as
they could.
intented effect.
cargo makepasses locally.