Re: [tsvwg] Way forward for UDP option FRAGs with limited router hardwara

"C. M. Heard" <heard@pobox.com> Thu, 07 April 2022 16:16 UTC

Return-Path: <heard@pobox.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 8C5463A0E60 for <tsvwg@ietfa.amsl.com>; Thu, 7 Apr 2022 09:16:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.108
X-Spam-Level:
X-Spam-Status: No, score=-2.108 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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=pobox.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 vhq39dkBteGB for <tsvwg@ietfa.amsl.com>; Thu, 7 Apr 2022 09:16:54 -0700 (PDT)
Received: from pb-smtp20.pobox.com (pb-smtp20.pobox.com [173.228.157.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 12F9D3A0EDB for <tsvwg@ietf.org>; Thu, 7 Apr 2022 09:16:53 -0700 (PDT)
Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 3182A180381 for <tsvwg@ietf.org>; Thu, 7 Apr 2022 12:16:48 -0400 (EDT) (envelope-from heard@pobox.com)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:cc:content-type; s=sasl; bh=i7gXgIa1+/ecafYkaWC1XibwFXf6FSIT LpuOzU+HjOQ=; b=Jc+mhGeb5/+qZWR5SrSdfpTWvC8WOEdIAuQmDDhSUNe+GDSn a+ngV0M7g2av9oRxo4Ti9OvvlQDfBYK6EB2j6S6obJWbHM33mloV5J/9EYqVIzcC 5nNJkFzkEOnn4FVSHm7e/6lQtFuhCs6jsRU8yeLwpDDmB5qabM5FmrIK7vI=
Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 2A88F180380 for <tsvwg@ietf.org>; Thu, 7 Apr 2022 12:16:48 -0400 (EDT) (envelope-from heard@pobox.com)
Received: from mail-vs1-f48.google.com (unknown [209.85.217.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 570B018037B for <tsvwg@ietf.org>; Thu, 7 Apr 2022 12:16:44 -0400 (EDT) (envelope-from heard@pobox.com)
Received: by mail-vs1-f48.google.com with SMTP id e11so4113637vso.7 for <tsvwg@ietf.org>; Thu, 07 Apr 2022 09:16:44 -0700 (PDT)
X-Gm-Message-State: AOAM530DpL/OmRx9AJyzIU0cbYejvumV4Z5gYnib+2CUmhfK7UPIonag 6m1ECHYF0JyiHHI5LmHx5Ca93KKKPIg2TET2zCo=
X-Google-Smtp-Source: ABdhPJyhUvU2ktowaQqcKdY02U0hzqjYb0SmUW0BOHUpfMTaLyFqYhDxapYWcHNJK8FaDFqvLP9esfquh9GUaFi8JwM=
X-Received: by 2002:a05:6102:c91:b0:325:e47d:bab2 with SMTP id f17-20020a0561020c9100b00325e47dbab2mr4771498vst.35.1649348202809; Thu, 07 Apr 2022 09:16:42 -0700 (PDT)
MIME-Version: 1.0
References: <CACL_3VGkhYC2vH6qsgAAhc5g3rb5HSWUjiYR-ZYkYp7Nd3Hhsg@mail.gmail.com> <6BEA0B29-2E5E-475B-815B-4FC86D4021A2@strayalpha.com> <E95C185F-0517-4CBA-9534-2F7CE0AC7C4F@strayalpha.com> <CACL_3VHuUPt9Q3qM=NnaTthHSU+mBV-8QaBwYd-0OAweQrBmUQ@mail.gmail.com> <4B53B30F-48DF-4A75-BC7A-AD950D4E3468@strayalpha.com> <2A720C62-BAA4-499E-B747-35FB79233794@strayalpha.com>
In-Reply-To: <2A720C62-BAA4-499E-B747-35FB79233794@strayalpha.com>
From: "C. M. Heard" <heard@pobox.com>
Date: Thu, 07 Apr 2022 09:16:29 -0700
X-Gmail-Original-Message-ID: <CACL_3VH-tKP1jc==RTrDfyDDdrvYVy-W5hgT8fdn6jo3knPEEw@mail.gmail.com>
Message-ID: <CACL_3VH-tKP1jc==RTrDfyDDdrvYVy-W5hgT8fdn6jo3knPEEw@mail.gmail.com>
To: Joe Touch <touch@strayalpha.com>
Cc: TSVWG <tsvwg@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000bd50ec05dc12cda7"
X-Pobox-Relay-ID: 1DD43988-B68E-11EC-98E1-C85A9F429DF0-06080547!pb-smtp20.pobox.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/qbycDNzK41ZijjEip57VUwd1SZA>
Subject: Re: [tsvwg] Way forward for UDP option FRAGs with limited router hardwara
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: Thu, 07 Apr 2022 16:16:59 -0000

On Tue, Apr 5, 2022 at 8:34 AM Joe Touch wrote:

> A few more notes:
>
> I was assuming “offset=0” is the starting fragment offset, though the
> current text indicates this would be offset=8. We can pick either starting
> point (i.e., either the start of the original UDP header or the end of that
> header). So read the note below with that context, i.e., ‘whatever the
> offset of the first fragment is’…
>
> And throughout the rest, I’m giving a broad quick summary; please try to
> focus on the basic idea and assume we can work out the rough edges that
> don’t concur with text in the current draft, unless you see a deal-breaker
> that I missed. I.e., when this proposal differs with the doc, assume the
> doc will be pulled in line with this proposal...
>

Understood and agreed to. I don't much care whether FRAG.OFFSET = 0 or
FRAG.OFFSET = 8 indicates the first fragment, as long as the final spec
tells a consistent story. For definiteness in the example that I provide
below, I will assume that all offsets are measured with respect to the
appropriate UDP header, so FRAG.OFFSET = 8 indicates the first fragment in
that example.

On Mon, Apr 4, 2022 at 9:14 AM Joe Touch  wrote:
>
>> I think there may already be a way forward here that allows users to pick
>> from a variety of ways to support FRAGs that may satisfy the needs of
>> constrained-implementations of router header processing.
>>
>> The current draft defines the terminal FRAG option as follows:
>>
>>                    +--------+--------+--------+--------+
>>                    | Kind=3 | Len=12 |   Frag. Start   |
>>                    +--------+--------+--------+--------+
>>                    |           Identification          |
>>                    +--------+--------+--------+--------+
>>                    |  Frag. Offset   | Dgram Opt Start |
>>                    +--------+--------+--------+--------+
>>
>>                 Figure 11   UDP terminal FRAG option format
>>
>>
>> We can simply allow Dgram Opt Start (DOS) to be anywhere, not just at the
>> end of the user data.
>>
>
> %%
> To be more clear: we can REDEFINE DOS to be anywhere...
>
>
>> I.e.: if DOS is larger than FRAGSTART, then the per-packet options are at
>> the end of the packet.
>>
>
> %%
> To be more clear again, the NEW definition of DOS would be:
>
> If DOS is larger than the FRAGSTART *of the first fragment (offset=0)*
> then the per-packet options are at the end of the packet.
>
>
> If DOS is smaller than FRAGSTART, then it indicates the end of the
>> per-fragment options and start of per-packet options, all of which precede
>> the frag data.
>>
>
> %%
> And again more clearly:
>
> If DOS is s smaller than the  FRAGSTART *of the first fragment
> (offset=0)*, then it indicates the end of the per-fragment options and
> start of per-packet options, all of which precede the frag data.
>
> [ ... ]

> - Frag. Start indicates the location of the beginning of the fragment
> data, ***measured from the beginning of the UDP header of the fragment***.
>
>
> That definition would stay.
>
> - The terminal FRAG option format adds a Datagram Option Start pointer,
> ***measured from the start of the original UDP datagram  header***,
>
>
> That part stays, but the next is now CHANGED as above (see %%):
>
> indicating the end of the reassembled data and the start of the surplus
> area after the original UDP datagram.
>
>
> The changed text would be something like:
>
> Indicating the start of the options, which could occur either after the
> original UDP datagram or before.
>
> [ ... ]

> I’m allowing DOS to point before the FRAGSTART of the fragment when
> FRAGOFFSET is zero, which then becomes the demarcation between per-fragment
> and per-packet options.
>
>
With apologies, I am still having a very hard time figuring out how this is
supposed to work. FRAG.START is an offset ***within a fragment*** and any
data in that fragment that occurs before that point contains per-fragment
options that are not part of the reassembled packet. That applies in
particular to the first fragment (wherein FRAG.OFFSET is eight, if we
reckon such offsets with respect to the start of the UDP header). DOS,
which appears in the final fragment only, is an offset ***within the
reassembled datagram***, as is FRAG.OFFSET. To my small mind, it seems
that FRAG.START
is ***incommensurate*** with DOS. I'm not sure what it means to say that
DOS points before FRAG.START, since they are offsets within different data
structures. Also, when there are multiple fragments, DOS appears in a
***different*** fragment than the FRAG.START with which it is to be
compared.

Moreover: it is not difficult to concoct an example of an atomic fragment,
constructed under the rules in -18, that has DOS numerically smaller than
FRAG.START. Start with a UDP datagram having the usual 8-byte UDP header,
32 bytes of UDP user data (so UDP Length = 40), and some trailing
per-datagram options -- for definiteness, let's say OCS and a TIME option,
for a total of 12 bytes (though this does not really matter). Let's suppose
that we wish to  encrypt this using a per-fragment UENC option; again for
definiteness, I assume that the UENC option uses a 16-byte MAC and so has a
total length of 20 bytes. The on-the-wire packet will then have a UDP
header that is 8 bytes long with its length field set to 8, a two-byte OCS,
two one-byte NOPs for alignment, a terminal FRAG option with a length of 12
bytes, and a UENC option with a length of 20 bytes. Irrespective of the
order of the FRAG and UENC options, we have FRAG.START = 44, FRAG.OFFSET =
8, and DOS = 40.


> This is preferable to using the FRAG option itself as the demarcation (as
> Tom had suggested) because it allows FRAG to remain up front, enabling DMA
> without long-chain TLV searches.
>
> Again, *IF WE ALLOW DOS to point before the first FRAGSTART*, then we do
> give up having the reassembled packet have exactly the same format as if it
> were not fragmented. I would prefer to not do this, especially to support a
> router hardware implementation decision that has no basis in RFC
> requirements, but we can if it’s consensus to do so.
>
>
If I understand the ***intent*** of the proposal to allow DOS to point
before the first FRAG.START, it is to allow a special format for
reassembled packets, in addition to the one already in -18, wherein the
reassembled packet has exactly the same format as if it were not
fragmented. If we give that up in some cases, I would MUCH prefer to end up
with just one one format for reassembled packets. Specifically: I think we
should keep the existing format for unfragmented packets that contain
options in an (optional) trailer, and have another format with all options
at the front for packets that lack conventional UDP data. And if we take
that route, my sense is that we would be better off to adopt something
along the lines of what is proposed in
https://datatracker.ietf.org/doc/html/draft-herbert-udp-space-hdr for those
packets. I can see how to make that work, and in the cases that I have
worked out, it saves space compared to having a FRAG option as in -18 and
still satisfies the desideratum of having the FRAG control information
early to facilitate DMA offload for reassembly. I'll take the time to
provide details if there is WG interest. If not, I am satisfied to proceed
with -18 (modulo polishing of rough edges) with documentation of the
limitations as Mr. Herbert requests.

Mike Heard




>