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

Restrict ACK-clocking to ACK-only frames. #1231

Merged
merged 5 commits into from
Apr 9, 2018

Conversation

ekr
Copy link
Collaborator

@ekr ekr commented Mar 18, 2018

As written, this would forbid the case where A sends a single stream
frame and then B responds with three stream frames and piggybacks
ACKs along with each. That seems silly and a lot of work. Rather,
this should just be about ACK-only frames.

frame and then B responds with three stream frames and piggybacks
ACKs along with each. That seems silly and a lot of work. Rather,
this should just be about ACK-only frames.
containing non-ACK frames MUST be acknowledged immediately or when a delayed
ack timer expires.
response to other packets. Implementations MUST NOT send more than one packet
containing only ACK frames per received packet that contains frames other than
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no objection, but is the motivation for this the coming CRYPTO_ACK/ACK split?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No. It was purely that the text didn't match my expectations

Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

I'm not sure I really I understand the problem you're trying to solve.
If you really want to send duplicate ACK frames (without receiving any new packets, and without any timer expiring), the change of the first sentence in your PR would be sufficient.

an endpoint MAY send a PING frame once per RTT to solicit an acknowledgment.
Because ACK-only packets are not acknowledged, a receiver that is only
sending ACK frames will only receive acknowledgements for its packets
if the sender piggybacks them on other packets. In order to enable
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does it play a role how the sender bundles frames into packets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Consider the case where the receiver issued 1MB of flow credit and the sender sends 950K of data. In this case the receiver might just send ACK-only packets which the sender is forbidden to send its own ACK-only packets. Thus, if the sender never bundles ACKs, the receiver will never get any.

Copy link
Contributor

Choose a reason for hiding this comment

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

Where is the problem? You don't expect to get any ACK for ACK-only packets, they don't count towards bytes-in-flight, they are never retransmitted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, the text I am updating assumes it is a problem, I'm just fixing it up.

With that said, while the packets don't count towards bytes-in-flight, you generally end up storing the data about the to-be-ACKed packets (as implied by the following text):

receiver SHOULD track which ACK frames have been acknowledged by its peer.  Once
an ACK frame has been acknowledged, the packets it acknowledges SHOULD NOT be
acknowledged again.```

Thus, you can't garbage collect this state until those ACKs are ACKed.

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 that is an unfortunate requirement (SHOULD NOT be ack'ed again):
You want to ack packets again because you collapse gaps into larger blocks. Only the oldest ACK'ed block should not be acked again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mikkelfj: I suggest you file a separate issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

The text as it stands makes sense: If a peer wants an ACK for an ACK (e.g. to prune the lowest acked packet), it can include a retransmittable frame. This depends on which ack-pruning algorithm it uses, and it has nothing to do with how frames are bundled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That part of the text is correct. What's not correct is the claim that you will not receive ACKs if you do not do so.

Because ACK-only packets are not acknowledged, a receiver that is only
sending ACK frames will only receive acknowledgements for its packets
if the sender piggybacks them on other packets. In order to enable
this, senders SHOULD prioritize sending ACKs along with their data.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you should prioritize ACKs, if the ACKs don't ack any new retransmittable packets.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with this. The point of changing this text is to make it clear what the consequences of particular design choices are. I would remove this sentence (starting with "In order to enable").

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 prioritize is a loaded word, maybe "senders SHOULD bundle ACKs with non-ACK frames when possible."

if the sender piggybacks them on other packets. In order to enable
this, senders SHOULD prioritize sending ACKs along with their data.
In addition, if a receiver regularly issues additional flow control
credit rather than just issuing infinite flow control credit at the
Copy link
Contributor

Choose a reason for hiding this comment

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

Issuing infinite flow control credit is a really bad idea. I don't think we should mention this as an option here.

Copy link
Member

Choose a reason for hiding this comment

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

Again, I would remove "rather than just issuing infinite flow control credit at the beginning". The point remains good though, so I'd keep the rest.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this sentence.

its packets. Sending an occasional MAX_DATA or MAX_STREAM_DATA frame as data is
received will ensure that acknowledgements are generated by a peer. Otherwise,
an endpoint MAY send a PING frame once per RTT to solicit an acknowledgment.
Because ACK-only packets are not acknowledged, a receiver that is only
Copy link
Contributor

Choose a reason for hiding this comment

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

ACK-only packets are acknowledged, but they do not cause an ACK frame to be sent.

Maybe: ""Because ACK frames are not sent in response to ACK-only packets, ..."

if the sender piggybacks them on other packets. In order to enable
this, senders SHOULD prioritize sending ACKs along with their data.
In addition, if a receiver regularly issues additional flow control
credit rather than just issuing infinite flow control credit at the
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove this sentence.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

GitHub ate my homework, but let me take another look...

Because ACK-only packets are not acknowledged, a receiver that is only
sending ACK frames will only receive acknowledgements for its packets
if the sender piggybacks them on other packets. In order to enable
this, senders SHOULD prioritize sending ACKs along with their data.
Copy link
Member

Choose a reason for hiding this comment

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

I agree with this. The point of changing this text is to make it clear what the consequences of particular design choices are. I would remove this sentence (starting with "In order to enable").

if the sender piggybacks them on other packets. In order to enable
this, senders SHOULD prioritize sending ACKs along with their data.
In addition, if a receiver regularly issues additional flow control
credit rather than just issuing infinite flow control credit at the
Copy link
Member

Choose a reason for hiding this comment

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

Again, I would remove "rather than just issuing infinite flow control credit at the beginning". The point remains good though, so I'd keep the rest.

@martinthomson martinthomson merged commit 02d558a into quicwg:master Apr 9, 2018
@martinthomson martinthomson added the editorial An issue that does not affect the design of the protocol; does not require consensus. label Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport 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.

6 participants