Skip to content

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav2699 committed Dec 18, 2024
1 parent d2baaa0 commit 95a3533
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/core/ack_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ QuicAckTrackerDidHitReorderingThreshold(
const uint64_t LargestUnacked = QuicRangeGetMax(&Tracker->PacketNumbersToAck);
uint64_t LargestReported = 0; // The largest packet number that could be declared lost

if (Tracker->LargestPacketNumberAcknowledged != 0 &&
Tracker->LargestPacketNumberAcknowledged - ReorderingThreshold + 1 > LargestUnacked) {
return FALSE;
}

if (Tracker->LargestPacketNumberAcknowledged >= ReorderingThreshold) {
LargestReported = Tracker->LargestPacketNumberAcknowledged - ReorderingThreshold + 1;
}
Expand All @@ -130,14 +125,14 @@ QuicAckTrackerDidHitReorderingThreshold(
// acknowledgement.
//

for (int Index = QuicRangeSize(&Tracker->PacketNumbersToAck) - 1; Index >= 0; --Index) {
for (uint32_t Index = QuicRangeSize(&Tracker->PacketNumbersToAck); Index > 0; --Index) {
uint64_t SmallestMissing = 0; // Smallest missing in the previous gap
uint64_t HighestMissing = QuicRangeGet(&Tracker->PacketNumbersToAck, Index)->Low; // Highest missing in the prevous gap
uint64_t HighestMissing = QuicRangeGet(&Tracker->PacketNumbersToAck, Index - 1)->Low; // Highest missing in the prevous gap
if (HighestMissing == 0) {
return FALSE;
}
if (Index != 0) {
SmallestMissing = QuicRangeGetHigh(QuicRangeGet(&Tracker->PacketNumbersToAck, Index - 1)) + 1;
if (Index != 1) {
SmallestMissing = QuicRangeGetHigh(QuicRangeGet(&Tracker->PacketNumbersToAck, Index - 2)) + 1;
}

if (LargestReported > SmallestMissing) {
Expand Down

0 comments on commit 95a3533

Please sign in to comment.