Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize searching for packets in the LostPackets list to see if they… #4806

Merged
merged 3 commits into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/core/loss_detection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,13 @@ QuicLossDetectionProcessAckBlocks(
// which would mean we mistakenly classified those packets as lost.
//
if (*LostPacketsStart != NULL) {
QUIC_SENT_PACKET_METADATA* LastLostPacket =
CXPLAT_CONTAINING_RECORD(
LossDetection->LostPacketsTail, QUIC_SENT_PACKET_METADATA,
Next);
if (LastLostPacket->PacketNumber < AckBlock->Low) {
goto CheckSentPackets;
}
while (*LostPacketsStart && (*LostPacketsStart)->PacketNumber < AckBlock->Low) {
LostPacketsStart = &((*LostPacketsStart)->Next);
}
Expand Down Expand Up @@ -1380,6 +1387,7 @@ QuicLossDetectionProcessAckBlocks(
}
}

CheckSentPackets:
//
// Now find all the acknowledged packets in the SentPackets list.
//
Expand Down
Loading