Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion api/envoy/config/listener/v3/quic_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: QUIC listener config]

// Configuration specific to the UDP QUIC listener.
// [#next-free-field: 14]
// [#next-free-field: 15]
message QuicProtocolOptions {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.listener.QuicProtocolOptions";
Expand Down Expand Up @@ -99,4 +99,6 @@ message QuicProtocolOptions {
// QUIC layer by replying with an empty version negotiation packet to the
// client.
bool reject_new_connections = 13;

google.protobuf.UInt32Value max_sessions_per_event_loop = 14 [(validate.rules).uint32 = {gt: 0}];
}
3 changes: 2 additions & 1 deletion source/common/quic/active_quic_listener.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "source/common/quic/active_quic_listener.h"

#include <ratio>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -199,7 +200,7 @@ void ActiveQuicListener::onReadReady() {
}

quic_dispatcher_->ProcessBufferedChlos(kNumSessionsToCreatePerLoop);

ENVOY_LOG(info, "number of sessions to create per loop: {}", kNumSessionsToCreatePerLoop);
// If there were more buffered than the limit, schedule again for the next event loop.
if (quic_dispatcher_->HasChlosBuffered()) {
udp_listener_->activateRead();
Expand Down
2 changes: 1 addition & 1 deletion source/common/quic/active_quic_listener.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ActiveQuicListener : public Envoy::Server::ActiveUdpListenerBase,
Logger::Loggable<Logger::Id::quic> {
public:
// TODO(bencebeky): Tune this value.
static const size_t kNumSessionsToCreatePerLoop = 16;
static constexpr size_t kNumSessionsToCreatePerLoop = 16;

ActiveQuicListener(Runtime::Loader& runtime, uint32_t worker_index, uint32_t concurrency,
Event::Dispatcher& dispatcher, Network::UdpConnectionHandler& parent,
Expand Down
Loading