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

Rework packetization section #1053

Merged
merged 3 commits into from
Feb 14, 2018
Merged

Rework packetization section #1053

merged 3 commits into from
Feb 14, 2018

Conversation

martinthomson
Copy link
Member

In line with our established principles for retransmission, I've reworked the
description of packetization. The description now concentrates on the
information that is being repaired in response to perceived loss. This should
help avoid the confusion about retransmission.

Two new subsections are added to the packetization section. One covers the
processing of packets and includes the existing text on processing requirements
before acknowledgment. The other includes the retransmission logic.

The retransmission section still mentions frame types, but I've tried to make
that secondary to the description of the information that is being repaired.

I also removed mention of "Regular QUIC packets", which only occurred in 3
places.

Closes #463, #765.

Copy link
Contributor

@martinduke martinduke left a comment

Choose a reason for hiding this comment

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

This is a massive improvement on the current text.

retransmitted.
* The current maximum stream data offset is sent in MAX_STREAM_DATA frames until
acknowledged or the receive stream enters a "Size Known" state. Like
MAX_DATA, endpoints need to limit the rate at which this frame is sent.
Copy link
Contributor

Choose a reason for hiding this comment

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

In this paragraph, and others to follow, do you mean to say that every packet contains this frame from when it's first sent till acknowledgment, or only that it's retransmitted when the carrying packet is declared lost? Whichever it is, I think this could stand to be clearer.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have rephrased this completely. I've changed this so that retransmission only occurs when the most recently sent frame is declared lost. I think that is much neater.

As you say, it was unclear before, and a valid interpretation of the proposed text was "send a frame in every packet", which I agree is a little silly.

Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

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

Comments below


## Retransmission of Information

QUIC packets that are determined to be lost are never retransmitted whole. The
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, there's the one exception around connection close?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like explaining exceptions every place, but that would leave "never", which is a bit absolute.

needed. New frames and packets are used to carry information that is determined
to have been lost.

* Application data sent in STREAM frames is retransmitted in new STREAM frames
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 expect this text to exist elsewhere. Does it need to be here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that there is value in having a complete list here.


QUIC packets that are determined to be lost are never retransmitted whole. The
same applies to the frames that are contained within lost packets. Instead, the
different types of information that might be carried in frames is sent again as
Copy link
Contributor

Choose a reason for hiding this comment

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

is => are?

Copy link
Contributor

Choose a reason for hiding this comment

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

"types are" or "information is", but not "types is"

unless the endpoint has sent a RST_STREAM for that stream. Once an endpoint
sends a RST_STREAM frame, no further STREAM frames are needed.

* The most recent set of acknowledgments is sent in ACK frames. An ACK frame
Copy link
Contributor

Choose a reason for hiding this comment

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

is => are

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, he's right here. "The ... set ... is sent"

corresponding limit. These frames always include the limit that is causing
blocking at the time that they are transmitted.

* An liveness or path validation check using PING frames is sent until
Copy link
Contributor

Choose a reason for hiding this comment

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

An => A or Any

validation checking. PING frames with a payload SHOULD include a different
payload each time they are sent.

* Responses to path validation using PONG frames are sent just once. A new PING
Copy link
Contributor

Choose a reason for hiding this comment

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

PONG doesn't exist anymore.

Copy link
Contributor

@MikeBishop MikeBishop left a comment

Choose a reason for hiding this comment

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

Some subject-verb disagreement, but otherwise fine. I think this is a net improvement.

We now describe the various QUIC frame types that can be present in a Regular
packet. The use of these frames and various frame header bits are described in
subsequent sections.
As described in {{frames}}, packets contain one or more frames. We now
Copy link
Contributor

Choose a reason for hiding this comment

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

Not new text, but basically none of the recent text is written in the first-person plural. Can we rephrase this, while you're touching the paragraph?


QUIC packets that are determined to be lost are never retransmitted whole. The
same applies to the frames that are contained within lost packets. Instead, the
different types of information that might be carried in frames is sent again as
Copy link
Contributor

Choose a reason for hiding this comment

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

"types are" or "information is", but not "types is"

unless the endpoint has sent a RST_STREAM for that stream. Once an endpoint
sends a RST_STREAM frame, no further STREAM frames are needed.

* The most recent set of acknowledgments is sent in ACK frames. An ACK frame
Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, he's right here. "The ... set ... is sent"

{{sending-ack-frames}}.

* Cancellation of stream transmission, as carried in a RST_STREAM frame, is sent
until acknowledged or until acknowledgments for all stream data is received
Copy link
Contributor

Choose a reason for hiding this comment

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

"until acknowledgements ... are received" or "until all stream data is acknowledged by the peer"

* ACK and PADDING frames MUST NOT be retransmitted. ACK frames
containing updated information will be sent as described in {{frame-ack}}.
* Similarly, requests to cancel stream transmission, as encoded in a
STOP_SENDING frame, is sent until the receive stream enters either a "Data
Copy link
Contributor

Choose a reason for hiding this comment

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

"requests ... are sent"

* An liveness or path validation check using PING frames is sent until
acknowledged or until there is no remaining need for liveness or path
validation checking. PING frames with a payload SHOULD include a different
payload each time they are sent.
Copy link
Contributor

Choose a reason for hiding this comment

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

PING frames don't have a payload any more.

Copy link
Contributor

Choose a reason for hiding this comment

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

