Re: [lisp] IPv6 UDP Checksum Offload Hardware and Software

Greg Shepherd <gjshep@gmail.com> Wed, 12 August 2009 21:17 UTC

Return-Path: <gjshep@gmail.com>
X-Original-To: lisp@core3.amsl.com
Delivered-To: lisp@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id BF95C3A690C for <lisp@core3.amsl.com>; Wed, 12 Aug 2009 14:17:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CqjgvBcBLebA for <lisp@core3.amsl.com>; Wed, 12 Aug 2009 14:17:30 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by core3.amsl.com (Postfix) with ESMTP id 7F47D3A67B2 for <lisp@ietf.org>; Wed, 12 Aug 2009 14:17:30 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 5so128934qwi.31 for <lisp@ietf.org>; Wed, 12 Aug 2009 14:16:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ZxLd4s3MTenxRYvBBgvOA4aCcqMOFDCBp2S9y2jxbF0=; b=HG4u3orlbpmdZWircTOO1QcVokiJm7YEMN7Iv6XFHcnGwnglpxK9BoYM0FjoITYH6p XBM+2igaWCyvmIkVLUFcpAwAim860qOKIZGqn5cnDdTZhAldbHWMMaDNJ3ktDSteM9CF NL7Adw8iNWjLoLwB0s73a6LAbMNoVZG4vF9m8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; b=ZXh/8w4yozLJR/BQA51O+MMle6Aw7Wwy1ZZi1VI34iJqPsjzufhyTS5qODNLArK6Hx 3AHd1oqaPeaGgHveyAdacv/7cjs5mtCk+4I24JmdOGMBSCzW0JFu/5SrEWrBIsRhJT4v AdPPQIonNDe8Ma159pegkPjpZTd7+6Dm5Xw+s=
MIME-Version: 1.0
Received: by 10.229.54.143 with SMTP id q15mr600995qcg.74.1250111778244; Wed, 12 Aug 2009 14:16:18 -0700 (PDT)
In-Reply-To: <E16765CF-F397-4833-89E2-A9B41ADC4D5C@sandstorm.net>
References: <38c19b540908121143m350139f4nd5932078c7ef310d@mail.gmail.com> <3BF49D1E-A78C-47F6-960B-3FBFC6A710B2@sandstorm.net> <38c19b540908121340t71eea744td7f7a42cf3f25a0@mail.gmail.com> <E16765CF-F397-4833-89E2-A9B41ADC4D5C@sandstorm.net>
Date: Wed, 12 Aug 2009 14:16:18 -0700
Message-ID: <38c19b540908121416k4d01d4fex55b75860fc89208c@mail.gmail.com>
From: Greg Shepherd <gjshep@gmail.com>
To: Margaret Wasserman <mrw@sandstorm.net>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: lisp@ietf.org
Subject: Re: [lisp] IPv6 UDP Checksum Offload Hardware and Software
X-BeenThere: lisp@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: gjshep@gmail.com
List-Id: List for the discussion of the Locator/ID Separation Protocol <lisp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/lisp>, <mailto:lisp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/lisp>
List-Post: <mailto:lisp@ietf.org>
List-Help: <mailto:lisp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lisp>, <mailto:lisp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Aug 2009 21:17:31 -0000

On Wed, Aug 12, 2009 at 1:59 PM, Margaret Wasserman<mrw@sandstorm.net> wrote:
>
> On Aug 12, 2009, at 4:40 PM, Greg Shepherd wrote:
>>>
>>> The current LISP specification requires ETRs to _all_ UDP checksums
>>> received
>>> in the outer header of encapsulated data packets, not just ones that are
>>> set
>>> to zero.  So, even if the ITR did calculate a checksum and insert a
>>> non-zero
>>> value into the UDP checksum field, the receiving ETR would not check it.
>>
>> An ITR won't do that. IF it did it is violating the LISP spec:
>>
>> "UDP Checksum:  this field MUST be transmitted as 0 and ignored on
>>     receipt by the ETR.  Note, even when the UDP checksum is
>>     transmitted as 0 an intervening NAT device can recalculate the
>>     checksum and rewrite the UDP checksum field to non-zero.  For
>>     performance reasons, the ETR MUST ignore the checksum and MUST not
>>     do a checksum computation."
>>
>> So let's limit our assumptions to the possible.
>
> It is certainly possible that a LISP ETR will receive an encapsulated LISP
> data packet with a non-zero UDP checksum.

