Skip to content

Commit

Permalink
Don't Include Packet Processing Time in RTT (microsoft#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Dec 2, 2020
1 parent af45ec8 commit 1e6d3bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/ack_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void
QuicAckTrackerAckPacket(
_Inout_ QUIC_ACK_TRACKER* Tracker,
_In_ uint64_t PacketNumber,
_In_ uint64_t RecvTimeUs,
_In_ QUIC_ECN_TYPE ECN,
_In_ BOOLEAN AckElicitingPayload
)
Expand Down Expand Up @@ -143,7 +144,7 @@ QuicAckTrackerAckPacket(
BOOLEAN NewLargestPacketNumber =
PacketNumber == QuicRangeGetMax(&Tracker->PacketNumbersToAck);
if (NewLargestPacketNumber) {
Tracker->LargestPacketNumberRecvTime = QuicTimeUs64();
Tracker->LargestPacketNumberRecvTime = RecvTimeUs;
}

switch (ECN) {
Expand Down
1 change: 1 addition & 0 deletions src/core/ack_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void
QuicAckTrackerAckPacket(
_Inout_ QUIC_ACK_TRACKER* Tracker,
_In_ uint64_t PacketNumber,
_In_ uint64_t RecvTimeUs,
_In_ QUIC_ECN_TYPE ECN,
_In_ BOOLEAN AckElicitingPayload
);
Expand Down
2 changes: 2 additions & 0 deletions src/core/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -3699,6 +3699,7 @@ QuicConnRecvFrames(
BOOLEAN Closed = Connection->State.ClosedLocally || Connection->State.ClosedRemotely;
const uint8_t* Payload = Packet->Buffer + Packet->HeaderLength;
uint16_t PayloadLength = Packet->PayloadLength;
uint64_t RecvTime = QuicTimeUs64();

uint16_t Offset = 0;
while (Offset < PayloadLength) {
Expand Down Expand Up @@ -4464,6 +4465,7 @@ QuicConnRecvFrames(
QuicAckTrackerAckPacket(
&Connection->Packets[EncryptLevel]->AckTracker,
Packet->PacketNumber,
RecvTime,
ECN,
AckPacketImmediately);
}
Expand Down

0 comments on commit 1e6d3bb

Please sign in to comment.