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

Independent states and STOP_SENDING #171

Merged
merged 29 commits into from Aug 3, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b1c79fb
First pass at REQUEST_RST
MikeBishop Jan 18, 2017
4c96bd2
Use REQUEST_RST in HTTP/QUIC
MikeBishop Jan 18, 2017
7f66526
Martin's feedback on REQUEST_RST
MikeBishop Jan 30, 2017
b2dc2c2
Wrong word form
MikeBishop Jan 30, 2017
dd17d05
Fix some merge stuff
MikeBishop Feb 23, 2017
c9d0d8f
Servers shouldn't freak out either
MikeBishop Mar 7, 2017
7f0a134
Rename to DISINTEREST
MikeBishop Mar 7, 2017
001c274
Suggest error code, loosen ordering
MikeBishop Mar 7, 2017
d4f77df
an => a
MikeBishop Mar 7, 2017
dccd3f3
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Mar 9, 2017
4ce57c5
Without selecting?
MikeBishop Mar 9, 2017
5088ec5
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Apr 13, 2017
df92cb1
Martin's less-MUSTy feedback on DISINTEREST
MikeBishop Apr 13, 2017
3ac8550
Merging with Martin's stream state text
MikeBishop May 2, 2017
5740393
Martin's feedback
MikeBishop Jun 7, 2017
299e72d
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Jun 7, 2017
1536501
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Jun 28, 2017
52f99c7
Update frame type value and table
MikeBishop Jun 28, 2017
15da4ce
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Jul 24, 2017
35dfd02
Bring back the error code
MikeBishop Jul 27, 2017
e0be281
REQUEST_RST -> DISINTEREST -> STOP_SENDING
MikeBishop Jul 27, 2017
e91b428
DISINTEREST->STOP_SENDING in HTTP doc
MikeBishop Jul 27, 2017
1213176
Clarifying stream state
MikeBishop Jul 27, 2017
23c7dd2
delete 'up to and'
MikeBishop Jul 27, 2017
7a46965
STOP_SENDING in half-closed remote
MikeBishop Jul 31, 2017
5699b82
Remove implied ordering of STOP_SENDING and STREAM frames
MikeBishop Jul 31, 2017
106c165
STOP_SENDING is sorta retransmittable and MUSTy
MikeBishop Aug 1, 2017
0b027f3
Jana's nits
MikeBishop Aug 2, 2017
53d1621
Merge remote-tracking branch 'origin/master' into request_rst
MikeBishop Aug 2, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions draft-ietf-quic-http.md
Expand Up @@ -276,11 +276,11 @@ A server can send a complete response prior to the client sending an entire
request if the response does not depend on any portion of the request that has
not been sent and received. When this is true, a server MAY request that the
client abort transmission of a request without error by triggering a QUIC
DISINTEREST with error code HTTP_EARLY_RESPONSE, sending a complete response,
STOP_SENDING with error code HTTP_EARLY_RESPONSE, sending a complete response,
and cleanly closing its streams. Clients MUST NOT discard complete responses as
a result of receiving a DISINTEREST, though clients can always discard responses
at their discretion for other reasons. Servers SHOULD NOT abort a response in
progress as a result of receiving a solicited RST_STREAM.
a result of receiving a STOP_SENDING, though clients can always discard
Copy link
Contributor

Choose a reason for hiding this comment

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

HTTP clients won't receive a STOP_SENDING, since that's a QUIC frame (I realize that this was similar earlier with RST_STREAM)... perhaps something like "as a result of receiving a solicited stream reset"? I don't have better ideas.

responses at their discretion for other reasons. Servers SHOULD NOT abort a
Copy link
Contributor

Choose a reason for hiding this comment

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

Why a MUST NOT above with clients and SHOULD NOT here with server behavior?

response in progress as a result of receiving a solicited RST_STREAM.

### Header Compression

Expand Down Expand Up @@ -379,7 +379,7 @@ frames sent on the control stream, and response body (if any) sent via the
corresponding data stream.

