Internal change
PiperOrigin-RevId: 398825052
diff --git a/quic/core/congestion_control/bbr2_simulator_test.cc b/quic/core/congestion_control/bbr2_simulator_test.cc
index ca88157..4c32ee0 100644
--- a/quic/core/congestion_control/bbr2_simulator_test.cc
+++ b/quic/core/congestion_control/bbr2_simulator_test.cc
@@ -202,6 +202,8 @@
GetQuicFlag(FLAGS_quic_max_congestion_window), &random_,
QuicConnectionPeer::GetStats(endpoint->connection()), old_sender);
QuicConnectionPeer::SetSendAlgorithm(endpoint->connection(), sender);
+ const int kTestMaxPacketSize = 1350;
+ endpoint->connection()->SetMaxPacketLength(kTestMaxPacketSize);
endpoint->RecordTrace();
return sender;
}
diff --git a/quic/core/congestion_control/bbr_sender_test.cc b/quic/core/congestion_control/bbr_sender_test.cc
index ca2adbd..ed57eb4 100644
--- a/quic/core/congestion_control/bbr_sender_test.cc
+++ b/quic/core/congestion_control/bbr_sender_test.cc
@@ -110,6 +110,8 @@
receiver_multiplexer_("Receiver multiplexer",
{&receiver_, &competing_receiver_}) {
rtt_stats_ = bbr_sender_.connection()->sent_packet_manager().GetRttStats();
+ const int kTestMaxPacketSize = 1350;
+ bbr_sender_.connection()->SetMaxPacketLength(kTestMaxPacketSize);
sender_ = SetupBbrSender(&bbr_sender_);
if (GetQuicReloadableFlag(
quic_bbr_start_new_aggregation_epoch_after_a_full_round)) {
diff --git a/quic/core/congestion_control/send_algorithm_test.cc b/quic/core/congestion_control/send_algorithm_test.cc
index 4272c0b..d4c6070 100644
--- a/quic/core/congestion_control/send_algorithm_test.cc
+++ b/quic/core/congestion_control/send_algorithm_test.cc
@@ -175,6 +175,8 @@
quic_sender_.RecordTrace();
QuicConnectionPeer::SetSendAlgorithm(quic_sender_.connection(), sender_);
+ const int kTestMaxPacketSize = 1350;
+ quic_sender_.connection()->SetMaxPacketLength(kTestMaxPacketSize);
clock_ = simulator_.GetClock();
simulator_.set_random_generator(&random_);
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 789baaf..e525fd1 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -2796,7 +2796,7 @@
TEST_P(QuicConnectionTest, MaxPacketSize) {
EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
- EXPECT_EQ(1350u, connection_.max_packet_length());
+ EXPECT_EQ(1250u, connection_.max_packet_length());
}
TEST_P(QuicConnectionTest, PeerLowersMaxPacketSize) {
@@ -3775,7 +3775,7 @@
EXPECT_TRUE(connection_.HasPendingAcks());
// Send data and ensure the ack is bundled.
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(8);
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(9);
size_t len = 10000;
std::unique_ptr<char[]> data_array(new char[len]);
memset(data_array.get(), '?', len);
@@ -8884,7 +8884,7 @@
// that the encryption overhead is constant across versions.
connection_.SetEncrypter(ENCRYPTION_INITIAL,
std::make_unique<TaggingEncrypter>(0x00));
- QuicPacketLength expected_largest_payload = 1319;
+ QuicPacketLength expected_largest_payload = 1219;
if (connection_.version().SendsVariableLengthPacketNumberInLongHeader()) {
expected_largest_payload += 3;
}
@@ -8919,7 +8919,7 @@
// that the encryption overhead is constant across versions.
connection_.SetEncrypter(ENCRYPTION_INITIAL,
std::make_unique<TaggingEncrypter>(0x00));
- QuicPacketLength expected_largest_payload = 1319;
+ QuicPacketLength expected_largest_payload = 1219;
if (connection_.version().HasLongHeaderLengths()) {
expected_largest_payload -= 2;
}
@@ -12769,7 +12769,7 @@
connection_.SetEncrypter(ENCRYPTION_HANDSHAKE,
std::make_unique<TaggingEncrypter>(0x02));
connection_.SetDefaultEncryptionLevel(ENCRYPTION_HANDSHAKE);
- connection_.SendCryptoDataWithString(std::string(1300, 'a'), 0);
+ connection_.SendCryptoDataWithString(std::string(1200, 'a'), 0);
// Verify this packet is on hold.
EXPECT_EQ(0u, writer_->packets_write_attempts());
}
diff --git a/quic/core/quic_constants.h b/quic/core/quic_constants.h
index 162de89..81c60e1 100644
--- a/quic/core/quic_constants.h
+++ b/quic/core/quic_constants.h
@@ -28,7 +28,7 @@
// Default number of connections for N-connection emulation.
const uint32_t kDefaultNumConnections = 2;
// Default initial maximum size in bytes of a QUIC packet.
-const QuicByteCount kDefaultMaxPacketSize = 1350;
+const QuicByteCount kDefaultMaxPacketSize = 1250;
// Default initial maximum size in bytes of a QUIC packet for servers.
const QuicByteCount kDefaultServerMaxPacketSize = 1000;
// Maximum transmission unit on Ethernet.
diff --git a/quic/core/quic_packet_creator_test.cc b/quic/core/quic_packet_creator_test.cc
index 3dc1a4b..5538564 100644
--- a/quic/core/quic_packet_creator_test.cc
+++ b/quic/core/quic_packet_creator_test.cc
@@ -1863,7 +1863,7 @@
if (version.UsesTls()) {
creator_.SetMaxDatagramFrameSize(kMaxAcceptedDatagramFrameSize);
}
- QuicPacketLength expected_largest_payload = 1319;
+ QuicPacketLength expected_largest_payload = 1219;
if (version.HasLongHeaderLengths()) {
expected_largest_payload -= 2;
}
@@ -1914,7 +1914,7 @@
if (version.UsesTls()) {
creator_.SetMaxDatagramFrameSize(kMaxAcceptedDatagramFrameSize);
}
- QuicPacketLength expected_largest_payload = 1319;
+ QuicPacketLength expected_largest_payload = 1219;
if (version.SendsVariableLengthPacketNumberInLongHeader()) {
expected_largest_payload += 3;
}
@@ -3249,7 +3249,7 @@
// The first ConsumeData will fill the packet without flush.
creator_.SetTransmissionType(LOSS_RETRANSMISSION);
- size_t data_len = 1324;
+ size_t data_len = 1224;
CreateData(data_len);
QuicStreamId stream1_id = QuicUtils::GetFirstBidirectionalStreamId(
framer_.transport_version(), Perspective::IS_CLIENT);