Skip to content
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

feat(s2n-quic-transport): Adds stream batching functionality #2428

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

maddeleine
Copy link
Contributor

Release Summary:

Adds stream batching functionality to s2n-quic sending behavior. Stream batching is a sending strategy which provides each stream with the opportunity to fill up a packet "batch-size" times, before then passing that priority to the next stream.

Resolved issues:

N/A

Description of changes:

Adds a way for users to turn on stream batching. The current sending strategy can be described as stream batching with a size of 1 (this can be seen with the fact that all current tests pass with the default steam batch size of 1). With this change we can express batch sizes > 1.

Call-outs:

I'm not exactly pleased with the code as-is. Every interest list calls the update_interest() function, which means that if I want to change the sending behavior of only the transmission list, I need a lot of branches. I think a better solution would be to pull the transmission code out into its own codepath. But with this iteration I am trying to keep the same codepaths.

Testing:

Includes a unit test of the batching feature.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -35,6 +35,8 @@ const MAX_KEEP_ALIVE_PERIOD_DEFAULT: Duration = Duration::from_secs(30);
//# received.
pub const ANTI_AMPLIFICATION_MULTIPLIER: u8 = 3;

pub const STREAM_BURST_SIZE: u8 = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub const STREAM_BURST_SIZE: u8 = 1;
pub const DEFAULT_STREAM_BURST_SIZE: u8 = 1;

Comment on lines +148 to +149
transmission_counter: u8,
transmission_limit: u8,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a better place for these, since this struct is containing only lists

@@ -206,7 +264,7 @@ impl<S: StreamTrait> InterestLists<S> {
waiting_for_frame_delivery_link,
waiting_for_frame_delivery
);
sync_interests!(
sync_trans_interests!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it would be more intuitive to have the batching logic in stream_container::iterate_transmission_list rather in update_interests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants