mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Send probes for all spaces.
Summary: Previously we would only send probes for the first space which had one available, i.e. Initial before Handshake before AppData. Since we only have one PTO timer this can lead to situations where we perpetually probe with only Initials, which can significantly delay the handshake if we should have probed with Handshakes. With this diff we will keep the single PTO timer but aggressively write more probes from all spaces if they are available. Additionally this refactors some counters into EnumArrays Reviewed By: yangchi Differential Revision: D27235199 fbshipit-source-id: ef3614a833bf0f02f5806846a1335fa7ac2a4dc8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f2746d70b5
commit
bceb00346b
@@ -29,8 +29,7 @@ enum PacketBuilderType { Regular, Inplace };
|
||||
namespace {
|
||||
|
||||
PacketNum addInitialOutstandingPacket(QuicConnectionStateBase& conn) {
|
||||
PacketNum nextPacketNum =
|
||||
getNextPacketNum(conn, PacketNumberSpace::Handshake);
|
||||
PacketNum nextPacketNum = getNextPacketNum(conn, PacketNumberSpace::Initial);
|
||||
std::vector<uint8_t> zeroConnIdData(quic::kDefaultConnectionIdSize, 0);
|
||||
ConnectionId srcConnId(zeroConnIdData);
|
||||
LongHeader header(
|
||||
@@ -42,8 +41,8 @@ PacketNum addInitialOutstandingPacket(QuicConnectionStateBase& conn) {
|
||||
RegularQuicWritePacket packet(std::move(header));
|
||||
conn.outstandings.packets.emplace_back(
|
||||
packet, Clock::now(), 0, true, 0, 0, 0, LossState(), 0);
|
||||
conn.outstandings.handshakePacketsCount++;
|
||||
increaseNextPacketNum(conn, PacketNumberSpace::Handshake);
|
||||
conn.outstandings.packetCount[PacketNumberSpace::Initial]++;
|
||||
increaseNextPacketNum(conn, PacketNumberSpace::Initial);
|
||||
return nextPacketNum;
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ PacketNum addHandshakeOutstandingPacket(QuicConnectionStateBase& conn) {
|
||||
RegularQuicWritePacket packet(std::move(header));
|
||||
conn.outstandings.packets.emplace_back(
|
||||
packet, Clock::now(), 0, true, 0, 0, 0, LossState(), 0);
|
||||
conn.outstandings.handshakePacketsCount++;
|
||||
conn.outstandings.packetCount[PacketNumberSpace::Handshake]++;
|
||||
increaseNextPacketNum(conn, PacketNumberSpace::Handshake);
|
||||
return nextPacketNum;
|
||||
}
|
||||
|
Reference in New Issue
Block a user