And related, the merge conflict is probably that this section doesn't mention PATH_CHALLENGE / PATH_RESPONSE frames.

Copy link
Member Author

Choose a reason for hiding this comment

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

You will note that date at which this PR was created relative to when it is being reviewed. I have rebased.

In line with our established principles for retransmission, I've reworked the
description of packetization.  The description now concentrates on the
information that is being repaired in response to perceived loss.  This should
help avoid the confusion about retransmission.

Two new subsections are added to the packetization section.  One covers the
processing of packets and includes the existing text on processing requirements
before acknowledgment.  The other includes the retransmission logic.

The retransmission section still mentions frame types, but I've tried to make
that secondary to the description of the information that is being repaired.

I also removed mention of "Regular QUIC packets", which only occurred in 3
places.

Closes #463, #765.
Copy link
Member Author

@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.

Thanks for picking up on my sloppy copy-edits. Please take another look at the MAX_DATA and friends changes. I think that they are much better, but you might disagree.


## Retransmission of Information

QUIC packets that are determined to be lost are never retransmitted whole. The
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like explaining exceptions every place, but that would leave "never", which is a bit absolute.

needed. New frames and packets are used to carry information that is determined
to have been lost.

* Application data sent in STREAM frames is retransmitted in new STREAM frames
Copy link
Member Author

Choose a reason for hiding this comment

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

I think that there is value in having a complete list here.

* An liveness or path validation check using PING frames is sent until
acknowledged or until there is no remaining need for liveness or path
validation checking. PING frames with a payload SHOULD include a different
payload each time they are sent.
Copy link
Member Author

Choose a reason for hiding this comment

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

You will note that date at which this PR was created relative to when it is being reviewed. I have rebased.

retransmitted.
* The current maximum stream data offset is sent in MAX_STREAM_DATA frames until
acknowledged or the receive stream enters a "Size Known" state. Like
MAX_DATA, endpoints need to limit the rate at which this frame is sent.
Copy link
Member Author

Choose a reason for hiding this comment

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

I have rephrased this completely. I've changed this so that retransmission only occurs when the most recently sent frame is declared lost. I think that is much neater.

As you say, it was unclear before, and a valid interpretation of the proposed text was "send a frame in every packet", which I agree is a little silly.

enters a "Size Known" state.

* The maximum stream ID is sent in MAX_STREAM_ID frames. Like MAX_DATA, an
updated value is sent when a packet containing the most recent MAX_STREAM_ID
Copy link
Contributor

Choose a reason for hiding this comment

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

The maximum stream ID for a stream type

Copy link
Contributor

@MikeBishop MikeBishop left a comment

Choose a reason for hiding this comment

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

Yep, looks good. Two nits.

* The maximum stream ID is sent in MAX_STREAM_ID frames. Like MAX_DATA, an
updated value is sent when a packet containing the most recent MAX_STREAM_ID
frame is declared lost or when the limit is updated, with care taken to
prevent the frame from being sent too often.
Copy link
Contributor

@MikeBishop MikeBishop Feb 13, 2018

Choose a reason for hiding this comment

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

@mikkelfj raised a good point, but I don't see it associated with this paragraph: The most recently sent frame for each stream type needs this behavior.


* A liveness or path validation check using PATH_CHALLENGE frames is sent until
acknowledged or until there is no remaining need for liveness or path
validation checking. PATH_CHALLENGE frames with a payload SHOULD include a
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there PATH_CHALLENGE frames without a payload?

Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

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

Looks great, minus Mike's point about PATH_CHALLENGE and payload.

Copy link
Contributor

@martinduke martinduke left a comment

Choose a reason for hiding this comment

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

Thanks for fixing MAX_STREAM_DATA, but I think we have the same ambiguity with RST_STREAM, STOP_SENDING, BLOCKED, STREAM_BLOCKED, STREAM_ID_BLOCKED, and NEW_CONNECTION_ID. Send in every packet until acked, or once per loss event?

Are ACKs the only information we send even though the information is in flight? Perhaps some introductory text in "Retransmission of Information" can make the default behavior more explicit.

@@ -2730,75 +2728,112 @@ transmission efficiency to underfilled packets.

# Packetization and Reliability {#packetization}

A sender bundles one or more frames in a Regular QUIC packet (see {{frames}}).
A sender bundles one or more frames in a QUIC packet (see {{frames}}).
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to be pedantic, but Version Negotiation and Stateless Reset packets don't have any frames.

@martinthomson
Copy link
Member Author

I've further clarified the scope of *BLOCKED frames and the rules for retransmitting those. I plan to merge this pretty soon.

scope is lost, but only while the endpoint is blocked on the corresponding
limit. These frames always include the limit that is causing blocking at the
time that they are transmitted.

Copy link
Contributor

@mikkelfj mikkelfj Feb 14, 2018

Choose a reason for hiding this comment

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

It is no longer clear a BLOCKED frame should be sent again if the blocking limitation is removed or updated.
EDIT: disregard, I misread this.

* Application data sent in STREAM frames is retransmitted in new STREAM frames
unless the endpoint has sent a RST_STREAM for that stream. Once an endpoint
sends a RST_STREAM frame, no further STREAM frames are needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not obvious that the endpoint is the local endpoint, or sender unless you are quite familiar with stream state already.

@martinthomson martinthomson deleted the packets-and-frames-v2 branch May 29, 2018 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants