mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-24 04:01:07 +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:
committed by
Facebook GitHub Bot
parent
df29c690fc
commit
abb06d9b95
@@ -886,14 +886,16 @@ void onServerReadDataFromOpen(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CodecResult::Type::NOTHING: {
|
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) {
|
if (conn.qLogger) {
|
||||||
conn.qLogger->addPacketDrop(packetSize, kCipherUnavailable);
|
conn.qLogger->addPacketDrop(
|
||||||
|
packetSize, parsedPacket.nothing()->reason._to_string());
|
||||||
}
|
}
|
||||||
QUIC_STATS(
|
QUIC_STATS(
|
||||||
conn.statsCallback,
|
conn.statsCallback,
|
||||||
onPacketDropped,
|
onPacketDropped,
|
||||||
PacketDropReason::UNEXPECTED_NOTHING);
|
parsedPacket.nothing()->reason);
|
||||||
if (firstPacketFromPeer) {
|
if (firstPacketFromPeer) {
|
||||||
throw QuicInternalException(
|
throw QuicInternalException(
|
||||||
"Failed to decrypt first packet from peer",
|
"Failed to decrypt first packet from peer",
|
||||||
@@ -1455,14 +1457,14 @@ void onServerReadDataFromClosed(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CodecResult::Type::NOTHING: {
|
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) {
|
if (conn.qLogger) {
|
||||||
conn.qLogger->addPacketDrop(packetSize, kCipherUnavailable);
|
conn.qLogger->addPacketDrop(
|
||||||
|
packetSize, parsedPacket.nothing()->reason._to_string());
|
||||||
}
|
}
|
||||||
QUIC_STATS(
|
QUIC_STATS(
|
||||||
conn.statsCallback,
|
conn.statsCallback, onPacketDropped, parsedPacket.nothing()->reason);
|
||||||
onPacketDropped,
|
|
||||||
PacketDropReason::UNEXPECTED_NOTHING);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CodecResult::Type::REGULAR_PACKET:
|
case CodecResult::Type::REGULAR_PACKET:
|
||||||
|
|||||||
@@ -3570,7 +3570,7 @@ TEST_F(QuicUnencryptedServerTransportTest, TestUnencryptedAck) {
|
|||||||
auto tmp = std::move(qLogger->logs[indices[0]]);
|
auto tmp = std::move(qLogger->logs[indices[0]]);
|
||||||
auto event = dynamic_cast<QLogPacketDropEvent*>(tmp.get());
|
auto event = dynamic_cast<QLogPacketDropEvent*>(tmp.get());
|
||||||
EXPECT_EQ(event->packetSize, 45);
|
EXPECT_EQ(event->packetSize, 45);
|
||||||
EXPECT_EQ(event->dropReason, kCipherUnavailable);
|
EXPECT_EQ(event->dropReason, "DECRYPTION_ERROR_INITIAL");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(QuicUnencryptedServerTransportTest, TestBadPacketProtectionLevel) {
|
TEST_F(QuicUnencryptedServerTransportTest, TestBadPacketProtectionLevel) {
|
||||||
|
|||||||
Reference in New Issue
Block a user