If a promised push stream is not needed by the client, the client SHOULD send a
QUIC DISINTEREST on the promised stream with an appropriate error code (e.g.
QUIC STOP_SENDING on the promised stream with an appropriate error code (e.g.
HTTP_PUSH_REFUSED, HTTP_PUSH_ALREADY_IN_CACHE; see {{errors}}). This asks the
server not to transfer the data and indicates that it will be discarded upon
receipt.
Expand Down
38 changes: 16 additions & 22 deletions draft-ietf-quic-transport.md
Expand Up @@ -2470,16 +2470,15 @@ but loss or reordering can cause packets that open streams to arrive out of
order.

From the "open" state, either endpoint can send a frame with the FIN flag set,
which causes the stream to transition into one of the "half-closed" states.
This flag can be set on the frame that opens the stream, which causes the stream
to immediately become "half-closed". Once an endpoint has completed sending all
which causes the stream to transition into one of the "half-closed" states. This
flag can be set on the frame that opens the stream, which causes the stream to
immediately become "half-closed". Once an endpoint has completed sending all
stream data and a STREAM frame with a FIN flag, the stream state becomes
"half-closed (local)". When an endpoint receives all stream data a FIN flag the
stream state becomes "half-closed (remote)". An endpoint MUST NOT consider the
stream state to have changed until all data has been sent, received or
discarded.
"half-closed (local)". When an endpoint receives all stream data and a FIN flag
the stream state becomes "half-closed (remote)". An endpoint MUST NOT consider
the stream state to have changed until all data has been sent or received.

A RST_STREAM frame on an "open" stream causes the stream to become
A RST_STREAM frame on an "open" stream also causes the stream to become
"half-closed". A stream that becomes "open" as a result of sending or receiving
RST_STREAM immediately becomes "half-closed". Sending a RST_STREAM frame causes
the stream to become "half-closed (local)"; receiving RST_STREAM causes the
Expand Down Expand Up @@ -2518,10 +2517,6 @@ received data.
Once all data has been either received or discarded, a sender is no longer
obligated to update the maximum received data for the connection.

An endpoint that receives a RST_STREAM frame (and which has not sent a FIN or a
RST_STREAM) MUST immediately respond with a RST_STREAM frame, and MUST NOT send
any more data on the stream.

Due to reordering, an endpoint could continue receiving frames for the stream
even after the stream is closed for sending. Frames received after a peer
closes a stream SHOULD be discarded. An endpoint MAY choose to limit the period
Expand All @@ -2536,11 +2531,10 @@ mentions a stream ID. In this state, the endpoint MUST observe advertised
stream and connection data limits (see {{flow-control}}).

A stream transitions from this state to "closed" by completing transmission of
all data. This includes sending all data carried in STREAM frames up including
the terminal STREAM frame that contains a FIN flag.
all data. This includes sending all data carried in STREAM frames up to and
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would just remove "up" and say "This includes sending all data carried in STREAM frames including the terminal STREAM frame that contains a FIN flag."

including the terminal STREAM frame that contains a FIN flag.

A stream becomes "closed" when the endpoint sends and receives acknowledgment of
a RST_STREAM frame.
A stream also becomes "closed" when the endpoint sends a RST_STREAM frame.

Choose a reason for hiding this comment

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

wouldn't we still have to wait for the ACK and retransmit the RST if not, why does this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, that's probably a change that came after my PR forked and I lost in the merge. But I thought the transition to "closed" on the sender was immediate on sending the frame? I'll have to look at history and see if I can find when that changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like this text came in as part of #459, but it's inconsistent with the text in "open" which says that RST_STREAM causes transitions immediately on send, which I thought is what we'd agreed. I'm going to leave it for now until @martinthomson can weigh in.

Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't have required an ack to be received in the first case. The stream state machine does not include retransmission logic -- that is considered to be a task for the reliabiity machinery "below".



### closed {#state-closed}
Expand Down Expand Up @@ -2741,12 +2735,12 @@ controller.

### Response to a RST_STREAM

RST_STREAM terminates a stream abruptly. Whether any action or response can or
should be taken on the data already received is an application-specific issue,
but it will often be the case that upon receipt of a RST_STREAM an endpoint
will choose to stop sending data in its own direction. If the sender of a
RST_STREAM wishes to explicitly state that no future data will be processed,
that endpoint MAY send a STOP_SENDING frame at the same time.
RST_STREAM terminates one direction of a stream abruptly. Whether any action or
response can or should be taken on the data already received is an
application-specific issue, but it will often be the case that upon receipt of a
RST_STREAM an endpoint will choose to stop sending data in its own direction. If
the sender of a RST_STREAM wishes to explicitly state that no future data will
be processed, that endpoint MAY send a STOP_SENDING frame at the same time.

### Data Limit Increments {#fc-credit}

Expand Down