Skip to content

Commit

Permalink
Optimize searching for packets in the LostPackets list to see if they…
Browse files Browse the repository at this point in the history
… are acknowledged when processing AckBlocks
  • Loading branch information
vgmahajanshetty committed Feb 11, 2025
1 parent 8936fdc commit 56ff8e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/loss_detection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,14 @@ QuicLossDetectionProcessAckBlocks(
// which would mean we mistakenly classified those packets as lost.
//
if (*LostPacketsStart != NULL) {
QUIC_SENT_PACKET_METADATA *lastNode =
CXPLAT_CONTAINING_RECORD(
LossDetection->LostPacketsTail, QUIC_SENT_PACKET_METADATA,
Next);

if (lastNode->PacketNumber < AckBlock->Low) {
goto CheckSentPackets;
}
while (*LostPacketsStart && (*LostPacketsStart)->PacketNumber < AckBlock->Low) {
LostPacketsStart = &((*LostPacketsStart)->Next);
}
Expand Down Expand Up @@ -1380,6 +1388,7 @@ QuicLossDetectionProcessAckBlocks(
}
}

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

0 comments on commit 56ff8e5

Please sign in to comment.