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

Special treatment to d6d probe in tx/rx path via isD6DProbe flag in OutstandingPacket

Summary:
According to the spec, loss of d6d probe packet should not affect congestion
control, but AFAIU its ack should be considered a normal ack and has all the
implications of an ack (e.g. sample srtt, increment largest ack num).

Additionally, although d6d probe uses ping frame, neither sending a d6d probe
nor receiving the ack should have any bearing on either pendingEvents.sendPing
or pendingEvents.cancelPingTimeout.

To differentiate a d6d probe from a normal packet in tx/rx path, the isD6DProbe
flag is added. I also added a new struct to store d6d specific states (1 field
in this diff, more to come in subsequent diffs). In updateConnection, we
identify a d6d probe by comparing the packet sequence num with the sequence num
stored in the lastProbe field of the d6d state.

Reviewed By: mjoras

Differential Revision: D22551400

fbshipit-source-id: 85ec30c185666c3d5cf827bf03b4f92e6f22d4ec
This commit is contained in:
Xiaoting Tang
2020-09-14 16:05:23 -07:00
committed by Facebook GitHub Bot
parent b86f136376
commit 9cdb922288
8 changed files with 140 additions and 14 deletions

View File

@@ -358,6 +358,22 @@ TEST_F(QuicTransportFunctionsTest, TestUpdateConnection) {
}
}
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionD6DNotConsumeSendPing) {
auto conn = createConn();
conn->pendingEvents.sendPing = true; // Simulate application sendPing()
auto packet = buildEmptyPacket(*conn, PacketNumberSpace::AppData);
packet.packet.frames.push_back(PingFrame());
auto packetNum = packet.packet.header.getPacketSequenceNum();
conn->d6d.lastProbe = QuicConnectionStateBase::D6DProbePacket(packetNum, 50);
updateConnection(*conn, folly::none, packet.packet, Clock::now(), 50);
EXPECT_EQ(1, conn->outstandings.packets.size());
EXPECT_TRUE(conn->outstandings.packets.front().isD6DProbe);
EXPECT_EQ(1, conn->d6d.outstandingProbes);
// sendPing should still be active since d6d probe should be "hidden" from
// application
EXPECT_TRUE(conn->pendingEvents.sendPing);
}
TEST_F(QuicTransportFunctionsTest, TestUpdateConnectionPacketSorting) {
auto conn = createConn();
conn->qLogger = std::make_shared<quic::FileQLogger>(VantagePoint::Client);