Re: [trill] Order of bits in TRILL bitmaps

Donald Eastlake <d3e3e3@gmail.com> Thu, 21 August 2014 18:46 UTC

Return-Path: <d3e3e3@gmail.com>
X-Original-To: trill@ietfa.amsl.com
Delivered-To: trill@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 50D991A0ADA for <trill@ietfa.amsl.com>; Thu, 21 Aug 2014 11:46:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.45
X-Spam-Level:
X-Spam-Status: No, score=-1.45 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, MIME_8BIT_HEADER=0.3, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6E0vGPC24ZT1 for <trill@ietfa.amsl.com>; Thu, 21 Aug 2014 11:46:08 -0700 (PDT)
Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 644F61A0977 for <trill@ietf.org>; Thu, 21 Aug 2014 11:46:08 -0700 (PDT)
Received: by mail-ob0-f175.google.com with SMTP id wp18so7750853obc.6 for <trill@ietf.org>; Thu, 21 Aug 2014 11:46:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=aNgjvRwnq9/K+jWNIVI2wT0FIuX+cDcP6kz+D0Y4+Tc=; b=A4LgLyOCMNooQe20N8ZHEpj4cJYp1I5o7GXscO5B2UjDULRzHRgoXqpXLVwaHkHp8H eKngLScobbu7r4TZhlzt2W7WjilsAC2fEJZOKRlzi5vWQD66H3hQlSYxcKQJFa/knspe cG08H55enUz9qpjrl70/kTl3uOKxqA9Nv8kV06kp+aPMnYpD+O8pFWF6MQrY1/oQISOF ux/lvR+dKFGjFUgA5yawnRk4ID1sPtZEvYeKWs19bjSvp3lwy+56k+IdR9DQZxXsbXeM vzkonHLC+lHhf/kAReL3XBktr/bcgwRUcqWlMQRMMXQ3EUEHMOKBMIZnX5Him/CQXnf1 Yyqw==
X-Received: by 10.60.102.74 with SMTP id fm10mr478162oeb.24.1408646767723; Thu, 21 Aug 2014 11:46:07 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.76.20.148 with HTTP; Thu, 21 Aug 2014 11:45:47 -0700 (PDT)
In-Reply-To: <CANi4_5fGtOVvC0nwqdoWXEv5AraQR_UY4NmYuaUYvpt5xjvQyQ@mail.gmail.com>
References: <CANi4_5fGtOVvC0nwqdoWXEv5AraQR_UY4NmYuaUYvpt5xjvQyQ@mail.gmail.com>
From: Donald Eastlake <d3e3e3@gmail.com>
Date: Thu, 21 Aug 2014 14:45:47 -0400
Message-ID: <CAF4+nEEf_waUNxt6X8MmqmBpboHzEXBDT1=izZ0pnaYgHOVhpQ@mail.gmail.com>
To: Petr Hroudný <petr.hroudny@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/trill/36ojc4oZG-25zRyC4Jmxk9jGfIs
Cc: "trill@ietf.org" <trill@ietf.org>
Subject: Re: [trill] Order of bits in TRILL bitmaps
X-BeenThere: trill@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Developing a hybrid router/bridge." <trill.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/trill>, <mailto:trill-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/trill/>
List-Post: <mailto:trill@ietf.org>
List-Help: <mailto:trill-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/trill>, <mailto:trill-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Aug 2014 18:46:09 -0000

Hi Petr,

On Thu, Aug 21, 2014 at 2:37 AM, Petr Hroudný <petr.hroudny@gmail.com> wrote:
> Hi all,
>
> I'm looking for the WG opinion about the correct order of bits in bitmaps
> specified in RFC7176 sections 2.2.2 & 2.2.5 and 2.2.4 & 2.3.1.
>
> For the first two, the RFC says:
>
>    o  VLAN bit-map: The highest-order bit indicates the VLAN equal to
>       the start VLAN ID, the next highest bit indicates the VLAN equal
>       to start VLAN ID + 1, continuing to the end of the VLAN bit-map
>       field.
>
> I understand this as follows: if only the start VLAN ID is enabled, the
> bitmap should have a value of 0x80.
>
> Nevertheless, I've seen an implementation, where the bitmap reads 0x01.
>
> Which one is correct?

The default in the IETF is big-endian. so the high order bit of a byte
is 0x80. I believe that if you send that byte on Ethernet, you will
see seven zeros followed by a one because that media sends the low
order bit first. In any case, I think 0x80 is correct.

> For the second two, the RFC says:
>
>    o  Capabilities and Header Flags Supported: A bit vector of 32 bits
>       numbered 0 through 31 in network order.
>
> I understand this as follows: if I want to set the FGL-safe bit (bit 1), the
> bitmap should read 0x40 0x00 0x00 0x00.
>
> Nevertheless, I've seen an implementation, where the bitmap reads 0x00,
> 0x00, 0x00, 0x40
>
> Which one is correct?

The "network order" used in the IETF for a 32 bit field is to send
send bytes from left to right. This bit vector is like (well, it is
the same size) a IPv4 address which is also described as having 32
bits numbered from 0 through 31 (see Figure 4 of RFC 791). If you send
the loopback address (127.0.0.1), the "127" byte gets sent first and
the "1" byte last. On a serial media, the "127" byte might be
0b11111110 (how I believe it is on Ethernet) or 0b01111111, but it is
still the first byte transmitted.

So I would say 40-00-00-00 is correct.

> As this might create a serious interop issues, I'm seeking for WG opinion on
> this.

Thanks,
Donald
=============================
 Donald E. Eastlake 3rd   +1-508-333-2270 (cell)
 155 Beaver Street, Milford, MA 01757 USA
 d3e3e3@gmail.com

>     Thanks, Petr
>
>
>
>
> _______________________________________________
> trill mailing list
> trill@ietf.org
> https://www.ietf.org/mailman/listinfo/trill
>