Defer active path activation - #6273
Open
Guillaume Hetier (guhetier) wants to merge 9 commits into
Open
Conversation
Record active-path changes during receive processing and apply them after path pointers are no longer in use. Refactor active-path selection and migration handling around the pending path ID. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Resolve the path inside QuicPathSetActive so callers do not pass pointers that the activation operation may invalidate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
| Connection, | ||
| "Non-active path has no replacement for retired CID."); | ||
| // | ||
| // A path pending deferred activation is still considered non-active here and |
Collaborator
Author
There was a problem hiding this comment.
Note to reviewer: Known gap, addressed in the next PR in the PR stack when this QuicPathRemove is also deferred to after processing the received packets.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## guhetier/reafactor_network_path_2 #6273 +/- ##
=====================================================================
+ Coverage 85.34% 85.57% +0.22%
=====================================================================
Files 60 60
Lines 19008 19033 +25
=====================================================================
+ Hits 16222 16287 +65
+ Misses 2786 2746 -40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
Guillaume Hetier (guhetier)
marked this pull request as ready for review
September 3, 2026 22:08
Use 32-bit path IDs throughout packet metadata and route resolution, and reject new path creation before NextPathId would wrap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 03ce1c1f-9bb3-4a56-be65-d7f4d3fb46eb
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
Defers active-path changes until receive processing no longer holds pointers into the path array.
Receiving a valid packet containing non-probing frames on a path makes this path active.
However, setting a path as active moves it to the front of the path array, which can potentially invalidate pointers to paths.
To avoid this:
The active path is mostly needed to send (it is by definition the path the connection uses to send packets), so it isn't a problem to defer the operation until the end of the receive loop. A side benefit is that it avoids multiple updates in sequence if multiple migrations would be triggered in a single receive operation.
Testing
CI and local testing
Documentation
No documentation impact.