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

WIP: High-level restructure of transport draft #1857

Merged
merged 30 commits into from
Oct 18, 2018

Conversation

janaiyengar
Copy link
Contributor

@janaiyengar janaiyengar commented Oct 13, 2018

Bringing draft up to proposed structure in #411. We'll need to do more moving around of things and adding glue to various places to make sure the text flows freely and correctly, but I believe this PR moves major sections into the right slots (mostly).

It's easier to see the final draft, here.

@janaiyengar janaiyengar changed the title First iteration over transport draft WIP: High-level restructure of transport draft Oct 13, 2018
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.

This is a great start. Thanks for putting this together.

I took the opportunity to do a fairly thorough read-through (up until I got to the frame descriptions). So there are a mix of comments throughout. I probably strayed over the line on occasion and made some non-editorial comments as I went; as we discuss, we can open issues for those.

Overall, this is a big improvement, and I can see how it might be the basis for more improvements (some of which I noted). We shouldn't worry about getting things perfect, but at the same time I don't want to lose these comments. Most of them are fairly directly actionable.

No more time today, but I might be able to generate a PR for some of this as things stabilize more.

wire format, and mechanisms of the QUIC protocol for connection establishment,
stream multiplexing, stream and connection-level flow control, connection
migration, and data reliability.
This document describes the core QUIC protocol, and is structured as follows:
Copy link
Member

Choose a reason for hiding this comment

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

Does a two-level list make sense here?

* Streams are the basic service abstraction that QUIC provides:
** {{streams}} describes core concepts related to streams, 
** {{stream-states}} provides a reference model for stream states, and 
** {{flow-control}} outlines the operation of flow control.

* Connections are the context in which QUIC endpoints communicate.
** {{}} details the process for establishing connections,
** {{}} describes how endpoints migrate a connection to use a new network paths, and
** {{}} lists the options for terminating an open connection.

* Packets and frames are the basic unit used by QUIC to communicate.
** {{}} describes the format of packets and frames,
** {{}} defines a models for the transmission and retransmission of information,
** {{}} describes acknowledgments, the primary feedback mechanism in QUIC, and
** {{}} contains a rules for managing the size of packets.

* Details of encoding of QUIC protocol elements is described in:
** {{}} (Versions),
** {{}} (Packet Headers),
** {{}} (TP), 
** {{}} (Frames), and 
** {{}} (Errors).

If we do that, I would add a heading, like ## This Document here. That would also satisfy the itch that adding conventions and notations as 1.1 has, which says that having only one subsection is wrong.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like two levels

draft-ietf-quic-transport.md Show resolved Hide resolved
version negotiation and establishment of 1-RTT keys. Short headers are minimal
version-specific headers, which are used after version negotiation and 1-RTT
keys are established.
The first bi-directional stream opened by the client is stream 0.
Copy link
Member

Choose a reason for hiding this comment

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

s/bi-directional/bidirectional


: The most significant bit (0x80) of octet 0 (the first octet) is set to 1 for
long headers.
An endpoint limits the number of concurrently active incoming streams by
Copy link
Member

Choose a reason for hiding this comment

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

Missing transitional glue: "QUIC allows for an arbitrary number of streams to operate concurrently." Necessary if you take my proposed edit above.

: The most significant bit (0x80) of octet 0 (the first octet) is set to 1 for
long headers.
An endpoint limits the number of concurrently active incoming streams by
adjusting the maximum stream ID. An initial value is set in the transport
Copy link
Member

Choose a reason for hiding this comment

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

s/adjusting/limiting/


Disposing of connection state prior to the end
Copy link
Member

Choose a reason for hiding this comment

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

Error codes and versions.

NEW_CONNECTION_ID frame to be received multiple times. Receipt of the same
frame multiple times MUST NOT be treated as a connection error. A receiver can
use the sequence number supplied in the NEW_CONNECTION_ID frame to identify new
connection IDs from old ones.
Copy link
Member

Choose a reason for hiding this comment

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

I think that we can remove the first two sentences of this paragraph. They are vestiges of the design prior to us putting sequence numbers back in.


### Receive Stream States {#stream-recv-states}

