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

Ship short header padding

Summary:
QE result post: https://fb.workplace.com/groups/646964542156536/permalink/1989360141250296/

We are going ahead with shipping this, with a default value of 32 for paddingModulo.

Leaving the transport knob settings still in place in case vips want to selectively disable the feature (not sure if that is the proper way to config that but I think so it is?)

Reviewed By: mjoras

Differential Revision: D34596608

fbshipit-source-id: 5603bb391113c29830f43a67e73c0f50154dcca1
This commit is contained in:
Kyle Mirzakhanian
2022-03-23 19:27:50 -07:00
committed by Facebook GitHub Bot
parent c45ad1915e
commit 777f776784
5 changed files with 56 additions and 15 deletions

View File

@ -87,6 +87,17 @@ void writeCryptoDataProbesToSocketForTest(
version);
}
RegularQuicWritePacket stripPaddingFrames(RegularQuicWritePacket packet) {
SmallVec<QuicWriteFrame, 4, uint16_t> trimmedFrames{};
for (auto frame : packet.frames) {
if (!frame.asPaddingFrame()) {
trimmedFrames.push_back(frame);
}
}
packet.frames = trimmedFrames;
return packet;
}
auto buildEmptyPacket(
QuicServerConnectionState& conn,
PacketNumberSpace pnSpace,
@ -4018,7 +4029,8 @@ TEST_F(QuicTransportFunctionsTest, ProbeWriteNewFunctionalFrames) {
getVersion(*conn),
1 /* limit to 1 packet */);
EXPECT_EQ(2, conn->outstandings.packets.size());
EXPECT_EQ(1, conn->outstandings.packets[1].packet.frames.size());
auto packet = stripPaddingFrames(conn->outstandings.packets[1].packet);
EXPECT_EQ(1, packet.frames.size());
EXPECT_EQ(
QuicWriteFrame::Type::MaxDataFrame,
conn->outstandings.packets[1].packet.frames[0].type());