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

Joseph Touch <touch@strayalpha.com> Sun, 01 August 2021 17:48 UTC

Return-Path: <touch@strayalpha.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 8002E3A00E3 for <tsvwg@ietfa.amsl.com>; Sun, 1 Aug 2021 10:48:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.319
X-Spam-Level:
X-Spam-Status: No, score=-1.319 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=strayalpha.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 E0oR45k0NO4D for <tsvwg@ietfa.amsl.com>; Sun, 1 Aug 2021 10:48:29 -0700 (PDT)
Received: from server217-4.web-hosting.com (server217-4.web-hosting.com [198.54.116.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B46283A00E2 for <tsvwg@ietf.org>; Sun, 1 Aug 2021 10:48:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=strayalpha.com; s=default; h=To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=IpSrlvwSAoXcgsNLbMnkVF237LTkcFEVDOmjBLeCys8=; b=Ct4eBgGsFxvwEhnX7orN2Bowey nBDY98GWUZMgp3taRmok6zHWIZFmBh7pF/gFMcBv9lcDenY7xy9mZlrXGSVM106RegnM+KlPx7YlW PuxN8cbJOPzcznmRAR5R/U9FxuPVGo+rTMupjbGjogmJ1i0GEjVdvw4Fn32LMaFWGBW6Iqw8TkwB8 f7Vh5CT0OJcAqB800zCKwZjcHoCE/IpIHmnAnCt3RXvGUd+eMPFRBAdSn2/9zJBNfdDXJuO3lNbLx 9NnfWs/KBf+b9mqgPtypaKTM/k8ElwuHSNmn+YFWSDbOJyJEVizMLXomlwfRQWTQn1Wgb7gEQSaXF UIjQYd9g==;
Received: from cpe-172-114-237-88.socal.res.rr.com ([172.114.237.88]:64911 helo=smtpclient.apple) by server217.web-hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <touch@strayalpha.com>) id 1mAFZX-001Fwm-Jb; Sun, 01 Aug 2021 13:48:27 -0400
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
From: Joseph Touch <touch@strayalpha.com>
In-Reply-To: <CALx6S35tB=j5y3-xr5S22y0p+WJxKX_hqk8rm30oCruFxZp5Dw@mail.gmail.com>
Date: Sun, 01 Aug 2021 10:48:22 -0700
Cc: tsvwg <tsvwg@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <87662B22-F63B-4EA4-94B3-DF4B2439A4E1@strayalpha.com>
References: <CALx6S37zVVXnCH+Dv7_QXgwOoqcL4h0SThh+LnmAWn-5enprZQ@mail.gmail.com> <FA155FD9-2319-405C-B082-C023DEC2BF28@strayalpha.com> <CALx6S3435ZjAz8ECgbFbH=Hxm-cXAGRQjTbxgtGb9U-CTXMw=A@mail.gmail.com> <C8CE3912-55B2-4DC0-AB39-2D6EA6953500@strayalpha.com> <1178DE92-175A-4293-8A97-9B6FEBAF7B02@strayalpha.com> <CALx6S35tB=j5y3-xr5S22y0p+WJxKX_hqk8rm30oCruFxZp5Dw@mail.gmail.com>
To: Tom Herbert <tom@herbertland.com>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-OutGoing-Spam-Status: No, score=-1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server217.web-hosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - strayalpha.com
X-Get-Message-Sender-Via: server217.web-hosting.com: authenticated_id: touch@strayalpha.com
X-Authenticated-Sender: server217.web-hosting.com: touch@strayalpha.com
X-Source:
X-Source-Args:
X-Source-Dir:
X-From-Rewrite: unmodified, already matched
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/hFR_bWFDjaUDvbQDo6Lr2aO4m18>
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: Sun, 01 Aug 2021 17:48:34 -0000


> On Aug 1, 2021, at 10:03 AM, Tom Herbert <tom@herbertland.com> wrote:
> 
> On Sat, Jul 31, 2021 at 2:17 PM Joseph Touch <touch@strayalpha.com> wrote:
>> 
>> FWIW, there’s another option here, which could be considered unnecessarily complex if there’s no need for per-reassembled datagram options for most UDP tunnels….
>> 
>> ----
>> 
>> Right now, the terminal fragment has a header as follows:
>> 
>>                   +--------+--------+--------+--------+
>>                   | Kind=4 | Len=12 |   Frag. Start   |
>>                   +--------+--------+--------+--------+
>>                   |           Identification          |
>>                   +--------+--------+--------+--------+
>>                   |  Frag. Offset   |    Frag. End    |
>>                   +--------+--------+--------+--------+
>> 
>>                Figure 12   UDP terminal FRAG option format
>> 
>> As to whether to put the per-reassembled options before or after the terminal fragment, we could let the user decide (again, consistent with the idea of UDP), as follows.
> 
> Joe,
> 
> I suggest that the per-reassembled options be in headers in the first
> fragment. This would work by specifying that options preceding the
> fragment option are per-packet, options following the fragment option
> in the first fragment apply to reassembled packets, and options
> following a fragment option in non-first fragment would be ignored.

Again, that means that the FRAG option itself would float far inside the TLV list, which complicates DMA.

Also, the trailing variant allows per-reassembled options to be arbitrarily long (limited by the reassembled length), rather than requiring them to fit inside a single fragment.

That’s a key reason for using trailing options - no limit on length, even with fragmentation. That’s why we need a version that allows that, otherwise the options would be limited to what will fit in exactly one option.

> So, in this manner fragments don't have any protocol trailers and
> therefore Frag. End isn't needed and can be removed from the fragment
> option saving two bytes (the end of the fragment would coincide with
> the end of the packet).

But then we need at least one byte back for the one bit to indicate last-fragment.

> As I mentioned previously, there are other
> advantages to placing the options that apply to the reassembled packet
> in the first fragment instead of the last.

We need to keep a way to allow arbitrary option lengths; every fixed header approach to that ends up hitting a limit that later needs a workaround (see the work on extending the TCP header).

> In the tunnel case we'd also cases where UDP options might be sent
> that are not fragments, however we still need to know where the
> payload begins. In the fragment option this is the Frag. Start field,
> but sending a whole fragment option just to convey these two bytes of
> information would be way overkill. IMO a better approach is to
> indicate the length of the options in a fixed header preceding the
> options since the information is always required.

We’ve been down the path of fixed headers before. It wastes space for some uses to conserve it for others. E.g., in tunnel cases where UDP CS==0, it would waste space for OCS when not needed.

Joe