[tsvwg] UDP Options - per segment or per datagram

"C. M. Heard" <heard@pobox.com> Sat, 26 June 2021 23:53 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 587B53A0BCC for <tsvwg@ietfa.amsl.com>; Sat, 26 Jun 2021 16:53:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 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, 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 wYwDhw8wivjn for <tsvwg@ietfa.amsl.com>; Sat, 26 Jun 2021 16:53:49 -0700 (PDT)
Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9E8793A0BCB for <tsvwg@ietf.org>; Sat, 26 Jun 2021 16:53:48 -0700 (PDT)
Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id B4DB1C23E5 for <tsvwg@ietf.org>; Sat, 26 Jun 2021 19:53:43 -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=sgtZTuasnmwSaZa+ZBTngma8ocFA4TiR 4EpHuBuMvdM=; b=xtorrTe4VxiSJ/pctojHzuxhQfBzwgrIZFjKtMszCZxV/rW8 7SF8MgM4OQK5mv4gt+9tWFqBCCijuqTRPsXHvp2yyryFBoitxI3NO5fsRyTZSCt7 rngYpZvOOsCsuwAUzTIs/rhHeVEY1DvPiZ/E71Wimk43K7pjdtxmF4WGiDs=
Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id AC902C23E4 for <tsvwg@ietf.org>; Sat, 26 Jun 2021 19:53:43 -0400 (EDT) (envelope-from heard@pobox.com)
Received: from mail-io1-f41.google.com (unknown [209.85.166.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 39E01C23E3 for <tsvwg@ietf.org>; Sat, 26 Jun 2021 19:53:43 -0400 (EDT) (envelope-from heard@pobox.com)
Received: by mail-io1-f41.google.com with SMTP id o5so17405876iob.4 for <tsvwg@ietf.org>; Sat, 26 Jun 2021 16:53:42 -0700 (PDT)
X-Gm-Message-State: AOAM5326SGF2ZPq9iyNG8fGRLAlYDSnCREqd4WZDzZcB8/LKa7CQ/+XH G1cQUiOCSFzFfJzzai9b3vfhHh60heU5K4qztiE=
X-Google-Smtp-Source: ABdhPJykngkCBK5ZH9h2xtm5OHeWoFyLyVrUzNhxoJQQEehkeutuaQSEjOEaeQyakLyYLaXIBCfnqkQccJhBgBZHSLU=
X-Received: by 2002:a02:90cb:: with SMTP id c11mr16376075jag.53.1624751622380; Sat, 26 Jun 2021 16:53:42 -0700 (PDT)
MIME-Version: 1.0
References: <CACL_3VG9w3xsoOFqit_YHB5gTztWMQrcYo6km2cRtWmwGjHAjg@mail.gmail.com> <60AAD6ED-4506-4C06-BA2D-A918C8197CFB@strayalpha.com> <CACL_3VHCdvkCf-zqbLvsmBZ+964ecUhBuJEiJZi7MFS2dxDMww@mail.gmail.com> <47F0F088-F252-4DB9-AC20-2A1B0D4AE6FF@strayalpha.com>
In-Reply-To: <47F0F088-F252-4DB9-AC20-2A1B0D4AE6FF@strayalpha.com>
From: "C. M. Heard" <heard@pobox.com>
Date: Sat, 26 Jun 2021 16:53:30 -0700
X-Gmail-Original-Message-ID: <CACL_3VGWa3Wcu-r_1CWx06h9DXz9PMBd5wDUmmmL7newdtSUDA@mail.gmail.com>
Message-ID: <CACL_3VGWa3Wcu-r_1CWx06h9DXz9PMBd5wDUmmmL7newdtSUDA@mail.gmail.com>
To: Joseph Touch <touch@strayalpha.com>, Gorry Fairhurst <gorry@erg.abdn.ac.uk>
Cc: TSVWG <tsvwg@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000004ce2b005c5b3f7da"
X-Pobox-Relay-ID: BD069FA4-D6D9-11EB-9860-FD8818BA3BAF-06080547!pb-smtp2.pobox.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tsvwg/LF9rUkkqkz9gNqya36SW39XgliE>
Subject: [tsvwg] UDP Options - per segment or per datagram
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, 26 Jun 2021 23:53:55 -0000

On Mon, Jun 14, 2021 at 11:51 AM Joseph Touch  wrote:

> On Mon, Jun 14, 2021 at 11:14 AM C. M. Heard wrote:
>
>> On Mon, Jun 14, 2021 at 10:17 AM Joe Touch wrote:
>>
>>> Yes, but we still need the fraglen field in the last frag too.
>>>
>>
>> No, it is not necessary, if every option precedes the FRAG header.
>>
>> See the format I posted this am.
>>>
>>
>> I did read it. If I correctly understand what you wrote, there is an
>> underlying ASSUMPTION that options that apply per-fragment need to precede
>> the FRAG header and those that apply to the reassembled datagram have to
>> appear afterward. To be clear, I do not dispute that such a design will
>> work; it will. What I dispute is that it is necessary.
>>
>> In the design that I presented earlier, I also made an implicit
>> assumption that whether an option applies to an individual fragment or to
>> the reassembled datagram can be determined from the Option Kind (or UKind
>> or ExID). Going down the list:
>>
>> EOL - not applicable (FRAG consumes all trailing data)
>> NOP - per fragment
>> OCS - per fragment
>> ACS - per datagram
>> FRAG  - per fragment (obviously)
>> UNSAFE - depends on Ukind
>> TIME - per datagram
>> AE - per fragment (see below)
>> REQ, RES - per datagram
>> EXP - depends on UDP ExID
>>
>
> First, you can’t go down a list that includes options to be defined,
> unless we further fracture the option space into pre/post reassembly.
>

What I had in mind was that the definition of each option that the higher
layer could request would specify whether it applied to the entire
reassembled datagram (thus appearing only in the terminal fragment) or to
each individual fragment (thus appearing in each). Options that are
produced and consumed entirely at the transport layer would be per-fragment.

Logically, this is similar to the IPv4 Copied on Fragmentation flag, which
is specified for each IPv4 option, but with two important differences:

1. Since there is no such thing as in-flight UDP fragmentation -- it occurs
only at the source -- there is no need for the fragmentation engine to
worry about options it does not understand; the higher layer simply cannot
request these options.

2. In IPv4 EOL and NOP are not copied on fragmentation, but they also
cannot be explicitly requested by the higher layer. They exist solely for
the convenience of the layer where they are used. On transmit, they are
inserted as needed; on receive, they are consumed. These options can appear
in any fragment, but they do not make their way to the higher layer layer
with the payload of the received datagram.

In the cases -- rare, IMO -- where either behavior would be appropriate, it
can be distinguished by Option Kind or UKind.

Second, many of the examples you give as “known” are not:
> NOP can be needed for padding in either place.
> UNSAFE can’t be known in advance
> TIME can be per frag (for path RTT) or per segment (aggregate delay)
> REQ/RES can be either as well.
> AE for sure - it’s a trade between per-fragment safety and per-datagram
> efficiency
>

I think I explained NOP and EOL. I already said that the behavior of any
UNSAFE options would depend on UKIND, i.e., the definition of the
particular unsafe option would state whether it applies per-datagram or
per-fragment.

If TIME can be requested by the upper layer, what is the meaning if the
option is requested for a datagram that gets split into multiple fragments,
and the option is replicated in every fragment? I can see the per-fragment
argument but only when the option is produced and consumed at the UDP layer
-- as is the case for the corresponding TCP option (which appears on every
segment if it is negotiated). If it's intended to be produced and consumed
by the higher layer, it should be per-datagram.

The REQ and RES options exist for the benefit of DPLPMTUD and are intended
to be sent on a PLPMTU Probe Packet, which itself must not be further
fragmented (the probe packet will not serve its purpose if it is fragmented
to make it get to its destination). Ideally, these options are used on
packets with padding only and no user data; such packets would be generated
and consumed entirely within the transport layer or a shim. As they are not
subject to fragmentation, they can be considered complete datagrams. In
addition, it seems to me that there is little or no value in taking a REQ
option from the user and replicating it on every fragment of a datagram
that needs to be fragmented; this causes duplicate REQ tokens. Gorry, any
thoughts? (*)

AE (now AUTH and ENCR, as of -13) can protect  (AUTH) or depend on (ENCR)
all the options, if so configured. Certainly in that case it needs to be
per segment. It's possible to specify per-datagram versions -- possibly
including only per-datagram options, in some normalized form after
reassembly -- but this seriously complicates the specification. Do you
really want to do that?

(*) As an aside I see that draft-fairhurst-tsvwg-udp-options-dplpmtud-04
allows one packet contain RES options for multiple REQ datagrams; this
currently is not allowed in draft-ietf-tsvwg-udp-options-13:

   >> Except for NOP, each option SHOULD NOT occur more than once in a
   single UDP datagram. If an option other than NOP occurs more than
   once, a receiver MUST interpret only the first instance of that
   option and MUST ignore all others.


This is an inconsistency that needs to be resolved.

Mike Heard