From 8e9969c0febcd9f1d7de4b6d65f33ae2b224c04a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:01:30 -0700 Subject: [PATCH] v1.18: quic server: set initial window to PACKET_DATA_SIZE (backport of #905) (#971) quic server: set initial window to PACKET_DATA_SIZE (#905) Start small so spam doesn't use too many resources. Then we grow the window once we figure out a connection's stake. (cherry picked from commit 1c28671ecbde6029e62a105bec401322dbe3739c) Co-authored-by: Alessandro Decina --- streamer/src/quic.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/streamer/src/quic.rs b/streamer/src/quic.rs index 177bfdc7975c6e..e9f3a2c574a517 100644 --- a/streamer/src/quic.rs +++ b/streamer/src/quic.rs @@ -85,11 +85,7 @@ pub(crate) fn configure_server( (QUIC_MAX_UNSTAKED_CONCURRENT_STREAMS.saturating_mul(2)) as u32; config.max_concurrent_uni_streams(MAX_CONCURRENT_UNI_STREAMS.into()); config.stream_receive_window((PACKET_DATA_SIZE as u32).into()); - config.receive_window( - (PACKET_DATA_SIZE as u32) - .saturating_mul(MAX_CONCURRENT_UNI_STREAMS) - .into(), - ); + config.receive_window((PACKET_DATA_SIZE as u32).into()); let timeout = IdleTimeout::try_from(QUIC_MAX_TIMEOUT).unwrap(); config.max_idle_timeout(Some(timeout));