-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fix Recovery Pseudocode #2907
Fix Recovery Pseudocode #2907
Conversation
When do you use parentheses? |
It appears most conditionals have parentheses currently, except for 1177. Are you suggesting to add them there or something else? |
Pick one. Be consistent. |
SG, done. I also fixed some missing ':' |
draft-ietf-quic-recovery.md
Outdated
// in flight and the endpoint is a server or has | ||
// completed the handshake. | ||
if (no ack-eliciting packets in flight && | ||
(endpoint is server or has 1-RTT keys)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
endpoint is server or has received hs ack or an ack of an 1-RTT packet (not a 1-RTT packet, this could be an ack of 0RTT)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just add "has received HS ack" and we're good. There's a case where the server flight doesn't fit in a cwnd and the extra text may save us a crypto timeout.
You'll need to rebase to get the changes from #2912 in here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, module rebasing and working out the conflicts.
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
draft-ietf-quic-recovery.md
Outdated
if (no ack-eliciting packets in flight && | ||
(endpoint is server || | ||
has 1-RTT keys || | ||
has received Handshake ACK)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chatting about this at the editors meeting, @martinthomson pointed out that this isn't quite right. Here's my reformulation that I believe is the right condition:
"endpoint is server || until the handshake is confirmed || has received Handshake ACK"
draft-ietf-quic-recovery.md
Outdated
if (no ack-eliciting packets in flight && | ||
(endpoint is server || | ||
has 1-RTT keys || | ||
has received Handshake ACK)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prose I would use here is:
An endpoint always keeps the timer running if it has an ack-eliciting packet that has not been acknowledged.
A client keeps the timer running during the handshake until it has confirmed that the server is no longer limited in how much it can send. The server needs to acknowledge a Handshake packet or a 1-RTT packet from the client to demonstrate this.
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
draft-ietf-quic-recovery.md
Outdated
if (no ack-eliciting packets in flight && | ||
(endpoint is server || | ||
has received Handshake ACK || | ||
has received 1-RTT ACK)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: if !(ack-eliciting packet in flight || (endpoint is client && has not received handshake ACK && has not received 1-RTT ACK))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a code reviewer, I'd request a method like PeerAwaitingAddressValidation() and say
if (no ack-eliciting packets in flight &&
!PeerAwaitingAddressValidation()):
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change -- looks MUCH better now.
I shouldn't have commented on the changeset. Here's my alternative to Jana's:
|
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
Co-Authored-By: Jana Iyengar <jri.ietf@gmail.com>
Fixes #2906