Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion api/envoy/config/core/v3/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ message QuicKeepAliveSettings {
}

// QUIC protocol options which apply to both downstream and upstream connections.
// [#next-free-field: 12]
// [#next-free-field: 13]
message QuicProtocolOptions {
// Config for QUIC connection migration across network interfaces, i.e. cellular to WIFI, upon
// network change events from the platform, i.e. the current network gets
Expand Down Expand Up @@ -173,6 +173,12 @@ message QuicProtocolOptions {
// If absent, the feature will be disabled.
// [#not-implemented-hide:]
ConnectionMigrationSettings connection_migration = 11;

// Timeout for a QUIC connection to schedule memory reduction callback when the network has been idle for a while.
// This value should be smaller than the idle timeout to take effect.
// If not specified, memory reduction is set to infinite by QUIC connection (disabled).
google.protobuf.Duration memory_reduction_timeout = 12
[(validate.rules).duration = {gte {seconds: 1}}];
}

message UpstreamHttpProtocolOptions {
Expand Down
8 changes: 8 additions & 0 deletions source/common/quic/envoy_quic_server_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ void EnvoyQuicServerSession::setHttp3Options(
}
}
}
if (http3_options.has_quic_protocol_options()) {
const uint64_t memory_reduction_timeout_ms = PROTOBUF_GET_MS_OR_DEFAULT(
http3_options.quic_protocol_options(), memory_reduction_timeout, 0);
if (memory_reduction_timeout_ms > 0) {
connection()->SetMemoryReductionTimeout(
quic::QuicTime::Delta::FromMilliseconds(memory_reduction_timeout_ms));
}
}
set_allow_extended_connect(http3_options_->allow_extended_connect());
if (http3_options_->disable_qpack()) {
DisableHuffmanEncoding();
Expand Down
Loading