Subject: flow control description in draft

From: Subodh Iyengar <[email-masked]>
Date: Fri, 28 Jul 2017 15:18:51 +0000

The flow control language in the draft is a bit confusing right now, and I could use a bit more clarity on the intention

For example in MAX_DATA and MAX_STREAM_DATA the data is defined as

"A 64-bit unsigned integer indicating the maximum amount of data that can be sent on the entire connection, in units of 1024 octets. That is, the updated connection-level data limit is determined by multiplying the encoded value by 1024."

This seems like it means that flow control is advertised in terms of number of bytes that you can send from that moment.

However from the Flow control section:

"A receiver sends MAX_DATA or MAX_STREAM_DATA frames to the sender to advertise additional credit by sending the absolute byte offset in the connection or stream which it is willing to receive."

I think that we definitely mean offset here in both cases, i.e.

MAX_DATA = sum of max offset of all streams that are allowed

MAX_STREAM_DATA = max offset on a stream

Let's say the conn flow control limit of the receiver is 50. All units in multiples of 1024.

initial state of receiver
stream1 -->  [0, 10]
stream2 -->  [0, 20]

stream3 -->  [0, 20]

So the sender has consumed his entire flow control window. Then the receiver consumes 10 (*1024) bytes from stream1:

stream1 ---> (10, 10)

stream2 ---> [0, 20]

stream3 ---> [0, 20]

so now the conn window has 10 (*1024) bytes remaining, what does the receiver send in their update:

MAX_DATA = 10

or

MAX_DATA = 60

I think we mean 60 here. It makes it much easier to maintain the flow control in that case.

Subodh

---

From: Ian Swett <[email-masked]>
Date: Fri, 28 Jul 2017 12:57:23 -0400

On Fri, Jul 28, 2017 at 11:18 AM, Subodh Iyengar <[email-masked]> wrote:

> The flow control language in the draft is a bit confusing right now, and I
> could use a bit more clarity on the intention
>
> "A 64-bit unsigned integer indicating the maximum amount of data that can
> be sent on the entire connection, in units of 1024 octets. That is, the
> updated connection-level data limit is determined by multiplying the
> encoded value by 1024."
>
> This seems like it means that flow control is advertised in terms of
> number of bytes that you can send from that moment.
>

> "A receiver sends MAX_DATA or MAX_STREAM_DATA frames to the sender to
> advertise additional credit by sending the absolute byte offset in the
> connection or stream which it is willing to receive."
>
> Yes, that's what the spec means.  I thought it was fairly clear, but if
you think it's confusing, a PR to improve the wording would be appreciated.

> So the sender has consumed his entire flow control window. Then the
> receiver consumes 10 (*1024) bytes from stream1:
>
> stream1 ---> (10, 10)
>
> stream2 ---> [0, 20]
>
> stream3 ---> [0, 20]
>
>