feat(s2n-quic-dc): add source_queue_id to control packets #2537
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 of changes:
This change adds a
source_queue_id
to control packets. This allows clients to discover the actual server's queue ID sooner rather than waiting for a stream packet to come back. I've also implemented logic to stop sending the source queue ID as soon as we get a packet back from the peer with the correct queue id.Call-outs:
This also moves the
source_control_port
field to be unused for Stream and Control packets. Note that streams still write a0
for backward compatibility. The control frames are only used for UDP-based streams, which are still WIP so it can be removed entirely there. Long term, we can potentially reuse the space for something else.The reason for the removal is it's been mostly replaced with the
source_queue_id
functionality. There is still a potential port migration on the server after it creates a dedicated owned socket for the stream but that only happens once on the initial response and it would be better to look at thesource_port
field in the UDP datagram in case there's a NAT in the middle that is translating our ports.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.