Re: [Rtg-dt-encap-considerations] [nvo3] Alignment and Ethernet encapsulation

Tom Herbert <tom@herbertland.com> Tue, 20 September 2016 17:48 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74F3F12B118 for <rtg-dt-encap-considerations@ietfa.amsl.com>; Tue, 20 Sep 2016 10:48:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=herbertland-com.20150623.gappssmtp.com
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 DhT2lqxDNX4a for <rtg-dt-encap-considerations@ietfa.amsl.com>; Tue, 20 Sep 2016 10:48:03 -0700 (PDT)
Received: from mail-qk0-x22f.google.com (mail-qk0-x22f.google.com [IPv6:2607:f8b0:400d:c09::22f]) (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 0C2E512B03F for <rtg-dt-encap-considerations@ietf.org>; Tue, 20 Sep 2016 10:48:03 -0700 (PDT)
Received: by mail-qk0-x22f.google.com with SMTP id w204so22470774qka.0 for <rtg-dt-encap-considerations@ietf.org>; Tue, 20 Sep 2016 10:48:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=07M2mlRcN5Q04qSzcufhVqMaGku4utBSq2/5Yfpz1fo=; b=C9ZO8ieIiB0hn/viqFwZ/n063QD6/M/qYKGzSaJGTt/7FvzY0lsJyMFsnGDlvvGg+W os9fbkoshaHxL/GWehr5Ga/s3xgnTRKRTEzQYeNUehfOLX7OW7r57IPLLGdK1kAvVshS uqFnOkXmzfJNbuXZxCykSViYgRPLEtHftrj0ivbAtIJBBqAmxxVa4gezF1vfMAqd0tHw 6KrAm4Eg1g3yPyDp+xqd3eDlsgcTxwMtOfptCvX3PtSsV0OOCB0K/QkE82jOha+mwLW+ mvVqfHcQwaaS7MzpwyDArspI8pXaRQAXT/gYPZ6buGvFSS3r1Fubx5Ltqc9EC5b6MrNn VN5Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=07M2mlRcN5Q04qSzcufhVqMaGku4utBSq2/5Yfpz1fo=; b=HLJyc9D6nO/diOWCY1pGVZDReiDq6xOzRcZwCuYdUEx7Smixvw4WLtHH2sDsiwA+T2 EwXO/k5QX37/Zs5laimHpev46vghAxNmI9UoeSTgo0+qLFAw614rF71TCdLWBj1PYOb7 bcbrtIVkM4crRT0/W0lH6LbRLFQqILPH2P2snNrYepSFHsefG7lPWtsHnR0OhaqVfhCL 4YRkr2ieXdSwcHSp4Di5ukw8GUtd7tcydGYEnrVJ6tHtfd89WCA2Ut5X5kUnXS76XR7a AsNgR62Gv+EzyacwUXnpxYgpzRezaQWalQ/WLHX5rY4y2yHgfsnWyUGPE5sopRoUFkJQ bJzQ==
X-Gm-Message-State: AE9vXwN7IEjH3raBRs1/31erSDUTuL/r/gHnDQqlOElOqpVGlvxQbiEa/xGvuDKE5RQoZIvcxt7wAdqOW2Ybug==
X-Received: by 10.55.20.28 with SMTP id e28mr37227921qkh.269.1474393676535; Tue, 20 Sep 2016 10:47:56 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.200.43.164 with HTTP; Tue, 20 Sep 2016 10:47:54 -0700 (PDT)
In-Reply-To: <f16a836c-ed34-9a6e-c184-8593e4217fe2@isi.edu>
References: <CALx6S375-k7hEbC5YMsehWuCTczd=NzwCF8PdYew=vT_Ep+2-g@mail.gmail.com> <fcdcc884-2bf3-381d-8084-8bb845fb5ba8@isi.edu> <CALx6S36_YhTv7ddm9Op48OaQmz1MQ_2d31bjV7Cki1acNumBDw@mail.gmail.com> <f16a836c-ed34-9a6e-c184-8593e4217fe2@isi.edu>
From: Tom Herbert <tom@herbertland.com>
Date: Tue, 20 Sep 2016 10:47:54 -0700
Message-ID: <CALx6S35ZAVhQZR4Z2XW-pCUG9FOTY5LAhM4t3oKEU8hNH-3rWA@mail.gmail.com>
To: Joe Touch <touch@isi.edu>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtg-dt-encap-considerations/A9AWrwg1kgzTJdxB6_t0LMPwLsg>
Cc: Sowmini Varadhan <sowmini.varadhan@oracle.com>, "nvo3@ietf.org" <nvo3@ietf.org>, "rtg-dt-encap-considerations@ietf.org" <rtg-dt-encap-considerations@ietf.org>
Subject: Re: [Rtg-dt-encap-considerations] [nvo3] Alignment and Ethernet encapsulation
X-BeenThere: rtg-dt-encap-considerations@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 20 Sep 2016 17:48:04 -0000

On Tue, Sep 20, 2016 at 10:35 AM, Joe Touch <touch@isi.edu> wrote:
>
>
> On 9/20/2016 10:29 AM, Tom Herbert wrote:
>> On Tue, Sep 20, 2016 at 10:07 AM, Joe Touch <touch@isi.edu> wrote:
>>> Hi, Tom,
>>>
>>>
>>> On 9/20/2016 9:13 AM, Tom Herbert wrote:
>>>> ...
>>>> For new encapsulation protocols please consider the effects of IP
>>>> header alignment in the presence of Ethernet encapsulation. Defining
>>>> Ethernet encapsulation with the two byte padding like in ETHERIP may
>>>> help a lot to make implementation of Ethernet encapsulation feasible
>>>> on CPU HW.
>>> IMO, alignment needs to be handled within each encapsulation layer
>>> independently. I don't think it's useful to expect new encapsulation
>>> layers to have to make sure every layer of an encapsulated packet is
>>> aligned - just the first one ought to be sufficient. The rest is the
>>> responsibility of whomever added the other layers already in place.
>>>
>>> So yes, it's useful to make sure the encapsulated packet starts on a
>>> boundary that is 4-byte aligned, but the rest *needs to be* someone
>>> else's problem.
>>>
>> It's the Ethernet payload that we need to be four byte aligned not the
>> Ethernet header. Just aligning Ethernet header to four bytes is not
>> useful; that means the Ethernet payload, e.g. an IP packet, won't have
>> four byte alignment and hence the misery of trying to process the
>> packet. For the cost of two bytes ETHERIP gets things right in this
>> regard!
> If you've been handed Ethernet to encapsulate, then that is the header
> whose alignment you should be optimizing.
>
> As you point out, you can't align both IP and Ethernet to 4-byte
> boundaries at the same time.

You can if you insert a two byte pad before the encapsulated Ethernet
header like ETHERIP (RFC3378 does).

Tom