W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2014

Re: Clarifications on flow control and padding

From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 12 Jun 2014 10:44:09 -0700
Message-ID: <CABkgnnV1Q-m4r9LTCOE+MoJzrntL5rivjOpN_U8DzVwpPif0wA@mail.gmail.com>
To: Simone Bordet <simone.bordet@gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
On 12 June 2014 10:29, Simone Bordet <simone.bordet@gmail.com> wrote:
> draft 12, section 6.1 states that "padding is included in flow control".


My editor's copy includes the statement:

   The entire DATA frame payload is included in flow control,
including Pad Length and Padding fields if present.

I think that's a little clearer that what is in -12.

Non-answers removed below...

A) Does this mean that, given 100 bytes of data and 300 bytes of padding:
2) the number that updates the flow control window is 402 (pad_high +
pad_low + data + padding)

Note: we're dropping pad_high in -13

B) In the same example, let's assume that the stream has a remaining
flow control window of 250.
What should an implementation do ?
1) send a frame composed of: pad_low + 100 bytes of data + 149 bytes of padding
2) do not send a frame because the there is not enough window for the padding ?

Either is acceptable, provided you understand the consequences.
Though there are risks to the first, since it is likely that the
receiver will expose the fact that the data is complete by commencing
processing (and not processing the remaining padding when that
arrives).  Yes, padding is hard.

The second is the most cautious approach, but it can mean stalling.  A
safer, yet sufficiently cautious approach would be to spread padding
evenly between all frames that are sent when splitting frames, as you
do below.

C) In the same example, let's assume that the stream has a remaining
flow control window of 350.
What should an implementation do ?
1) send a frame composed of: pad_low + 100 bytes of data + 249 bytes of padding
2) send a frame composed of: pad_high + pad_low + 48 bytes of data +
300 bytes of padding

See above.

D) What if the remaining flow control window is exactly 300 (or 302 in
case A2 holds true) ?
1) send a frame composed of: pad_low + 100 bytes of data + 199 bytes of padding
2) do not send a frame because there is enough space for padding but
not for data ?

I don't think that this is any different to the previous questions.

E) An application wants to write 20 MiB of data with a padding of 300 bytes.
Does this mean:
1) N data frame frames without padding, and a last frame with the
remainder of the data and 300 bytes of padding
2) N data frames each with 300 bytes of padding.

Those are very different answers.  The correct answer, is "mu".  You
need to be more precise about what "padding" means in the question.
(I would have assumed that the total amount of bytes to send is
20M+300, and not 20M+300*x for some arbitrary value of x.)
Received on Thursday, 12 June 2014 17:44:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:31 UTC