generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 155
feat(s2n-quic): allow disabling active connection migration support #2182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
fcd661e
feat(s2n-quic): allow disabling active connection migration support
WesleyRosenblum 0aaacbe
change comment
WesleyRosenblum 3acda8e
typo
WesleyRosenblum 9929b59
combine tests
WesleyRosenblum 718e949
more comments
WesleyRosenblum c50665f
more comments
WesleyRosenblum 2ab1ac9
putting default back
WesleyRosenblum 24e9669
format
WesleyRosenblum ee4aa52
update nightly
WesleyRosenblum 4f21ca4
fix test due to new s2n-tls version
WesleyRosenblum c8be648
remove unused snapshot
WesleyRosenblum d693c5a
Update tests.rs
WesleyRosenblum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -853,13 +853,18 @@ impl TransportParameterValidator for MaxAckDelay { | |
| //# active connection migration (Section 9) on the address being used | ||
| //# during the handshake. | ||
|
|
||
| #[derive(Clone, Copy, Debug, Default, PartialEq)] | ||
| #[derive(Clone, Copy, Debug, PartialEq)] | ||
| pub enum MigrationSupport { | ||
| #[default] | ||
|
Comment on lines
856
to
858
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did we need to change this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Enabled, | ||
| Disabled, | ||
| } | ||
|
|
||
| impl MigrationSupport { | ||
| pub const fn default() -> Self { | ||
| MigrationSupport::Enabled | ||
| } | ||
| } | ||
|
|
||
| impl TransportParameter for MigrationSupport { | ||
| type CodecValue = (); | ||
toidiu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
@@ -878,7 +883,7 @@ impl TransportParameter for MigrationSupport { | |
| } | ||
|
|
||
| fn default_value() -> Self { | ||
| MigrationSupport::Enabled | ||
| Self::default() | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -1462,5 +1467,6 @@ impl< | |
| load!(ack_delay_exponent, ack_delay_exponent); | ||
| load!(max_active_connection_ids, active_connection_id_limit); | ||
| load!(max_datagram_frame_size, max_datagram_frame_size); | ||
| load!(migration_support, migration_support); | ||
| } | ||
| } | ||
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
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
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
7 changes: 7 additions & 0 deletions
7
...c-transport__src__path__manager__tests__events__active_connection_migration_disabled.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| source: quic/s2n-quic-transport/src/path/manager/tests.rs | ||
| expression: "" | ||
| --- | ||
| ConnectionIdUpdated { path_id: 0, cid_consumer: Local, previous: 0x01, current: 0x69643032 } | ||
| PathCreated { active: Path { local_addr: 0.0.0.0:0, local_cid: 0x4c6f63616c4900000000000000004c6f63616c49, remote_addr: 127.0.0.1:1, remote_cid: 0x69643032, id: 0, is_active: true }, new: Path { local_addr: 0.0.0.0:0, local_cid: 0x69643032, remote_addr: 127.0.0.2:1, remote_cid: 0x69643033, id: 1, is_active: false } } | ||
| MtuUpdated { path_id: 1, mtu: 1200, cause: NewPath } |
6 changes: 6 additions & 0 deletions
6
...path__manager__tests__events__active_connection_migration_disabled_passive_migration.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| source: quic/s2n-quic-transport/src/path/manager/tests.rs | ||
| expression: "" | ||
| --- | ||
| PathCreated { active: Path { local_addr: 0.0.0.0:0, local_cid: 0x4c6f63616c4900000000000000004c6f63616c49, remote_addr: 127.0.0.1:1, remote_cid: 0x01, id: 0, is_active: true }, new: Path { local_addr: 0.0.0.0:0, local_cid: 0x4c6f63616c4900000000000000004c6f63616c49, remote_addr: 127.0.0.2:1, remote_cid: 0x01, id: 1, is_active: false } } | ||
| MtuUpdated { path_id: 1, mtu: 1200, cause: NewPath } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to expose a non-exhaustive enum here instead if its functionally equivalent?
Imagining a wild future where this gets expanded to other values (maybe not):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to call this
with_active_connection_migration, since we're not completely disabling migration, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I went back and forth on that a bit. I think I ended up on thinking that the application shouldn't be too concerned about "passive" connection migration, so I left the "active" out of it. But thinking about it, its more obviously related to the
disable_active_migrationtransport parameter with active in it, so I can add itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the wild future you are talking about @toidiu, I think at that point we would have to stabilize the path migration validator and add more of the configuration in there. This one is really tied to the transport parameter, which doesn't have any of that configurability