1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-22 16:02:34 +03:00

Improve server packet drop logging.

Summary:
Provide a more detailed reason why we dropped a packet to the stats
callback and qlog.

Reviewed By: hanidamlaj

Differential Revision: D66171930

fbshipit-source-id: 4cf10b149d1184afb7b268ac8f229555d2ffb75d
This commit is contained in:
Kyle Nekritz
2024-11-20 15:06:28 -08:00
committed by Facebook GitHub Bot
parent df29c690fc
commit abb06d9b95
2 changed files with 11 additions and 9 deletions

View File

@@ -886,14 +886,16 @@ void onServerReadDataFromOpen(
break;
}
case CodecResult::Type::NOTHING: {
VLOG(10) << "drop cipher unavailable, no data " << conn;
VLOG(10) << "drop no data, reason: "
<< parsedPacket.nothing()->reason._to_string() << " " << conn;
if (conn.qLogger) {
conn.qLogger->addPacketDrop(packetSize, kCipherUnavailable);
conn.qLogger->addPacketDrop(
packetSize, parsedPacket.nothing()->reason._to_string());
}
QUIC_STATS(
conn.statsCallback,
onPacketDropped,
PacketDropReason::UNEXPECTED_NOTHING);
parsedPacket.nothing()->reason);
if (firstPacketFromPeer) {
throw QuicInternalException(
"Failed to decrypt first packet from peer",
@@ -1455,14 +1457,14 @@ void onServerReadDataFromClosed(
break;
}
case CodecResult::Type::NOTHING: {
VLOG(10) << "drop cipher unavailable, no data " << conn;
VLOG(10) << "drop no data, reason: "
<< parsedPacket.nothing()->reason._to_string() << " " << conn;
if (conn.qLogger) {
conn.qLogger->addPacketDrop(packetSize, kCipherUnavailable);
conn.qLogger->addPacketDrop(
packetSize, parsedPacket.nothing()->reason._to_string());
}
QUIC_STATS(
conn.statsCallback,
onPacketDropped,
PacketDropReason::UNEXPECTED_NOTHING);
conn.statsCallback, onPacketDropped, parsedPacket.nothing()->reason);
break;
}
case CodecResult::Type::REGULAR_PACKET: