Re: [tsvwg] I-D Action: draft-ietf-tsvwg-udp-options-13.txt

Tom Herbert <tom@herbertland.com> Sat, 10 July 2021 15:19 UTC

Return-Path: <tom@herbertland.com>
X-Original-To: tsvwg@ietfa.amsl.com
Delivered-To: tsvwg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 28C7F3A0D64 for <tsvwg@ietfa.amsl.com>; Sat, 10 Jul 2021 08:19:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] 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 NrbltJIEPsMf for <tsvwg@ietfa.amsl.com>; Sat, 10 Jul 2021 08:19:22 -0700 (PDT)
Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 0F0B83A0D66 for <tsvwg@ietf.org>; Sat, 10 Jul 2021 08:19:21 -0700 (PDT)
Received: by mail-ej1-x62a.google.com with SMTP id gn32so22678811ejc.2 for <tsvwg@ietf.org>; Sat, 10 Jul 2021 08:19:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=herbertland-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=y8LfbYOPXB1TGqGh96vKIK84Sim6Ahq6iZMr/bXc+Po=; b=WFqMHQA/sXS0fDaUWNltRY8MILGMnV2ZlQxf84VK2ZmlFCJP03vRR1PJLL8c6QQ26i ihLsYucthti6lvDQMp6iDwCFXNrvyts+Z7Z/W3ueShqx6P1a497ram3VcqU48cgKCDoh ez9h4B1OAfdGYNtsVLCgs+8CxhH1n2UkgLqCvyrk55zvsq2feqWTAbWw7pQAevojtPNM Q9gRpNTV8HoYasarlzzdTzPQ6gbl4G3EYhgZcht3TSUnRVtgVSg3jxxzqOSbxgCGKWCT kLXZMv/Us0r6ptz5ww8PA7XAwYxvf1dehvbpaZEGgueaMTRLHyC3gThKqQneBoxe81VD kpQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=y8LfbYOPXB1TGqGh96vKIK84Sim6Ahq6iZMr/bXc+Po=; b=KGgCX8Aag9YuzUfXg1oeHZukkFRjmqVg9GsxdCmiDQxRwxYWvlTibtVEM01zfh1GoG AVitdFPLTlH2XYrA6+hF209tiFMtcFv1TGIFRcDfCrHuwoqmY9BwRq0OnEa9p9xf3l6s yMy65JPAkoH9SEzX3qN69qxBTdMtQ9/xSEmNlOJ+OxrAHjzskw77FpGRT4PuIQ73l47T hin4HZHIneHgCSqbRRO831h6/Yte8LAIYAI6JX1Ka/22z5ey8J1EOMVWyow/MMGklLDp F+vvaaCOVswF0UnyUZTscDeTXLwmJ6qnHT6C7TERGW23lL5itdAZR64Jnsb+n1TBvOkt t5Ew==
X-Gm-Message-State: AOAM532YUrFMlznv4UviSDvqgfCJD3Cp/dob0GdNxwzmtyOatQ4njnK3 ZxFOHK8u3L8CVjfvtXbTh5y5zYXY+QzKShgCtyh3tA==
X-Google-Smtp-Source: ABdhPJwxzXHE3JRuXznGtVFPH5K1YfgHChB6yuH89xdXvf6x4fVxXJzxa9mkg1d58W0EoA5alUKLMV5dFC7mP+Bd160=
X-Received: by 2002:a17:906:34ca:: with SMTP id h10mr20564230ejb.41.1625930359530; Sat, 10 Jul 2021 08:19:19 -0700 (PDT)
MIME-Version: 1.0
References: <162408795080.21706.5548660195641640175@ietfa.amsl.com> <C2C396E7-B728-496E-841B-D9F64004D3E3@strayalpha.com> <CACL_3VHC55cdu96=5OuNKmaaXrvDY5wkYid9a+j6=VtQrvJhZg@mail.gmail.com> <5086F1C2-55C9-4BD4-BB80-9C247E379204@strayalpha.com> <CALx6S373DmsGAncT8j2rGdpSfQ8q6pZi7iTVw4geZuxQdbA-sA@mail.gmail.com> <6E26E6BD-9AC0-46FF-8BA5-EDA016F840CE@strayalpha.com> <CALx6S352p8rboxD9k3bebLvep0rwk37y5avxbqFaFCsuQ_Nt2w@mail.gmail.com> <FE7B082E-B684-4D0A-B0F7-3761EBC25720@strayalpha.com>
In-Reply-To: <FE7B082E-B684-4D0A-B0F7-3761EBC25720@strayalpha.com>
From: Tom Herbert <tom@herbertland.com>
Date: Sat, 10 Jul 2021 08:19:08 -0700
Message-ID: <CALx6S36Avgjhz84rKc_=c1DCRsWHquSgztPT_7visUkacj+H8A@mail.gmail.com>
To: Joseph Touch <touch@strayalpha.com>
Cc: TSVWG <tsvwg@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/2uNKQOCrJXvHNFBcHyx6q0zbWdU>
Subject: Re: [tsvwg] I-D Action: draft-ietf-tsvwg-udp-options-13.txt
X-BeenThere: tsvwg@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Transport Area Working Group <tsvwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tsvwg/>
List-Post: <mailto:tsvwg@ietf.org>
List-Help: <mailto:tsvwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tsvwg>, <mailto:tsvwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 10 Jul 2021 15:19:27 -0000