True, but that's not what you stated above. I'm both reading and
responding in kind.

> The LISP spec documents at least one case where this could happen -- the UDP
> checksum could be changed by a NAT box or otherwise corrupted in transit.

Which is different than the ETR setting a non-zero checksum as I was
addressing above.

> Also, there are a lot of widely-deployed systems that offload the checksum
> to hardware, and on those systems it may not be possible to turn off
> checksum calculation for outbound packets.  So, those systems will send
> encapsulated LISP packets with non-zero checksums.

Show me one such system that has a LISP implementation. Again, let's
stick with the possible here. We're developing the spec now for LISP
implementations to follow.

> Dino has already agreed to change the text for LISP -04 to say:
>
> "An ITR MAY send a zero checksum, an ETR MUST accept a 0 checksum and MAY
> ignore the checksum completely."  (or something similar from Sam)
>
> So, this implies that ITRs may also send non-zero checksums.

Yes, a compromise to put this behind us and move on. :)

> Personally, I would greatly prefer to retain the ability to enable UDP
> checksums in LISP, just in case we ever find out that there are significant
> operational problems caused by our choice to ignore decades of research and
> experience that indicate that it is a bad idea to do so.

Can you please site such research, specifically for zero checksums in
UDP encapsulated headers where the inner header checksum is non-zero?
I clearly need to learn more.

>>>
>>> - Avoid the performance overhead of calculating UDP checksums.  The
>>> current
>>> spec proposes we do this by having ITRs set the UDP checksums in the
>>> outer
>>> headers LISP encapsulated data packets to zero.  This is fine in IPv4,
>>> compliance-wise, but is forbidden by RFC 2460.  Marshall Eubanks has a
>>> draft
>>> out to allow this in IPv6, as well.
>>
>> Yes, I'm aware of Marshall's draft. And the motivation for his draft
>> was not LISP but AMT, so you can see the disallowing of zero checksums
>> of an outer header is not unique to LISP. Clearly RFC 2460 overlooked
>> the needs of the community.
>
> It's quite a bit more complicated that than, if you consider our "community"
> to include all of the end-users of (non-LISP, non-AMT) UDP applications,
> whose applications may be disrupted by corrupted and misdirected LISP or AMT
> packets.

Have you read draft-eubanks-chimento-6man-00? It says nothing of
generic UDP. It is intended to specifically address the UDP
encapsulated outer header where the inner header checksum is in fact
calculated. Please help me understand how this would affect any
application dependent on the inner packet.

>>> - Make LISP work across widely-deployed, buggy NAT boxes that overwrite
>>> zero
>>> UDP checksums with invalid values.
>>
>> Well, since ITRs send packets to ETRs and ITRs are forbidden from
>> writing non-zero checksums any non-zero chechsum received has been
>> tampered with. We can either assume the entire packet is corrupt and
>> drop it or strip off the outer header and let the forwarding process
>> of the inner header determine the validity of the packet. The later
>> seems the better of the two choices.
>
> The problems don't really come in if the packet makes it to the right
> destination with the destination UDP port intact.  They come in when that
> doesn't happen.

And then they are dropped. End of problem.

>>> The proposal in the LISP spec is to
>>> accomplish this by having LISP ETRs ignore all UDP checksums, even
>>> non-zero
>>> ones.
>>
>> I'm not sure if you have a problem with this specifically or just the
>> documentation and IETF process to provide for this. Which is it?
>
> I think that the choice to disable UDP checksum for LISP is technically
> unwise, perhaps even reckless.

I believe you do. I just don't yet understand why. Sorry, but I'm trying.

Greg

> I also think that it violates some RFCs, but that is a lesser consideration.
>  If the WG does decide that sending IPv6 zero checksums and ignoring
> non-zero checksums on receipt is the right thing to do, and if the WG can
> convince the rest of the IETF that they are right, then updating RFCs is a
> fairly trivial matter.  In that case, we'd need Marshall's draft (or
> something similar) and a draft to update RFC 1812 to say it is okay to
> ignore non-zero checksums on receipt.
>
> There are _reasons_, though, why the current RFCs were written the way they
> were.  There is research and experience that has shown that packets that get
> corrupted in transit and misdirected to the wrong host or the wrong
> application cause serious problems.  Those problems won't be constrained to
> LISP or even to nodes that implement LISP.
>
> Margaret
>