-
Notifications
You must be signed in to change notification settings - Fork 205
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
Split WINDOW_UPDATE into MAX_DATA and MAX_STREAM_DATA #450
Conversation
This also changes the name of the LIMIT_UPDATE frame to MAX_STREAM_ID to match. A lot of the text talked about stream offsets and had flow control affect maximum stream offsets. This turned out to be unnecessarily obtuse. The text in this changeset simply says that there is a limit to the amount of data that can be sent. This turns out to be a lot of changes, but I think that it is easier to understand as a result. Closes #443.
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.
I like this change -- a few comments inline
draft-ietf-quic-transport.md
Outdated
When counting data toward this limit, an endpoint accounts for the maximum | ||
offset of data that is sent or received on every stream. Loss or reordering can | ||
mean that the maximum offset is greater than the total size of data received on | ||
a stream. Receiving STREAM frames might not increase the maximum offset on a |
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.
"Loss or reordering can
+mean that the maximum offset is greater than the total size of data received on
+a stream." -- Not sure what this means.
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.
Hmm, that's old text, it says that for any given stream max_offset >= sum([x.len for x in all_stream_frames]) (as opposed to ==).
draft-ietf-quic-transport.md
Outdated
When counting data toward this limit, an endpoint accounts for the maximum | ||
offset of data that is sent or received on every stream. Loss or reordering can | ||
mean that the maximum offset is greater than the total size of data received on | ||
a stream. Receiving STREAM frames might not increase the maximum offset on a |
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 sentence does not make sense: "Receiving STREAM frames might not increase the maximum offset on a stream if the maximum offset doesn't increase."
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.
It's true, just a little repetitive.
draft-ietf-quic-transport.md
Outdated
mean that the maximum offset is greater than the total size of data received on | ||
a stream. Receiving STREAM frames might not increase the maximum offset on a | ||
stream if the maximum offset doesn't increase. A STREAM frame with a FIN bit | ||
set or RST_STREAM causes the final offset for a stream to be fixed. |
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.
I don't think you need to describe how RST_STREAM or FIN affects STREAM offsets here. MAX_DATA is for Connection flow control, and this information is useful only for STREAM flow control.
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.
OK, dropping this (BTW, this is existing text).
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.
Can you move this text to the MAX_STREAM_DATA section instead? It was written for WINDOW_UPDATE, which covered both connection and stream flow control.
draft-ietf-quic-transport.md
Outdated
|
||
A receiver MUST close the connection with a | ||
QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA error ({{error-handling}}) if the | ||
peer violates the advertised stream or connection flow control windows. | ||
peer violates the advertised limits on data on a connection or stream. |
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: "violates the advertised connection or stream data limits."
draft-ietf-quic-transport.md
Outdated
|
||
Implementations will likely want to increase the maximum stream ID as | ||
peer-initiated streams close. Sending a MAX_STREAM_ID frame along with ACK | ||
frames ensures a regular increase in the stream limit without generating excess |
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.
Sending a MAX_STREAM_ID with each ACK makes no sense. Perhaps you meant to say: "... along with acknowledgements of frames that close a stream"?
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.
Not exactly. Implies a particular strategy for increasing the maximum stream ID, which I want to avoid. The point is that you might send any MAX_STREAM_ID frames you might want to send on the same schedule as ACK. I'll try to improve it some.
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.
I realize that the context is bad for that, so I'll try to fix that too.
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.
An ACK is sent about every two packets received, which is not the schedule that a MAX_STREAM_ID frame would be sent. I've left a comment in my review of the new text.
draft-ietf-quic-transport.md
Outdated
mean that the maximum offset on a stream can be greater than the total size of | ||
data received on that stream. Conversely, receiving STREAM frames might not | ||
increase the maximum offset on a stream if the maximum offset in the frame is | ||
lower than the maximum received for that stream. |
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.
I understand now what this says, but it's confusing, since maximum offset and MAX_DATA both represent maxima. I would suggest using "largest received offset" instead of "maximum offset".
draft-ietf-quic-transport.md
Outdated
set or RST_STREAM causes the final offset for a stream to be fixed. | ||
mean that the maximum offset on a stream can be greater than the total size of | ||
data received on that stream. Conversely, receiving STREAM frames might not | ||
increase the maximum offset on a stream if the maximum offset in the frame is |
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.
"might not" --> "will not". If the STREAM frame's largest offset is lower than the largest received so far, the largest received offset will not increase.
draft-ietf-quic-transport.md
Outdated
peer-initiated streams close. Sending a MAX_STREAM_ID frame along with ACK | ||
frames ensures a regular increase in the stream limit without generating excess | ||
Sending any increase to the maximum stream ID in the same packet as an ACK frame | ||
ensures a regular increase in the stream limit without generating excess |
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 advice is true for all frames, including MAX_DATA and MAX_STREAM_DATA frames. I'd remove this sentence or say something about when to send the MAX_STREAM_ID frame rather than which frame to bundle it with. It might make sense to send it immediately after/along with a STREAM frame that carries a FIN or a RST_STREAM frame on a peer-initiated stream, for instance.
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.
Yep, I think that I will just remove the paragraph. The advice on when to send is still present in the next paragraph, which is what you are looking for.
This also changes the name of the LIMIT_UPDATE frame to MAX_STREAM_ID to match.
A lot of the text talked about stream offsets and had flow control affect
maximum stream offsets. This turned out to be unnecessarily obtuse. The text
in this changeset simply says that there is a limit to the amount of data that
can be sent. This turns out to be a lot of changes, but I think that it is
easier to understand as a result.
Closes #443.