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

Clarify OnAckReceived pseudocode #2140

Merged
merged 2 commits into from
Dec 18, 2018
Merged

Conversation

Ralith
Copy link
Contributor

@Ralith Ralith commented Dec 13, 2018

I ran into a few points of confusion in the existing code:

  • The time to update and scope of largest_acked_packet is not explicit
  • ProcessECN references elements of sent_packets after they are removed by OnPacketAcked
  • DetectLostPackets is passed an undefined variable

The fixes are trivial, except for the last: it isn't clear to me whether DetectLostPackets was intended to be called with ack.largest_acked or largest_acked_packet. These only differ when ACKs are reordered, and because the prior invocation of DetectLostPackets with a higher largest_acked would have already deemed lost all packets that the later invocation might deem lost, I don't think the behavior differs even then. Hence, removing the argument and consistently referencing largest_acked_packet seems to be the simpler option.

draft-ietf-quic-recovery.md Outdated Show resolved Hide resolved
draft-ietf-quic-recovery.md Outdated Show resolved Hide resolved
@Ralith Ralith force-pushed the ack-cleanup branch 3 times, most recently from 9385133 to f9ad5a9 Compare December 13, 2018 07:09
@Ralith
Copy link
Contributor Author

Ralith commented Dec 13, 2018

Split the ProcessECN tweak into #2142, corrected the largest_acked_packet update logic, and added initialization for largest_acked_packet.

Copy link
Contributor

@janaiyengar janaiyengar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor nit, but this is a nice cleanup. Thanks! I'll approve, but @ianswett should take a look as well.

draft-ietf-quic-recovery.md Outdated Show resolved Hide resolved
@@ -716,6 +717,9 @@ Pseudocode for OnAckReceived and UpdateRtt follow:

~~~
OnAckReceived(ack):
largest_acked_packet = max(largest_acked_packet,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this accurately describes the text we have, but I think we should add some text that you MAY use the largest acked from the most recent ACK, which could reduce spurious retransmits when one packet arrives far out of order?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, I'm ok doing this in a follow up PR.

Copy link
Contributor Author

@Ralith Ralith Dec 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you MAY use the largest acked from the most recent ACK, which could reduce spurious retransmits when one packet arrives far out of order

Any reason not to make this the sole recommendation? I had some trouble coming up with a case where that might occur, which is why I didn't take that route originally, but I think I see it now: when a reordered ACK newly acknowledges a packet such that the newly acknowledged packet is > ack.largest_acked - kPacketThreshold, but <= largest_acked_packet - kPacketThreshold.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er, wait, that's nonsense. Still having trouble seeing the case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the case when one packet is far out of order, and then subsequent packets arrive in order. ie: 100 is received, then 1, 2, 3, 4, 5, etc. I don't fully understand the cause, but I've seen small UDP packets jump ahead of large ones in a number of traces.

But I suspect Jana and I will merge this as is and we can add follow-up text about that issue if we think it's valuable.

@janaiyengar janaiyengar merged commit 16d116d into quicwg:master Dec 18, 2018
@Ralith Ralith deleted the ack-cleanup branch December 19, 2018 00:31
@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -recovery labels Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-recovery editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants