Clarifications on SETTINGS control frame (interop v2)

23 views
Skip to first unread message

Patrick McManus

unread,
Aug 26, 2011, 11:12:01 PM8/26/11
to spdy...@googlegroups.com
Again, this clarification request is about
http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 and a
connection negotiated over npn as spdy/2 .. in this case to
ssl.gstatic.com

My client recvs this SETTINGS frame:

80 02 00 04 00 00 00 0C
00 00 00 01 04 00 00 01 00 00 00 64
^^^^ ID ^^^ ^^^ VAL ^^^

that's 1 ID/Value Pair in a v2 settings frame.

ID is defined as "A 32-bit ID number, comprised of 8 bits of flags and
24 bits of unique ID.".. which is I would normally take to mean 1 byte
of flags followed by 3 bytes of ID in network byte order.

But under that interpretation the only flags defined are 1 and 2 and the
flags byte is 4. So maybe its 3 bytes of ID followed by 1 byte of flag.
That makes the flag be 1, which is to be expected from the server.. it
also makes the ID (in network order) be 0x040000 which is way out of
range of the defined IDs that go from 1-5.

So my guess is the definition of the 32 bit ID field should read "a 24
bit little endian unique ID, followed by 8 bits of flag." The value is a
32 bit network order quantity.

If I got that right, it would mean the SETTING I received is a
MAX_CONCURRENT_STREAMS of 100 with the persist bit set. Right? Probably
not what was intended - maybe it can be fixed in v3 if I've got it
right... documented in any event.

There is one more SETTINGS frame I want to bring up for clarification..
I get this one a little later on:

80 02 00 04 00 00 00 1C
00 00 00 03
03 00 00 00 00 00 00 2B
05 00 00 01 00 00 00 34
06 00 00 01 00 00 00 00

This time 3 Settings.. if I read them correctly they are for ID 3, 5,
and 6. Draft 2 doesn't seem to define a type 6. What is type 6 with its
mysterious value of 0?

Also type 5 CWND - the value is expressed in what units? the spec is
silent. packets?

Thanks!

Roberto Peon

unread,
Aug 27, 2011, 5:01:59 PM8/27/11
to spdy...@googlegroups.com

That is correct.

> There is one more SETTINGS frame I want to bring up for clarification..
> I get this one a little later on:
>
> 80 02 00 04     00 00 00 1C
> 00 00 00 03
> 03 00 00 00     00 00 00 2B
> 05 00 00 01     00 00 00 34
> 06 00 00 01     00 00 00 00
>
> This time 3 Settings.. if I read them correctly they are for ID 3, 5,
> and 6. Draft 2 doesn't seem to define a type 6. What is type 6 with its
> mysterious value of 0?
>
> Also type 5 CWND - the value is expressed in what units? the spec is
> silent. packets?

Yup.

>
> Thanks!
>
>
>

Patrick McManus

unread,
Sep 2, 2011, 8:28:55 AM9/2/11
to spdy...@googlegroups.com
Hi: this is a captured settings ID/Value pair for what I believe is "100
max concurrent streams with the persist flag" (spdy/2) ::

04 00 00 01 00 00 00 64

This is the definition:

---------------
Each ID/value pair is as follows:
+----------------------------------+
| ID (24 bits) | ID_Flags (8) |
+----------------------------------+
| Value (32 bits) |
+----------------------------------+

ID: 24-bits in network byte order
[..]
Value: A 32-bit value in network byte order
-------------------------

That's a mismatch on the ID. (it appears to be little endian on the
capture, it is defined as big endian.)

William Chan (陈智昌)

unread,
Sep 7, 2011, 7:09:00 PM9/7/11
to spdy...@googlegroups.com
Sorry, I haven't had a chance to verify it, but I believe it, because
both you and Fedor Indutny (nodejs) have reported this. I think that
we should fix this for draft 3 and document the existing behavior for
draft 2.

Roberto Peon

unread,
Sep 7, 2011, 7:11:17 PM9/7/11
to spdy...@googlegroups.com

In addition, we should ensure that the flags and I'd parts use the same order as elsewhere in other frames for draft three.
-=R

Reply all
Reply to author
Forward
0 new messages