From 7dcba009f51bfc63070ac8ae2ded46a0bb347157 Mon Sep 17 00:00:00 2001 From: Alyssa Wilk Date: Tue, 1 Mar 2022 10:51:35 -0500 Subject: [PATCH] Update QUICHE from 50f15e7a5 to cf1588207 https://github.com/google/quiche/compare/50f15e7a5..cf1588207 $ git log 50f15e7a5..cf1588207 --date=short --no-merges --format="%ad %al %s" 2022-02-28 wub Deprecate --gfe2_reloadable_flag_quic_crypto_noop_if_disconnected_after_process_chlo. 2022-02-27 vasilvv Remove QuicheMemSlice(QuicUniqueBufferPtr, size_t) constructor. 2022-02-26 fayang Use std::string instead of absl::string_view in CryptoBufferMap. 2022-02-25 bnc Ignore incoming HTTP/3 MAX_PUSH_ID frames. 2022-02-25 bnc Remove Http3DebugVisitor::OnMaxPushIdFrameSent(). 2022-02-25 bnc Remove QuicSpdySession::CanCreatePushStreamWithId(). 2022-02-25 fayang Deprecate gfe2_reloadable_flag_quic_single_ack_in_packet2. Signed-off-by: Alyssa Wilk --- bazel/repository_locations.bzl | 6 ++--- source/common/quic/active_quic_listener.cc | 1 - .../quic/client_connection_factory_impl.cc | 1 - .../common/quic/platform/quiche_flags_impl.cc | 2 -- .../quic/platform/quiche_mem_slice_impl.cc | 24 ++++++++++--------- .../quic/platform/quiche_mem_slice_impl.h | 2 +- .../quic/envoy_quic_client_stream_test.cc | 1 - 7 files changed, 17 insertions(+), 20 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index bfc38797f8ad..efa24cb15710 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -824,12 +824,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "QUICHE", project_desc = "QUICHE (QUIC, HTTP/2, Etc) is Google‘s implementation of QUIC and related protocols", project_url = "https://github.com/google/quiche", - version = "50f15e7a5655ed94e369ea62de0702822a3ad91e", - sha256 = "5997844144628bf4b9dbe53bb438a081ebc4e03d62af213ee20806faf1ee5fef", + version = "cf1588207faa6771333052330846acd0c45a045c", + sha256 = "c4f61b07c2f061f8d4669b88fd9a5eb19f2d407b0b0912f5feac1f149ad6f390", urls = ["https://github.com/google/quiche/archive/{version}.tar.gz"], strip_prefix = "quiche-{version}", use_category = ["dataplane_core"], - release_date = "2022-02-25", + release_date = "2022-02-28", cpe = "N/A", ), com_googlesource_googleurl = dict( diff --git a/source/common/quic/active_quic_listener.cc b/source/common/quic/active_quic_listener.cc index 92d7c723ce5d..8243316c61c3 100644 --- a/source/common/quic/active_quic_listener.cc +++ b/source/common/quic/active_quic_listener.cc @@ -56,7 +56,6 @@ ActiveQuicListener::ActiveQuicListener( kernel_worker_routing_(kernel_worker_routing), packets_to_read_to_connection_count_ratio_(packets_to_read_to_connection_count_ratio), crypto_server_stream_factory_(crypto_server_stream_factory) { - ASSERT(GetQuicReloadableFlag(quic_single_ack_in_packet2)); ASSERT(!GetQuicFlag(FLAGS_quic_header_size_limit_includes_overhead)); if (Runtime::LoaderSingleton::getExisting()) { diff --git a/source/common/quic/client_connection_factory_impl.cc b/source/common/quic/client_connection_factory_impl.cc index 1fd7bbf5b6a3..aab72a68533b 100644 --- a/source/common/quic/client_connection_factory_impl.cc +++ b/source/common/quic/client_connection_factory_impl.cc @@ -31,7 +31,6 @@ std::unique_ptr createQuicNetworkConnection( Network::Address::InstanceConstSharedPtr server_addr, Network::Address::InstanceConstSharedPtr local_addr, QuicStatNames& quic_stat_names, OptRef rtt_cache, Stats::Scope& scope) { - ASSERT(GetQuicReloadableFlag(quic_single_ack_in_packet2)); ASSERT(crypto_config != nullptr); PersistentQuicInfoImpl* info_impl = reinterpret_cast(&info); quic::ParsedQuicVersionVector quic_versions = quic::CurrentSupportedHttp3Versions(); diff --git a/source/common/quic/platform/quiche_flags_impl.cc b/source/common/quic/platform/quiche_flags_impl.cc index a4185cc7069d..73710d23254d 100644 --- a/source/common/quic/platform/quiche_flags_impl.cc +++ b/source/common/quic/platform/quiche_flags_impl.cc @@ -35,8 +35,6 @@ absl::flat_hash_map makeFlagMap() { // Envoy only supports RFC-v1 in the long term, so disable IETF draft 29 implementation by // default. FLAGS_quic_reloadable_flag_quic_disable_version_draft_29->setValue(true); - // This flag fixes a QUICHE issue which may crash Envoy during connection close. - FLAGS_quic_reloadable_flag_quic_single_ack_in_packet2->setValue(true); // This flag enables BBR, otherwise QUIC will use Cubic which is less performant. FLAGS_quic_reloadable_flag_quic_default_to_bbr->setValue(true); diff --git a/source/common/quic/platform/quiche_mem_slice_impl.cc b/source/common/quic/platform/quiche_mem_slice_impl.cc index 3062835a4d66..020901925a7a 100644 --- a/source/common/quic/platform/quiche_mem_slice_impl.cc +++ b/source/common/quic/platform/quiche_mem_slice_impl.cc @@ -12,18 +12,20 @@ namespace quiche { -QuicheMemSliceImpl::QuicheMemSliceImpl(quic::QuicUniqueBufferPtr buffer, size_t length) - : fragment_(std::make_unique( - buffer.get(), length, - // TODO(danzh) change the buffer fragment constructor to take the lambda by move instead - // of copy, so that the ownership of |buffer| can be transferred to lambda via capture - // here and below to unify and simplify the constructor implementations. - [allocator = buffer.get_deleter().allocator()](const void* p, size_t, +QuicheMemSliceImpl::QuicheMemSliceImpl(quic::QuicBuffer buffer) { + size_t length = buffer.size(); + quic::QuicUniqueBufferPtr buffer_ptr = buffer.Release(); + fragment_ = std::make_unique( + buffer_ptr.get(), length, + // TODO(danzh) change the buffer fragment constructor to take the lambda by move instead + // of copy, so that the ownership of |buffer| can be transferred to lambda via capture + // here and below to unify and simplify the constructor implementations. + [allocator = buffer_ptr.get_deleter().allocator()](const void* p, size_t, const Envoy::Buffer::BufferFragmentImpl*) { - quic::QuicBufferDeleter deleter(allocator); - deleter(const_cast(static_cast(p))); - })) { - buffer.release(); + quic::QuicBufferDeleter deleter(allocator); + deleter(const_cast(static_cast(p))); + }); + buffer_ptr.release(); single_slice_buffer_.addBufferFragment(*fragment_); ASSERT(this->length() == length); } diff --git a/source/common/quic/platform/quiche_mem_slice_impl.h b/source/common/quic/platform/quiche_mem_slice_impl.h index b1582a8f746a..3ebfd973de13 100644 --- a/source/common/quic/platform/quiche_mem_slice_impl.h +++ b/source/common/quic/platform/quiche_mem_slice_impl.h @@ -26,7 +26,7 @@ class QuicheMemSliceImpl { ~QuicheMemSliceImpl(); // Constructs a QuicheMemSliceImpl by taking ownership of the memory in |buffer|. - QuicheMemSliceImpl(quic::QuicUniqueBufferPtr buffer, size_t length); + QuicheMemSliceImpl(quic::QuicBuffer buffer); QuicheMemSliceImpl(std::unique_ptr buffer, size_t length); // Constructs a QuicheMemSliceImpl from a Buffer::Instance with first |length| bytes in it. diff --git a/test/common/quic/envoy_quic_client_stream_test.cc b/test/common/quic/envoy_quic_client_stream_test.cc index 9a33dcd17785..b1a45dc0cdbb 100644 --- a/test/common/quic/envoy_quic_client_stream_test.cc +++ b/test/common/quic/envoy_quic_client_stream_test.cc @@ -50,7 +50,6 @@ class EnvoyQuicClientStreamTest : public testing::Test { stats_, http3_options_)), request_headers_{{":authority", host_}, {":method", "POST"}, {":path", "/"}}, request_trailers_{{"trailer-key", "trailer-value"}} { - SetQuicReloadableFlag(quic_single_ack_in_packet2, false); quic_stream_->setResponseDecoder(stream_decoder_); quic_stream_->addCallbacks(stream_callbacks_); quic_session_.ActivateStream(std::unique_ptr(quic_stream_));