1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-06 22:22:38 +03:00

Skip a packet number for Quic probe packets

Summary: to elicit acks

Reviewed By: mjoras

Differential Revision: D21309835

fbshipit-source-id: fd56de66c806d5e03292298c79eab49014291b75
This commit is contained in:
Yang Chi
2020-05-08 11:38:17 -07:00
committed by Facebook GitHub Bot
parent e069693c74
commit 46b9fb69f4
2 changed files with 9 additions and 2 deletions

View File

@@ -1084,6 +1084,8 @@ uint64_t writeProbingDataToSocket(
const Aead& aead,
const PacketNumberCipher& headerCipher,
QuicVersion version) {
// Skip a packet number for probing packets to elicit acks
increaseNextPacketNum(connection, pnSpace);
CloningScheduler cloningScheduler(
scheduler, connection, "CloningScheduler", aead.getCipherOverhead());
auto written = writeConnectionDataToSocket(

View File

@@ -1384,6 +1384,9 @@ TEST_F(QuicTransportFunctionsTest, WriteProbingNewData) {
*rawSocket, *conn, 1, *aead, *headerCipher, getVersion(*conn));
EXPECT_LT(currentPacketSeqNum, conn->ackStates.appDataAckState.nextPacketNum);
EXPECT_FALSE(conn->outstandingPackets.empty());
EXPECT_EQ(
conn->outstandingPackets.back().packet.header.getPacketSequenceNum(),
currentPacketSeqNum + 1);
EXPECT_TRUE(conn->pendingEvents.setLossDetectionAlarm);
EXPECT_GT(stream1->currentWriteOffset, currentStreamWriteOffset);
EXPECT_FALSE(stream1->retransmissionBuffer.empty());
@@ -1505,7 +1508,8 @@ TEST_F(QuicTransportFunctionsTest, WriteProbesNoNewDataNoCryptoDataNoOldData) {
*headerCipher,
getVersion(*conn)));
EXPECT_EQ(1, probesToSend);
EXPECT_EQ(currentPacketSeqNum, conn->ackStates.appDataAckState.nextPacketNum);
EXPECT_EQ(
currentPacketSeqNum + 1, conn->ackStates.appDataAckState.nextPacketNum);
EXPECT_TRUE(conn->outstandingPackets.empty());
EXPECT_FALSE(conn->pendingEvents.setLossDetectionAlarm);
EXPECT_EQ(stream1->currentWriteOffset, currentStreamWriteOffset);
@@ -1546,7 +1550,8 @@ TEST_F(QuicTransportFunctionsTest, ProbingNotWriteOtherFrames) {
*headerCipher,
getVersion(*conn)));
EXPECT_EQ(1, probesToSend);
EXPECT_EQ(currentPacketSeqNum, conn->ackStates.appDataAckState.nextPacketNum);
EXPECT_EQ(
currentPacketSeqNum + 1, conn->ackStates.appDataAckState.nextPacketNum);
EXPECT_TRUE(conn->outstandingPackets.empty());
EXPECT_FALSE(conn->pendingEvents.setLossDetectionAlarm);
EXPECT_EQ(stream1->currentWriteOffset, currentStreamWriteOffset);