Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Beyad <abeyad@google.com>
  • Loading branch information
abeyad committed Mar 7, 2024
1 parent aa4381f commit 1a97508
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ minor_behavior_changes:
Use GRO (Generic Receive Offload) for reading packets from a client QUIC UDP socket. See
https://www.kernel.org/doc/html/next/networking/segmentation-offloads.html for a description of
GRO. This behavior change can be reverted by setting
``envoy.restart_features.prefer_quic_client_udp_gro`` to ``false``.
``envoy.reloadable_features.prefer_quic_client_udp_gro`` to ``false``.
bug_fixes:
# *Changes expected to improve the state of the world and are unlikely to have negative effects*
Expand Down
2 changes: 1 addition & 1 deletion source/common/quic/client_connection_factory_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ std::unique_ptr<Network::ClientConnection> createQuicNetworkConnection(
auto connection = std::make_unique<EnvoyQuicClientConnection>(
quic::QuicUtils::CreateRandomConnectionId(), server_addr, info_impl->conn_helper_,
info_impl->alarm_factory_, quic_versions, local_addr, dispatcher, options, generator,
Runtime::runtimeFeatureEnabled("envoy.restart_features.prefer_quic_client_udp_gro"));
Runtime::runtimeFeatureEnabled("envoy.reloadable_features.prefer_quic_client_udp_gro"));

// TODO (danzh) move this temporary config and initial RTT configuration to h3 pool.
quic::QuicConfig config = info_impl->quic_config_;
Expand Down
2 changes: 1 addition & 1 deletion source/common/runtime/runtime_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ RUNTIME_GUARD(envoy_reloadable_features_oauth_make_token_cookie_httponly);
RUNTIME_GUARD(envoy_reloadable_features_oauth_use_standard_max_age_value);
RUNTIME_GUARD(envoy_reloadable_features_oauth_use_url_encoding);
RUNTIME_GUARD(envoy_reloadable_features_original_dst_rely_on_idle_timeout);
RUNTIME_GUARD(envoy_reloadable_features_prefer_quic_client_udp_gro);
RUNTIME_GUARD(envoy_reloadable_features_proxy_status_mapping_more_core_response_flags);
RUNTIME_GUARD(envoy_reloadable_features_proxy_status_upstream_request_timeout);
RUNTIME_GUARD(envoy_reloadable_features_quic_fix_filter_manager_uaf);
Expand Down Expand Up @@ -103,7 +104,6 @@ RUNTIME_GUARD(envoy_reloadable_features_validate_connect);
RUNTIME_GUARD(envoy_reloadable_features_validate_grpc_header_before_log_grpc_status);
RUNTIME_GUARD(envoy_reloadable_features_validate_upstream_headers);
RUNTIME_GUARD(envoy_restart_features_allow_client_socket_creation_failure);
RUNTIME_GUARD(envoy_restart_features_prefer_quic_client_udp_gro);
RUNTIME_GUARD(envoy_restart_features_quic_handle_certs_with_shared_tls_code);
RUNTIME_GUARD(envoy_restart_features_send_goaway_for_premature_rst_streams);
RUNTIME_GUARD(envoy_restart_features_udp_read_normalize_addresses);
Expand Down
9 changes: 6 additions & 3 deletions test/common/quic/envoy_quic_client_session_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,11 @@ class MockOsSysCallsImpl : public Api::OsSysCallsImpl {

// Ensures that the Network::Utility::readFromSocket function uses GRO.
// Only Linux platforms support GRO.
#if defined(__linux__)
TEST_P(EnvoyQuicClientSessionTest, UsesUdpGro) {
if (!Api::OsSysCallsSingleton::get().supportsUdpGro()) {
GTEST_SKIP() << "Platform doesn't support GRO.";
}

NiceMock<MockOsSysCallsImpl> os_sys_calls_;
TestThreadsafeSingletonInjector<Api::OsSysCallsImpl> singleton_injector_{&os_sys_calls_};

Expand Down Expand Up @@ -544,9 +547,9 @@ TEST_P(EnvoyQuicClientSessionTest, UsesUdpGro) {

peer_socket_->ioHandle().sendmsg(&slice, 1, 0, peer_addr_->ip(), *self_addr_);

dispatcher_->run(Event::Dispatcher::RunType::RunUntilExit);
EXPECT_LOG_CONTAINS("trace", "starting gro recvmsg with max",
dispatcher_->run(Event::Dispatcher::RunType::RunUntilExit));
}
#endif

} // namespace Quic
} // namespace Envoy

0 comments on commit 1a97508

Please sign in to comment.