On Fri, Jul 9, 2021 at 5:15 PM Joseph Touch <touch@strayalpha.com> wrote:
>
> Hi, Tom,
>
> > On Jul 9, 2021, at 3:21 PM, Tom Herbert <tom@herbertland.com> wrote:
> > ...
> > I don't know if it's a bad design, but I do know that IPv4 and TCP
> > have had a fixed checksum field that covers options for over forty
> > years.
>
> The field location is irrelevant; the issue for offload *calculation* is the location of the area being covered. For OCS, it’s the entire surplus area, which does not require TLV parsing to determine.
>
> Note, though, that IP may be in a fixed place, but covers only the IP header. The more relevant example is TCP, which is NOT fixed relative to the IP header (because there could be IP options).
>
> > Not unsurprisingly, implementators have long since figured out
> > how to optimize checksum calculation. Checksum offload is ubiquitous
> > and CPUs have add-with-carry instructions of 32-bit, 64-bit, or vector
> > instructions to optimize checksum calculation.
>
> Note: the OCS checksum start is just as well known as it is for TCP - once the UDP offset is known, the OCS always covers exactly the same area between the UDP Length and the end of the IP packet. It’s only the *check* of the OCS validation that can’t be offloaded as easily, but that’s not always offloaded either. Offload calculates the checksum; there’s not a big win in doing the check there unless bad packets are the norm.
>
> > Also, because of the
> > way checksum offload works both senders and receivers of UDP options
> > are likely to compute the checksum over the surplus area regardless of
> > whether the checksum field is present-- even today, a legacy receiver
> > will compute the checksum of surplus area in order to offset the
> > checksum received from the device in checksum offload. AFAICT, no
> > users are complaining about Internet checksum performance.
>
> Sure, but that doesn’t change here either - as noted. Wherever OCS is placed, the checksum always covers the whole “surplus” area.
>
> > In contrast to checksum calculation, walking TLV lists is still
> > considered a major problem for performance.
>
> And that’s still required for TCP and IP. We’re no different. That has no impact on checksum offload for UDP, only in option processing.
>
TCP and IPv4 do not require walking their respective options to
validate the checksum,  UDP options does at least when UDP checksum is
non-zero. If processing UDP options walks the list twice, once to
search for a specific TLV and once to process the rest of the options,
then relative to checksum processing for TCP and IPv4 that is a
performance degradation. Maybe there are other intended methods like
provisionally processing TLVs and throwing out work when a bad
checksum is detected or scoreboarding of TLVs, but those options are
not articulated in the draft nor are there any references to
implementation that show this.

Tom

> > The algorithm is an
> > inherently serialized loop that requires a number of conditionals
>
> And we have lived with that for years with TCP. The only difference here happens *outside* of offload optimization.
>
> Any device that offloads the rest of transport processing already walks TCP TLVs and can walk UDP ones just as quickly (or slowly).
>
> Joe