[Rtg-dt-encap-considerations] Header alignment in encapsulation

Tom Herbert <tom@herbertland.com> Wed, 03 February 2016 19:41 UTC

Return-Path: <tom@herbertland.com>
X-Original-To: rtg-dt-encap-considerations@ietfa.amsl.com
Delivered-To: rtg-dt-encap-considerations@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 597D01B2BE2 for <rtg-dt-encap-considerations@ietfa.amsl.com>; Wed, 3 Feb 2016 11:41:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622] 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 xXxnNJTDWEe7 for <rtg-dt-encap-considerations@ietfa.amsl.com>; Wed, 3 Feb 2016 11:41:18 -0800 (PST)
Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 04F471B2BE1 for <rtg-dt-encap-considerations@ietf.org>; Wed, 3 Feb 2016 11:41:17 -0800 (PST)
Received: by mail-io0-x235.google.com with SMTP id d63so68082490ioj.2 for <rtg-dt-encap-considerations@ietf.org>; Wed, 03 Feb 2016 11:41:17 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=cGQRxPkYbTPZgxmgAL2Z06rS6/mXqzPo7c61lyOhWCo=; b=YdCLxznDTlXlsPljNhfXVhajvz/uGFQdI1A+zW2Q8wpMIfhGPECnUZM46AqPu7Apb0 V4PEtA4Px9q+kQxRkWNg7kB2SE6QQ8L/GB7NnB8B/EwpEGITMefscpOjzP7971xBVvfL 1c2D1WZhG4AWCMmPoH9TfNaV444bqYW54VwTm1aA47irkMl57/HnKyn1CTJJI7OI8icH fvSvTdoF92iK75jWXKezK4A2mNAqtIMF0xy6i49dW94HiAm+iHlsr1ylQpzHEj8KQMTA mxS4BhTm6u0h0djEe5Z6ZWn+JS7P7p5ZT7NjZSiDP2VkmkFmemWIB4+sHvi1uV1kIz5p 1s5g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=cGQRxPkYbTPZgxmgAL2Z06rS6/mXqzPo7c61lyOhWCo=; b=FUJALEYKYJN6s5gMt3ZGzErAInU52a130Di6kcPhxMQp6qxu3JnuA+gskOWqi/nA44 e/CQDpFxm/Uy1/x+d2qdnfTmDyMQLgqnZi0VMCTfXkryWuuICbcH5/TU3MtLZ3vGI6vP 6qu/SH6CUW8uvMq9JvaYt131DA2ZVGRkUTbtQ7HoFqTXyPc0RcfGaOhcOk2i6COWcepu jn0RuFHnb4VZ8g5S3DyMP4+1UyNsnDDJsSN1F25NTFqIDFGUXDToAVtSwOOB1IM+8FxU wm3Zr367FAM+6mhX3A8Mw2QGFWsfN8/7ZpSFBBd0UkO86ClwQtpIfXen6xTKAG28LIpA n6rg==
X-Gm-Message-State: AG10YOTNz2AeL7QBrE/ZlD/WCbfQks56E7YYCoZ0Sp5sEZUD6YtOaIaXVVo7mG2kn/ZTro1CLfY16raxmSdCjg==
MIME-Version: 1.0
X-Received: by 10.107.136.210 with SMTP id s79mr5437187ioi.50.1454528477199; Wed, 03 Feb 2016 11:41:17 -0800 (PST)
Received: by 10.107.160.203 with HTTP; Wed, 3 Feb 2016 11:41:17 -0800 (PST)
Date: Wed, 03 Feb 2016 11:41:17 -0800
Message-ID: <CALx6S36Ycijz8P7uG_wgKZW681eTSB4GzakN_QmjS4V2gfhzag@mail.gmail.com>
From: Tom Herbert <tom@herbertland.com>
To: "rtg-dt-encap-considerations@ietf.org" <rtg-dt-encap-considerations@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-dt-encap-considerations/TTAJEEESDZul58d6LqCLuweMQJA>
Subject: [Rtg-dt-encap-considerations] Header alignment in encapsulation
X-BeenThere: rtg-dt-encap-considerations@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Routing Area Design Team on Encapsulation Considerations discussion list <rtg-dt-encap-considerations.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-dt-encap-considerations>, <mailto:rtg-dt-encap-considerations-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rtg-dt-encap-considerations/>
List-Post: <mailto:rtg-dt-encap-considerations@ietf.org>
List-Help: <mailto:rtg-dt-encap-considerations-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-dt-encap-considerations>, <mailto:rtg-dt-encap-considerations-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Feb 2016 19:41:19 -0000

Hello,

It turns out that there are still CPU architectures that have
difficulty with unaligned accesses (notably Sparc). Nearly all IP
protocols are careful to be 4-byte aligned, but we get into trouble
when Ethernet (14 byte hdr.) gets involved. Typically, we pad RX
Ethernet buffers with two bytes so that the Ethernet payload (e.g. and
IP packet) is 4-byte aligned.

Encapsulations that carry Ethernet are still problematic, the inner
and outer IP headers can have different alignments. EtherIP is okay
since it inserts a two byte header, but GRE-TEB, VXLAN allow the
different alignments (and I believe Geneve and VXLAN-GPE will also).

I suggest we should add as recommendation to the encap considerations
that protocols should maintain 4-byte alignment of encapsulated IP
packets. For instance when encapsulating Ethernet the two bytes should
be inserted like in EtherIP to align the payload with the outer
headers.

Thanks,
Tom