Re: [tcpm] AccECN field order

Bob Briscoe <> Tue, 17 November 2020 12:20 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 29EF03A1201; Tue, 17 Nov 2020 04:20:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id z9qqQICC3fcq; Tue, 17 Nov 2020 04:20:11 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 76C043A11FE; Tue, 17 Nov 2020 04:20:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=upq05HrRwrd88indX46nAn8S9g4BpXQ14j6N5tD4WIA=; b=BiPAArqOLPeCoFxiTYk5vlzX+ pSIv7n6KPoHiaFm725eZmnLR73nZ76CftjDf0qqU4CCGzaFzJopM7s2ictiVYC65WhBaZtmZ4gyff J2lVZ3+YDo95RGMuKwVf1IdpfE2Sz52tJxBWrT/Sok/klZ7X62/vHGt2gpTtGdDmC7bgCVbDznREB 3hxJYbBapRzG4oF2KK2W7lWkh1r5aR4WO3inDnUtYLubPcknKzewo2DsIOk/NJ2slAnG+Pi2iY4FS pOgJ0qVX9D22kuvkA7XJu86RTaJXGH4kiWPaj6ul7swNMHmXQN8SnV4rE0sgErdP+RySdlQxkda9U /Rsi1XN+A==;
Received: from ([]:39552 helo=[]) by with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from <>) id 1kezxu-0022eD-Uf; Tue, 17 Nov 2020 12:20:08 +0000
To: "Scharf, Michael" <>, Yoshifumi Nishida <>
Cc: Michael Tuexen <>, "" <>, Mirja Kuehlewind <>, "Scheffenegger, Richard" <>, tcpm IETF list <>
References: <> <> <> <> <> <> <> <> <> <>
From: Bob Briscoe <>
Message-ID: <>
Date: Tue, 17 Nov 2020 12:20:05 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <>
Content-Type: multipart/alternative; boundary="------------D9CED6A3A514B6A2C21BC38E"
Content-Language: en-GB
X-OutGoing-Spam-Status: No, score=-1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname -
X-AntiAbuse: Original Domain -
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain -
X-Get-Message-Sender-Via: authenticated_id:
Archived-At: <>
Subject: Re: [tcpm] AccECN field order
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 17 Nov 2020 12:20:14 -0000


On 17/11/2020 08:10, Scharf, Michael wrote:
> Bob,
> I am fine with the two option kinds proposed in -13, but I don’t buy 
> your arguments why this encoding is better than others.
> Most importantly, I don’t think that your “forward compatibility” 
> argument is a very compelling reason for two codepoints. All proposals 
> I am aware of have their pros and cons. And I am not aware of a really 
> comprehensive discussion. At least neither the e-mail below nor 
> today’s meeting discuss all tradeoffs I would investigate.

[BB] You're right - the discussion below is useful and necessary.

> For instance, the benefit of the length encoding variant would be to 
> consume only one TCP option codepoint now. If we decided later to that 
> a flag byte is needed (say, at the end), a follow-up proposed standard 
> could specify another option format with that flag byte, using a 
> second codepoint.

* The new codepoint would require years to deploy (including in proxies) 
before it works e2e.
* Whereas the 'forward compatibility' approach tries to ensure that 
AccECN implementations that are being built today will be ready to 
interwork with a future extension.
* In contrast, if your hypothetical new AccECN codepoint did need to be 
deployed later, it would need to include a fall-back to the current 
AccECN option when one peer doesn't understand the new codepoint.
* Fall-back would need to avoid a second round of handshake (given this 
is for low latency), which would only work reliably with an option on 
the SYN (because the 3rd ACK is unreliable)
* AccECN has so far avoided using any SYN option space, which is 
important given that is the scarcest resource.

These days, extending TCP is like playing chess - we have to think 
multiple moves ahead! I need to learn to articulate onto the list all my 
reasons for rejecting certain parts of the design space. Sorry about that.

Yes, I admit, the current proposal is at the cost of burning two TCP 
option codepoints. However, you said yourself when you proposed this 
approach, that they are not (currently) a scarce resource. Certainly not 
as scarce as option space. I just checked: roughly 15% of the option 
codepoint allocation space has been used so far. So that's where I would 
suggest we compromise first.

> Regarding the resulting codepoint consumption (two option kinds) and 
> the addition of a flag byte, this approach would basically end up with 
> the same result as the current proposal in -13 plus some hypothetical 
> future addition leveraging the length field beyond the currently known 
> use.
> And, yes, the length encoding variant may be less flexible and/or 
> consume some more bits in some cases, but on the plus side it only 
> needs one codepoint now – and given that it is entirely unclear 
> whether any AccECN option will indeed be widely used in future, this 
> is a big plus. The fact that implementers are quite silent on the 
> option design is not a good sign.

