-
Notifications
You must be signed in to change notification settings - Fork 5.5k
quiche: update tar #11964
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
quiche: update tar #11964
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,9 +95,9 @@ class EnvoyQuicClientSessionTest : public testing::TestWithParam<bool> { | |
| : api_(Api::createApiForTest(time_system_)), | ||
| dispatcher_(api_->allocateDispatcher("test_thread")), connection_helper_(*dispatcher_), | ||
| alarm_factory_(*dispatcher_, *connection_helper_.GetClock()), quic_version_([]() { | ||
| SetQuicReloadableFlag(quic_enable_version_draft_28, GetParam()); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_27, GetParam()); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_25_v3, GetParam()); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_29, GetParam()); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_27, GetParam()); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_25, GetParam()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| return quic::ParsedVersionOfIndex(quic::CurrentSupportedVersions(), 0); | ||
| }()), | ||
| peer_addr_(Network::Utility::getAddressWithPort(*Network::Utility::getIpv6LoopbackAddress(), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,9 +63,9 @@ class EnvoyQuicDispatcherTest : public QuicMultiVersionTest, | |
| return quic::CurrentSupportedVersionsWithQuicCrypto(); | ||
| } | ||
| bool use_http3 = GetParam().second == QuicVersionType::Iquic; | ||
| SetQuicReloadableFlag(quic_enable_version_draft_28, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_27, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_25_v3, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_29, use_http3); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_27, use_http3); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_25, use_http3); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| return quic::CurrentSupportedVersions(); | ||
| }()), | ||
| quic_version_(version_manager_.GetSupportedVersions()[0]), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,9 +54,9 @@ class QuicHttpIntegrationTest : public HttpIntegrationTest, public QuicMultiVers | |
| return quic::CurrentSupportedVersionsWithQuicCrypto(); | ||
| } | ||
| bool use_http3 = GetParam().second == QuicVersionType::Iquic; | ||
| SetQuicReloadableFlag(quic_enable_version_draft_28, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_27, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_25_v3, use_http3); | ||
| SetQuicReloadableFlag(quic_enable_version_draft_29, use_http3); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_27, !use_http3); | ||
| SetQuicReloadableFlag(quic_disable_version_draft_25, !use_http3); | ||
| return quic::CurrentSupportedVersions(); | ||
| }()), | ||
| crypto_config_(std::make_unique<EnvoyQuicFakeProofVerifier>()), conn_helper_(*dispatcher_), | ||
|
|
@@ -77,7 +77,7 @@ class QuicHttpIntegrationTest : public HttpIntegrationTest, public QuicMultiVers | |
| // TODO(danzh) Implement retry upon version mismatch and modify test frame work to specify a | ||
| // different version set on server side to test that. | ||
| auto connection = std::make_unique<EnvoyQuicClientConnection>( | ||
| getNextServerDesignatedConnectionId(), server_addr_, conn_helper_, alarm_factory_, | ||
| getNextConnectionId(), server_addr_, conn_helper_, alarm_factory_, | ||
| quic::ParsedQuicVersionVector{supported_versions_[0]}, local_addr, *dispatcher_, nullptr); | ||
| quic_connection_ = connection.get(); | ||
| auto session = std::make_unique<EnvoyQuicClientSession>( | ||
|
|
@@ -107,14 +107,13 @@ class QuicHttpIntegrationTest : public HttpIntegrationTest, public QuicMultiVers | |
| return codec; | ||
| } | ||
|
|
||
| quic::QuicConnectionId getNextServerDesignatedConnectionId() { | ||
| quic::QuicCryptoClientConfig::CachedState* cached = crypto_config_.LookupOrCreate(server_id_); | ||
| // If the cached state indicates that we should use a server-designated | ||
| // connection ID, then return that connection ID. | ||
| quic::QuicConnectionId conn_id = cached->has_server_designated_connection_id() | ||
| ? cached->GetNextServerDesignatedConnectionId() | ||
| : quic::EmptyQuicConnectionId(); | ||
| return conn_id.IsEmpty() ? quic::QuicUtils::CreateRandomConnectionId() : conn_id; | ||
| quic::QuicConnectionId getNextConnectionId() { | ||
| if (designated_connection_ids_.empty()) { | ||
| return quic::QuicUtils::CreateRandomConnectionId(); | ||
| } | ||
| quic::QuicConnectionId cid = designated_connection_ids_.front(); | ||
| designated_connection_ids_.pop_front(); | ||
| return cid; | ||
| } | ||
|
|
||
| void initialize() override { | ||
|
|
@@ -189,6 +188,7 @@ class QuicHttpIntegrationTest : public HttpIntegrationTest, public QuicMultiVers | |
| bool set_reuse_port_{false}; | ||
| const std::string injected_resource_filename_; | ||
| AtomicFileUpdater file_updater_; | ||
| std::list<quic::QuicConnectionId> designated_connection_ids_; | ||
| }; | ||
|
|
||
| INSTANTIATE_TEST_SUITE_P(QuicHttpIntegrationTests, QuicHttpIntegrationTest, | ||
|
|
@@ -290,13 +290,12 @@ TEST_P(QuicHttpIntegrationTest, MultipleQuicListenersWithBPF) { | |
| set_reuse_port_ = true; | ||
| initialize(); | ||
| std::vector<IntegrationCodecClientPtr> codec_clients; | ||
| quic::QuicCryptoClientConfig::CachedState* cached = crypto_config_.LookupOrCreate(server_id_); | ||
| for (size_t i = 1; i <= concurrency_; ++i) { | ||
| // The BPF filter looks at the 1st word of connection id in the packet | ||
| // header. And currently all QUIC versions support 8 bytes connection id. So | ||
| // create connections with the first 4 bytes of connection id different from each | ||
| // other so they should be evenly distributed. | ||
|
Comment on lines
294
to
297
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw, we have change the BPF internally to inspect the 4 bytes starting from byte 1 (0-based). You may want to do the same here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ACK. I will make another change accordingly. What's the reason behind the change? |
||
| cached->add_server_designated_connection_id(quic::test::TestConnectionId(i << 32)); | ||
| designated_connection_ids_.push_back(quic::test::TestConnectionId(i << 32)); | ||
| codec_clients.push_back(makeHttpConnection(lookupPort("http"))); | ||
| } | ||
| if (GetParam().first == Network::Address::IpVersion::v4) { | ||
|
|
@@ -333,13 +332,12 @@ TEST_P(QuicHttpIntegrationTest, MultipleQuicListenersNoBPF) { | |
| #undef SO_ATTACH_REUSEPORT_CBPF | ||
| #endif | ||
| std::vector<IntegrationCodecClientPtr> codec_clients; | ||
| quic::QuicCryptoClientConfig::CachedState* cached = crypto_config_.LookupOrCreate(server_id_); | ||
| for (size_t i = 1; i <= concurrency_; ++i) { | ||
| // The BPF filter looks at the 1st byte of connection id in the packet | ||
| // header. And currently all QUIC versions support 8 bytes connection id. So | ||
| // create connections with the first 4 bytes of connection id different from each | ||
| // other so they should be evenly distributed. | ||
| cached->add_server_designated_connection_id(quic::test::TestConnectionId(i << 32)); | ||
| designated_connection_ids_.push_back(quic::test::TestConnectionId(i << 32)); | ||
| codec_clients.push_back(makeHttpConnection(lookupPort("http"))); | ||
| } | ||
| if (GetParam().first == Network::Address::IpVersion::v4) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the two flags are quic_disable_*, it seems you meant !use_http3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done