Skip to content

Commit

Permalink
Clean up alwaysPTOMultiple
Browse files Browse the repository at this point in the history
Summary: No longer needed

Reviewed By: kvtsoy

Differential Revision: D64730204

fbshipit-source-id: 260e07f82bb8699d7aa94c0e2eaf727828a6d5e8
  • Loading branch information
Crystal Jin authored and facebook-github-bot committed Oct 23, 2024
1 parent 6875e7c commit 0912ed3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
7 changes: 0 additions & 7 deletions quic/loss/QuicLossFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,6 @@ void onPTOAlarm(QuicConnectionStateBase& conn) {
packetCount[PacketNumberSpace::AppData];
}
}
if (conn.transportSettings.alwaysPtoMultiple) {
for (auto& numProbes : numProbePackets) {
if (numProbes > 0) {
numProbes = kPacketToSendForPTO;
}
}
}
}

template <class T, size_t N>
Expand Down
27 changes: 0 additions & 27 deletions quic/loss/test/QuicLossFunctionsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1325,33 +1325,6 @@ TEST_F(QuicLossFunctionsTest, PTOAvoidPointless) {
EXPECT_EQ(conn->pendingEvents.numProbePackets[PacketNumberSpace::AppData], 1);
}

TEST_F(QuicLossFunctionsTest, PTOAlwaysSendTwo) {
// If there is no lost data and the outstanding data is less than the
// kPacketToSendForPTO packets, send only the available outstanding count.
auto conn = createConn();
conn->transportSettings.alwaysPtoMultiple = true;

conn->initialWriteCipher = createNoOpAead();
conn->initialHeaderCipher = createNoOpHeaderCipher();

conn->handshakeWriteCipher = createNoOpAead();
conn->handshakeWriteHeaderCipher = createNoOpHeaderCipher();

conn->oneRttWriteCipher = createNoOpAead();
conn->oneRttWriteHeaderCipher = createNoOpHeaderCipher();

conn->outstandings.packetCount[PacketNumberSpace::Initial] = 1;
conn->outstandings.packetCount[PacketNumberSpace::Handshake] = 1;
conn->outstandings.packetCount[PacketNumberSpace::AppData] = 1;

onPTOAlarm(*conn);

EXPECT_EQ(conn->pendingEvents.numProbePackets[PacketNumberSpace::Initial], 2);
EXPECT_EQ(
conn->pendingEvents.numProbePackets[PacketNumberSpace::Handshake], 2);
EXPECT_EQ(conn->pendingEvents.numProbePackets[PacketNumberSpace::AppData], 2);
}

TEST_F(QuicLossFunctionsTest, EmptyOutstandingNoTimeout) {
auto conn = createConn();
EXPECT_CALL(timeout, cancelLossTimeout()).Times(1);
Expand Down
2 changes: 0 additions & 2 deletions quic/state/TransportSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,6 @@ struct TransportSettings {
// receiving and then processing.
bool networkDataPerSocketRead{false};
bool cloneAllPacketsWithCryptoFrame{false};
// Always send multiple PTOs even if we don't have multiple packets.
bool alwaysPtoMultiple{false};
// Use a reordering threshold heuristic of inflight / 2.
bool useInflightReorderingThreshold{false};
// Raise read callbacks for all unidirectional streams first on data
Expand Down

0 comments on commit 0912ed3

Please sign in to comment.