Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QUICHE from 50f15e7a5 to cf1588207 #20154

Merged
merged 1 commit into from
Mar 1, 2022
Merged
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
6 changes: 3 additions & 3 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion source/common/quic/active_quic_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
1 change: 0 additions & 1 deletion source/common/quic/client_connection_factory_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ std::unique_ptr<Network::ClientConnection> createQuicNetworkConnection(
Network::Address::InstanceConstSharedPtr server_addr,
Network::Address::InstanceConstSharedPtr local_addr, QuicStatNames& quic_stat_names,
OptRef<Http::AlternateProtocolsCache> rtt_cache, Stats::Scope& scope) {
ASSERT(GetQuicReloadableFlag(quic_single_ack_in_packet2));
ASSERT(crypto_config != nullptr);
PersistentQuicInfoImpl* info_impl = reinterpret_cast<PersistentQuicInfoImpl*>(&info);
quic::ParsedQuicVersionVector quic_versions = quic::CurrentSupportedHttp3Versions();
Expand Down
2 changes: 0 additions & 2 deletions source/common/quic/platform/quiche_flags_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ absl::flat_hash_map<absl::string_view, Flag*> 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);

Expand Down
24 changes: 13 additions & 11 deletions source/common/quic/platform/quiche_mem_slice_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@

namespace quiche {

QuicheMemSliceImpl::QuicheMemSliceImpl(quic::QuicUniqueBufferPtr buffer, size_t length)
: fragment_(std::make_unique<Envoy::Buffer::BufferFragmentImpl>(
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<Envoy::Buffer::BufferFragmentImpl>(
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<char*>(static_cast<const char*>(p)));
})) {
buffer.release();
quic::QuicBufferDeleter deleter(allocator);
deleter(const_cast<char*>(static_cast<const char*>(p)));
});
buffer_ptr.release();
single_slice_buffer_.addBufferFragment(*fragment_);
ASSERT(this->length() == length);
}
Expand Down
2 changes: 1 addition & 1 deletion source/common/quic/platform/quiche_mem_slice_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<char[]> buffer, size_t length);

// Constructs a QuicheMemSliceImpl from a Buffer::Instance with first |length| bytes in it.
Expand Down
1 change: 0 additions & 1 deletion test/common/quic/envoy_quic_client_stream_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<EnvoyQuicClientStream>(quic_stream_));
Expand Down