Re: [tsvwg] UDP options and header-data split (zero copy)

Tom Herbert <tom@herbertland.com> Sat, 17 July 2021 21:57 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 4B0863A238E for <tsvwg@ietfa.amsl.com>; Sat, 17 Jul 2021 14:57:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_BLOCKED=0.001, 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 ln06nYe9dA2Y for <tsvwg@ietfa.amsl.com>; Sat, 17 Jul 2021 14:57:33 -0700 (PDT)
Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 1B3A13A238D for <tsvwg@ietf.org>; Sat, 17 Jul 2021 14:57:32 -0700 (PDT)
Received: by mail-ed1-x533.google.com with SMTP id dj21so17876519edb.0 for <tsvwg@ietf.org>; Sat, 17 Jul 2021 14:57:32 -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=mIFhB3uDYNKc3HvSi85oHVU3LGr+Tj0RQx2vAUYLuag=; b=2SW9CpBqsv9rwbXoXVCUSkjv83e/gmrGGp3a2lm+0Ef2KAACnDNHCP7QKQUzz5k1g1 vopIRiwjQ2xeEqqvhSK57/GS/PzKagDpB6ebU6vy4YJGRmxHVhyDWR2VjP7iwDb11yNO XyUIConXEF5Sq7no9LwClk0ZlStg28oZfx1WowHaGnQwdQfQtr30cN+wUzWRfKRZnnTx +4wHDZmW8+lE8kyP3pjYihkmnpORRbMpEKMzDuvtah2ADOm5mayTN7iW0RHzJ1QFaahm JK8E+OiSzrWLheAxs+8vX22pcTx3i/yTIWUef1wFfG2RF/xsISOS6yMhjDnGAigA6dYI XUgw==
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=mIFhB3uDYNKc3HvSi85oHVU3LGr+Tj0RQx2vAUYLuag=; b=ANW9D7COf0WUAhuvdSvbqZzxM6Jqh8wC85q98jBullXiuUvzVtyetO8t9VmWNsD1yB GqPnnmnt1TeU2+aN9DUPBUyGtULBZFv5auGx6imK8N7f3cGqdcViK8tp3stTZZ4GnHBB 1QiMXCMiRuuwkPCdQ+pJkRBAf4IMz4z0Zs3gts2R4KhvIQn2BLHhjmXX89PsKu9QOAWX uwxIT7Sy/edsOoq4moZypfj7EyjqJ93x5skiZOcyGlyaUFdRL7qmOgoj224Ab3A5pj3m 8heTM4F/wQ2TfEmJi0Lgw8YtdNmP3aC3TLBi4swUix5HoGEvpH0dz3A/ONIiJ4wGljfK qieA==
X-Gm-Message-State: AOAM531LcC7X+JdWSLuerdeUiUmIU8FrvMAXrklk8KH9KgcKeHOMSXTO +C7muQqTCpGMyMU+1t9jQ/E/1OPDoVhLXmxHbLmEpw==
X-Google-Smtp-Source: ABdhPJy0XjHcrMQq+lcaUFPhUwQ6ot7QWJ68ND3dzO9SCcJFvPG6d0K51CZyA9u4C9Ofkh5tjbTbkiyUu+mvuyEr6+M=
X-Received: by 2002:a05:6402:2023:: with SMTP id ay3mr23928909edb.383.1626559050680; Sat, 17 Jul 2021 14:57:30 -0700 (PDT)
MIME-Version: 1.0
References: <CALx6S36F6dVnbxSfNXwQVvbi+mOuedTbn+jLM5-Q87hjxFM+qw@mail.gmail.com> <05A8BF71-5362-484E-A71A-546C052BDFAB@strayalpha.com> <CALx6S36LOE9eRn6Q2FLoPyf1yVt+c9ekJ5k0wjGOFDx9kn_pMQ@mail.gmail.com> <D7F4C5FB-3064-41D2-8E21-6CE9EFB29D1B@strayalpha.com>
In-Reply-To: <D7F4C5FB-3064-41D2-8E21-6CE9EFB29D1B@strayalpha.com>
From: Tom Herbert <tom@herbertland.com>
Date: Sat, 17 Jul 2021 14:57:19 -0700
Message-ID: <CALx6S34WtGABWJEL_CBJAhSFb9JpR97Dr9emX-K0PxUGZ3VvnQ@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/5ma9_JgYlr-C5ZedaKXvsDq8UlI>
Subject: Re: [tsvwg] UDP options and header-data split (zero copy)
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, 17 Jul 2021 21:57:39 -0000

On Fri, Jul 16, 2021 at 3:45 AM Joseph Touch <touch@strayalpha.com> wrote:
>
> Hi, Tom,
>
> > On Jul 15, 2021, at 2:50 PM, Tom Herbert <tom@herbertland.com> wrote:
> >
> > On Thu, Jul 15, 2021 at 2:32 PM Joseph Touch <touch@strayalpha.com> wrote:
> >>
> >> ...
> >> And there is no way to avoid trailers for non-fragmented packets.
> >>
> > Right trailers are only needed in that case. In the case of fragment
> > using both headers and trailers simultaneously is unnecessary
> > complexity that provides no benefit.
>
> If I put per-fragment as headers and post-fragment as trailers, I can do the following processing:
>
> Outbound:
>         A- add/process all (safe) per segment options
>         B- if there are any unsafe options or fragmentation is needed for space:
>                 B.1- split as needed
>                 B.2- process per-fragment / unsafe options on the resulting fragments
>         C- transmit
>
> Inbound does the converse.
>
> In both cases, I can simply skip step B if fragmentation isn’t used/needed.
>
> If all the headers come first for fragments - even the per-segment ones, I either need two versions of step A (one for fragments, one for not) or I need to shuffle the trailer to the header between steps A and B.

If I'm reading the draft correctly, it is possible that UDP options
could appear both in the headers and trailers of a packet. If that is
correct, then that means an implementation needs to be able to handle
both headers and trailers within the *same* packet.

>
> —
>
> Your claim that “trailers are ONLY needed…” (emphasis mine) does not consider that “trailer processing IS needed”.
>
> And whenever there are trailers, there are both headers (the current UDP header) and trailers (UDP options), by necessity.
>
> So having two versions of the option location complicates things in the middle of option processing.
>
> The only objection you have raised is that this will hinder processing that’s already hindered. If there’s a slow path here, IMO it ought to be for fragments, not non-fragments.
>
Protocol trailers are the outlier here. There are existing
implementations and common implementation techniques that will not
handle protocol trailers gracefully (header-data split and RX zero
copy are one example). If protocol trailers are required in all cases
of UDP options, then it's likely that there will be a significant
portion of implementations that either won't support UDP options or
will summarily relegate them to a slow path-- the net effect is that
usability oI UDP options is limited and adoptions of UDP options is
hindered. Conversely, if the requirement is narrowed so that protocol
trailers are only required in legacy mode, then UDP options become
feasible at least in non-legacy mode for those implementations that
can't handle trailers and hence that facilitates wider adoption.

Tom

> Joe