[BB] Here's another possibility then.

a) [K|L| EE1B | ECEB | EE0B ]
b) [K|L| EE1B | ECEB | EE0B |F]    if F = 0bXXXXXXX0
c) [K|L| EE0B | ECEB | EE1B |F]    if F = 0bXXXXXXX1

We'd have to decide which order alternative (a) takes. I've picked EE1B 
first only 'cos you're right that there is not currently as much 
pressure (on the public Internet) for AccECN with ECT(0).

K:    Kind (1B)
L:    Length (1B)
ExxB: Echo xx byte counter
F:    Flags (1B)

Alternatives a) and b) are equivalent, at least while the only allocated 
flag is for field order.
However, alternativeb) is available in case other flags are allocated in 
The flags byte can only be omitted if (L % 3 == 2).
The flags byte is considered present if (L % 3) == 0.

Forward compatibility: Options with (L % 3 == 1) MUST be assumed to 
include a flags byte, and current implementations ignore the last byte.

The flags byte is optional to implement (even if the AccECN option is 
If the server includes a flags byte on the SYN/ACK but the client does 
not include one on the 3rd ACK or the first data packet, the server 
assumes the client does not implement the flags byte and uses only 
alternative a) for the remainder of the connection.

> To me, one potential difference between two proposals would be 
> incremental deployment. The proposal in -13 only has an advantage if 
> middleboxes such as firewalls will indeed pass TCP options with a 
> format that contains content beyond the (first) Accurate ECN standard 
> (i.e., currently unused length values). IMHO it is too early to know 
> whether firewalls would indeed allow this in future.
> From a security perspective, it is not clear to me whether allowing 
> arbitrary unspecified bytes in a TCP option is a good idea **at all**. 
> It will be interesting to hear the opinion from SEC area on that. 
> Personally, I am not convinced that this really makes sense, but I my 
> concerns are not strong enough to formally push back. I’ll leave it to 
> others to think about whether this is a bug or a feature.

[BB] Well, let's first try to deal with security ourselves:
* Octets that are explicitly declared as part of an option cannot be 
used for a buffer overflow attack. I don't really need to, but I could 
add the following text to the forward compatibility wording:
     A receiver considers octets beyond those it uses, but within the 
specified length, as if they are padding.
* And such octets cannot be any different from the current ability of a 
sender to add padding. So there's no new attack possible here.
* And there's no need to specify a max length for any AccECN Option, 
which would just unnecessarily limit flexibility.

> Maybe one lesson learnt is that the document could have a 
> non-normative appendix that explains the rationale for the finally 
> picked TCP option encoding. That may also help if there are further 
> questions whether two codepoints are really required, e.g. by the IESG 
> (if two codepoints are still the design after WGLC). At least for past 
> TCP option codepoint allocations I recall some discussions late in the 
> IETF process. In those past cases, good arguments in an appendix and 
> running code has helped a lot.

[BB] I can do that. Appx B is already similar, giving Design Rationale 
for the ACE field.


