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

Joseph Touch <touch@strayalpha.com> Sat, 31 July 2021 21:18 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 167C73A1BD8 for <tsvwg@ietfa.amsl.com>; Sat, 31 Jul 2021 14:18:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.318
X-Spam-Level:
X-Spam-Status: No, score=-1.318 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, HTML_MESSAGE=0.001, 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 7KIIEETyHBUV for <tsvwg@ietfa.amsl.com>; Sat, 31 Jul 2021 14:17:55 -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 666B63A1BD5 for <tsvwg@ietf.org>; Sat, 31 Jul 2021 14:17:55 -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:Cc:Date:In-Reply-To: From:Subject:Mime-Version:Content-Type:Sender:Reply-To: Content-Transfer-Encoding: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=6PsDH4aRQ6MpHxyJALsTiP9SVWbOmiaO37ulPZ9vWd4=; b=fBo494cr0BYTEfLqMyvrfigMZn nBA2zEMcMFnTbVWnWoqppb6p8mIncqx7rxqb+NmaM+yc6SpVGdNsjwMeZkNr1vbUmVAZdu4/U11wn xxvQnK7DAMsfkTwaN7c6A4b/sWLpULG4Q3ofanf0bhrs1AHfF7mB8bnrMgRrWiSXTwbftW2Z7mbBL /4F6vABqIMu88TqnfcNdtt/djhX8LmoXN20d1JD0VlMMoftw85zZDiGu5sxygsH8Q/mpTmU2ot4bc k4bvtH2cwVAulgUc4p2h1XVuWN2fl+Nlj+vF/rLr+jmpCDq9iK2Z7CM0EVEJSJrU8GKo6p79phSjL +ztRnTIA==;
Received: from cpe-172-114-237-88.socal.res.rr.com ([172.114.237.88]:62436 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 1m9wMf-000M91-W9; Sat, 31 Jul 2021 17:17:54 -0400
Content-Type: multipart/alternative; boundary="Apple-Mail=_2A8A73D7-DB12-4377-A31C-C5C34C17F95F"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
From: Joseph Touch <touch@strayalpha.com>
In-Reply-To: <C8CE3912-55B2-4DC0-AB39-2D6EA6953500@strayalpha.com>
Date: Sat, 31 Jul 2021 14:17:49 -0700
Cc: tsvwg <tsvwg@ietf.org>
Message-Id: <1178DE92-175A-4293-8A97-9B6FEBAF7B02@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>
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/5Q-RFeSuyqsBn6kYFCfpDCXCS98>
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, 31 Jul 2021 21:18:00 -0000

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.

The code cost is small; this way an implementation could decide when it can use a single DMA or no. The only hazard is that the transmitter decides - but for the UDP tunnel case, given both sides already need configuration, it should be simple enough to encourage transmitters to use the preferred case.

----

We could consider “Frag. End” to really just point to the start of the per-reassembled datagram options, so let’s instead call that field “Reassembled datagram option start”, or RDOS for short. Let’s assume there’s a “RDOE” (end pointer) as well, which we’ll compute.

If so, then we could allow those options to be either before the start of the fragment (where RDOS < Frag Start) or at the end of the packet (where RDOS > Frag Start).

If we allow that, then the code needs a condition to decide where the end of the packet is:

	if (RDOS < frag start) 
		then  // single DMA case
			frag end = IP packet end
			RDOE = frag start - 1
		else  // receive processing same as for non-terminals
			frag end = RDOS-1
			RDOE = IP packet end

At that point, the per-reassembled options are from RDOS to RDOE and the fragment is from frag start to frag end.

----


> On Jul 31, 2021, at 2:08 PM, Joseph Touch <touch@strayalpha.com> wrote:
> 
> Right - per fragment options would be OK, not per reassembled datagram.
> 
> Would that suffice?
> 
> Joe
> 
>> On Jul 31, 2021, at 1:42 PM, Tom Herbert <tom@herbertland.com> wrote:
>> 
>> On Sat, Jul 31, 2021 at 12:42 PM Joe Touch <touch@strayalpha.com> wrote:
>>> 
>>> 
>>> 
>>>> On Jul 31, 2021, at 11:58 AM, Tom Herbert <tom@herbertland.com> wrote:
>>>> 
>>>>> There’s no way that endpoint can ensure it never sees non-fragment UDP options, so it cannot support UDP options.
>>>>> 
>>>> For a tunnel, use of UDP options would just be another configuration
>>>> parameter at the end points; we don't need negotiation to send
>>>> non-legacy packets. If there's a mismatch in endpoint configuration
>>>> then the operator simply detects it and fixes it like any other tunnel
>>>> configuration problem.
>>> 
>>> Ok, the simply don’t set any per packet options and I’ll be fine.
>>> 
>> I think you might mean the other way around. Per packet options are
>> already defined in the draft to be in the headers, including the
>> fragment option, so there's no issue concerning protocol trailers.
>> There would only be a problem from options that apply to the
>> reassembled packet which would be in trailers of the last fragment.
>> 
>> Tom
>> 
>>> Joe
>> 
>