1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-30 14:43:05 +03:00

If an initial packet is written, its padding should be allowed to bypass the cwnd

Summary:
When 0-rtt is used and an initial packet is lost, the retransmission of this packet may end up shorter than allowed because the padding frames are subject to the cwnd.

This change makes the padding of initial packets not subject to the cwnd.

Reviewed By: mjoras

Differential Revision: D39594390

fbshipit-source-id: 2d714c921f243f8a59577a6edaaeaa1c7e2be815
This commit is contained in:
Joseph Beshay
2022-09-19 17:39:32 -07:00
committed by Facebook GitHub Bot
parent 98862d60f8
commit 9b3a6c0249
2 changed files with 3 additions and 3 deletions

View File

@ -308,7 +308,7 @@ SchedulingResult FrameScheduler::scheduleFramesForPacket(
longHeader && longHeader->getHeaderType() == LongHeader::Types::Initial;
if (initialPacket) {
// This is the initial packet, we need to fill er up.
while (wrapper.remainingSpaceInPkt() > 0) {
while (builder.remainingSpaceInPkt() > 0) {
writeFrame(PaddingFrame(), builder);
}
}

View File

@ -227,7 +227,7 @@ TEST_F(QuicPacketSchedulerTest, PaddingInitialPureAcks) {
EXPECT_EQ(conn.udpSendPacketLen, packetLength);
}
TEST_F(QuicPacketSchedulerTest, PaddingUpToWrapperSize) {
TEST_F(QuicPacketSchedulerTest, InitialPaddingDoesNotUseWrapper) {
QuicClientConnectionState conn(
FizzClientQuicHandshakeContext::Builder().build());
auto connId = getTestConnectionId();
@ -258,7 +258,7 @@ TEST_F(QuicPacketSchedulerTest, PaddingUpToWrapperSize) {
std::move(builder), conn.udpSendPacketLen - cipherOverhead);
auto packetLength = result.packet->header->computeChainDataLength() +
result.packet->body->computeChainDataLength();
EXPECT_EQ(conn.udpSendPacketLen - cipherOverhead, packetLength);
EXPECT_EQ(conn.udpSendPacketLen, packetLength);
}
TEST_F(QuicPacketSchedulerTest, CryptoServerInitialPadded) {