summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2015-06-15 01:10:49 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-15 08:11:22 +0000
commitc454c320e4cf4821c1b5248c392f2a8714f223a4 (patch)
treebd495d6505406d357e2480b68d5f73669cf8c164 /net
parent2c6ffa64a0dcc25806d9e39efc90fb5d230b480d (diff)
downloadchromium_src-c454c320e4cf4821c1b5248c392f2a8714f223a4.zip
chromium_src-c454c320e4cf4821c1b5248c392f2a8714f223a4.tar.gz
chromium_src-c454c320e4cf4821c1b5248c392f2a8714f223a4.tar.bz2
Change Maximum number of tracked packets from 5 to 15 times
kMaxTcpCongestionWindow. The above is done to reduce the number of connections closed because of too many outstanding packets. BUG=500417 TBR=jri@chromium.org, rch@chromium.org Review URL: https://codereview.chromium.org/1184073002 Cr-Commit-Position: refs/heads/master@{#334356}
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_connection.cc2
-rw-r--r--net/quic/quic_connection_test.cc10
2 files changed, 6 insertions, 6 deletions
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 48aa7c1..2a6c48d 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -64,7 +64,7 @@ const size_t kMaxFecGroups = 2;
const QuicPacketCount kMaxPacketsReceivedBeforeAckSend = 20;
// Maximum number of tracked packets.
-const QuicPacketCount kMaxTrackedPackets = 5 * kMaxTcpCongestionWindow;
+const QuicPacketCount kMaxTrackedPackets = 15 * kMaxTcpCongestionWindow;
bool Near(QuicPacketSequenceNumber a, QuicPacketSequenceNumber b) {
QuicPacketSequenceNumber delta = (a > b) ? a - b : b - a;
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 9276f44..9ff81d9 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -1310,7 +1310,7 @@ TEST_P(QuicConnectionTest, LeastUnackedLower) {
TEST_P(QuicConnectionTest, TooManySentPackets) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- for (int i = 0; i < 1100; ++i) {
+ for (int i = 0; i < 3100; ++i) {
SendStreamDataToPeer(1, "foo", 3 * i, !kFin, nullptr);
}
@@ -1322,8 +1322,8 @@ TEST_P(QuicConnectionTest, TooManySentPackets) {
EXPECT_CALL(visitor_, OnCanWrite()).Times(0);
// Nack every packet except the last one, leaving a huge gap.
- QuicAckFrame frame1 = InitAckFrame(1100);
- for (QuicPacketSequenceNumber i = 1; i < 1100; ++i) {
+ QuicAckFrame frame1 = InitAckFrame(3100);
+ for (QuicPacketSequenceNumber i = 1; i < 3100; ++i) {
NackPacket(i, &frame1);
}
ProcessAckPacket(&frame1);
@@ -1334,8 +1334,8 @@ TEST_P(QuicConnectionTest, TooManyReceivedPackets) {
EXPECT_CALL(visitor_, OnConnectionClosed(
QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS, false));
- // Miss every other packet for 1000 packets.
- for (QuicPacketSequenceNumber i = 1; i < 1000; ++i) {
+ // Miss every other packet for 3000 packets.
+ for (QuicPacketSequenceNumber i = 1; i < 3000; ++i) {
ProcessPacket(i * 2);
if (!connection_.connected()) {
break;