> Michael
> *From:*Bob Briscoe <>
> *Sent:* Tuesday, November 17, 2020 6:10 AM
> *To:* Scharf, Michael <>; Yoshifumi 
> Nishida <>
> *Cc:* Michael Tuexen <>;; 
> Mirja Kuehlewind <>; Scheffenegger, Richard 
> <>; tcpm IETF list <>
> *Subject:* Re: AccECN field order
> Michael,
> On 16/11/2020 17:36, Scharf, Michael wrote:
>     Bob,
>     One proposal using the length field with **one option codepoint
>     only** is detailed in:
>     It is the third option mentioned in this e-mail. One example would
>     be to use option length values 5/8/11 for one encoding type and
>     option length values 6/9/12 for the other encoding type (i.e.,
>     order of fields). Or one could use some other combination of
>     length values – the only requirement is that a certain value for
>     the option length is only used by one of the option formats. In
>     that approach, the value of the length field would thus directly
>     describe the encoding of the option. Unless I miss something, this
>     would work and it would just require one option codepoint.
>     Thus, alternatives to two option codepoints exist and I have
>     explained them on the list in March 2020.
> OK, sorry, yes, I remember this now.
> As I will explain in the AccECN status update talk today in virtual 
> Bangkok, the draft has made provision for different length values than 
> 5/8/11. It says existing implementations MUST accept length values 
> other than those currently defined. But then read in as many whole 
> 3-byte fields as they can.
> This can be used to add a flags byte on the end in future, for 
> extensibility. Or any other form of extensibility the WG might decide 
> in the future.
> I know a flags byte at the end seems odd compared to at the beginning. 
> But (if decided it's needed in future) it's reasonably easy to 
> implement by reading the whole option, then processing the last byte, 
> before reading the rest of the option.
> I believe you will agree that this is a better way to utilize 
> different lengths.
> And thank you for repeatedly emphasizing that you're happy with the 
> 2-kind scheme, or other alternatives.
> Bob
>     Anyway, I don’t really care how the options are encoded as long as
>     the receiver doesn’t need per-connection state for decoding a TCP
>     option. So, personally, I would be fine with using e.g. the length
>     field as described in my old e-mail. Or an additional flag byte.
>     And one could come up with further encodings, e.g., by using one
>     or a few bits as a short “type” field for each counter. This is
>     all about protocol engineering. And all these variants have their
>     pros and cons.
>     I am also fine with using two option codepoints as specified in
>     -13; this is probably the approach that consumes the least number
>     of bits.
>     Michael (w/o any hat)
>     *From:* Bob Briscoe <>
>     <>
>     *Sent:* Monday, November 16, 2020 5:52 PM
>     *To:* Yoshifumi Nishida <>
>     <>
>     *Cc:* Scharf, Michael <>
>     <>; Michael Tuexen
>     <> <>;
> <>; Mirja
>     Kuehlewind <> <>;
>     Scheffenegger, Richard <>
>     <>; tcpm IETF list
>     <> <>
>     *Subject:* AccECN field order
>     Yoshi, (adding the tcpm list in cc)
>     On 05/11/2020 06:58, Yoshifumi Nishida wrote:
>         Hi Bob,
>         On Wed, Nov 4, 2020 at 3:29 PM Bob Briscoe
>         < <>> wrote:
>             Yoshi,
>             On 04/11/2020 06:51, Yoshifumi Nishida wrote:
>                 Hi, folks,
>                 In my understanding, I'm not sure if we settled down
>                 on using two option kinds or encoding schemes for
>                 24bits fields in acc ecn draft.
>                 So, I think there're still something to be clarified
>                 and hope things will be settled at the meeting.
>             [BB] I know a WG can change it's mind at any time. But I'd
>             rather we just clarified what a previous decision was, to
>             avoid the need to keep re-opening discussion on a question
>             that have been decided then changed three different ways
>             already.
>             My memory is not so good these days. I trusted that
>             Michael S remembered the decision correctly, and I seem to
>             remember that decision being made.
>             I've just checked the minutes of the last interim:
>             and they mention Michael's proposal to use two kinds, but
>             don't record any decision.
>             The jabber log gives no clues about any decision.
>             I can't find an audio or video recording. Can you point me
>             at one?
>         I thought that it's because there was no clear decision at the
>         meeting.
>         But, you can check
>         <>
>         Please let us know if you have any questions or opinions with
>         regard to this.
>     [BB] I checked the Youtube link you sent below.
>     First I think we're agreed no-one was fighting for us to keep the
>     previous way we did this (using the initial value of the field to
>     set the order for the connection).
>     In my presentation I said there was strong resistance from Michael
>     to do it a different way.
>     (also, offlist, the co-authors including me also didn't like this
>     so much. And Ilpo said it made the implementation complex.)
>     Then came the question of what we do instead. There were three
>     alternative proposals:
>     a) use 2 option kinds
>     b) add a flags byte
>     c) somehow use the length field maybe
>     Michael raised (c) in the meeting as a possibility, but no-one
>     could think how to distinguish two options of the same length but
>     a different field order using the length field. Michael said he'd
>     post any ideas to the list if he could think of any, but that
>     didn't happen.
>     So we're left choosing between (a) and (b).
>     I said in the meeting (and on the list when discussing with Ilpo)
>     that I'd be happy to go with (b), but only if there was another
>     use for a flag. Because it would consume 1B more options space in
>     many packets, which is a scarce resource.
>     Ilpo had a proposed use for another flag (to help synch counters
>     after a loss), but I think the discussion about it ended that it
>     wouldn't be helpful, 'cos the way it worked depended on itself
>     (circular logic).
>     In conclusion, I don't think there was an explicit decision to go
>     with 2 option kinds, but it ended up as the 'last person standing'.
>     I like it. It's simple. And apparently option kinds are not such a
>     scarce resource.
>     Perhaps we can ratify this in the WG tomorrow.
>     Bob
>         Thanks,
>         --
>         Yoshi
>     -- 
>     ________________________________________________________________
>     Bob Briscoe
> -- 
> ________________________________________________________________
> Bob Briscoe

Bob Briscoe