{{fig-s
Copy link
Member

Choose a reason for hiding this comment

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

We should move the remainder of this section to the acknowledgments section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I've also reworked that section, and left a comment to take a second look at that text.


### Receive Stream States {#stream-recv-states}

{{fig-s
Copy link
Member

Choose a reason for hiding this comment

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

Same here.


### Receive Stream States {#stream-recv-states}

{{fig-s
Copy link
Member

Choose a reason for hiding this comment

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

This paragraph and the next probably belong in the packetization section.

@martinduke
Copy link
Contributor

If people are OK with the general layout, I suggest we land this PR quickly (to unblock other PR) and then wordsmith the nits in future PRs.

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.

Here is a review through and including the flow control section. Hopefully more to come,.

draft-ietf-quic-transport.md Show resolved Hide resolved
Version:
A receiver cannot renege on an advertisement; that is, once a receiver
advertises a stream ID via a MAX_STREAM_ID frame, advertising a smaller maximum
ID has no effect. A sender MUST ignore any MAX_STREAM_ID frame that does not
Copy link
Contributor

Choose a reason for hiding this comment

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

s/sender/receiver


Destination Connection ID:
When new data is to be sent on a stream, a sender MUST set the encapsulating
STREAM frame's offset field to the stream offset of the first byte of this new
Copy link
Contributor

Choose a reason for hiding this comment

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

s/byte/octet

by the client is subject to the same restrictions as the first Initial packet.
A client can either reuse the cryptographic handshake message or construct a
new one at its discretion.
A data receiver sends MAX_STREAM_DATA or MAX_DATA frames to the sender to
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 we should add a paragraph here that goes like this:

"Endpoints SHOULD communicate initial values for stream and connection flow control using transport parameters {#transport-params}. Data senders MUST use a value of zero for limits not advertised in the peer's transport parameters."

Copy link
Member

Choose a reason for hiding this comment

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

The paragraph above looks good enough to me. I don't think we need to set defaults (if this were the only thing that is read, a reader would (mostly correctly) infer that the values are always set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added that paragraph based on martinduke's comment, and yes, I agree that we don't need to recommend setting defaults.

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.

I've tried to attach suggestions to every comment here. Let me know if that works out, it's a new GitHub feature, and a little rough. I'd appreciate if you look at the suggestions before you do, but please merge this ASAP.

by the client is subject to the same restrictions as the first Initial packet.
A client can either reuse the cryptographic handshake message or construct a
new one at its discretion.
A data receiver sends MAX_STREAM_DATA or MAX_DATA frames to the sender to
Copy link
Member

Choose a reason for hiding this comment

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

The paragraph above looks good enough to me. I don't think we need to set defaults (if this were the only thing that is read, a reader would (mostly correctly) infer that the values are always set.

draft-ietf-quic-transport.md Outdated Show resolved Hide resolved
draft-ietf-quic-transport.md Outdated Show resolved Hide resolved
draft-ietf-quic-transport.md Show resolved Hide resolved
draft-ietf-quic-transport.md Outdated Show resolved Hide resolved

After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to any packet that it receives with another packet containing a closing frame.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to any packet that it receives with another packet containing a closing frame.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to any packet that it receives with another packet containing a closing frame.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to any packet that it receives with another packet containing a closing frame.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
to any packet that it receives with another packet containing a closing frame.
An endpoint can use the sequence number supplied in the NEW_CONNECTION_ID frame
to identify connection IDs that it has already received.

Copy link
Contributor Author

@janaiyengar janaiyengar left a comment

Choose a reason for hiding this comment

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

There is one commit I'm not taking in, but everything else looks good. I really wanted to try this new feature -- it is great, except that (i) every single comment is a separate commit, which doesn't scale well, and (ii) github UI pipeline is breaking somewhere, and shows incorrect text for suggested deletions at higher line numbers. The line numbers seem fine.

by the client is subject to the same restrictions as the first Initial packet.
A client can either reuse the cryptographic handshake message or construct a
new one at its discretion.
A data receiver sends MAX_STREAM_DATA or MAX_DATA frames to the sender to
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added that paragraph based on martinduke's comment, and yes, I agree that we don't need to recommend setting defaults.

draft-ietf-quic-transport.md Outdated Show resolved Hide resolved

After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not taking this yet - I don't think this should be removed. Let's discuss this after this PR.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something is broken here. This suggested patch doesn't make sense.


After sending a closing frame, endpoints immediately enter the closing state.
During the closing period, an endpoint that sends a closing frame SHOULD respond
to any packet that it receives with another packet containing a closing frame.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, this suggested patch does not make sense. I think you're talking about the TODO, which I agree, and I'll remove, but the suggested patch is incorrect. Looking closer, the line number is correct, but the text it shows is broken.

@janaiyengar janaiyengar merged commit b557a3a into reorganize Oct 18, 2018
@martinthomson martinthomson deleted the reorganize_transport branch October 26, 2018 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants