Re: [tsvwg] UDP Options API document

Tom Herbert <tom@herbertland.com> Tue, 14 September 2021 19:14 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 765E73A2989 for <tsvwg@ietfa.amsl.com>; Tue, 14 Sep 2021 12:14:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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 o1xFFCjy6XXv for <tsvwg@ietfa.amsl.com>; Tue, 14 Sep 2021 12:14:01 -0700 (PDT)
Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 783893A2986 for <tsvwg@ietf.org>; Tue, 14 Sep 2021 12:14:01 -0700 (PDT)
Received: by mail-ed1-x52a.google.com with SMTP id 9so336946edx.11 for <tsvwg@ietf.org>; Tue, 14 Sep 2021 12:14:01 -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=/CAcJpBAQaG69pQ3iQF49xkuS+cTIDN0IlrUYy6BkTs=; b=zoM6EaDOKkHKtb6DwsQJsDF+ChkXIrXsAGz11ZX1f2x83B+8GCT1EgaqsJE0HtbURY pW6akIf0Qvoy6ryfk3cAuNCYtbKfsAUSxVtdkqIorxMoHIL9VSfGvRtJoeTWrOqpUAb6 h6SEIsnsOA4HIj7WD3rwdZ9YsbIgW3Yz4tzoKvnfEiBQo2QLw24n0fcph1nXDoznUOej Cg8M2r654+s4zQoxCssGSRWGgyeIud5TBssMbGkwWMYXSAjYkVjrGWG2xC7ARybNqoa+ KT8sWliDEiAfrF/F+uw/6Lxi+Ru4Wqtt6eprbAYWnxjdejYXRsr3bmuHo5SMaNE/pICG D/4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=/CAcJpBAQaG69pQ3iQF49xkuS+cTIDN0IlrUYy6BkTs=; b=BsfXcsdv0MVD3jtggQeYNqlgAIai17lGzcDiBvHfYtE8IDiFdC/WEXvLsufUgfbKro QXhmOhRnirGYjQ9/gJ1DnyARr2SP6Z1f6bLiEMoR4UNCSX5IWEIIfMgVVr8i3ewJ++Vy PB3q40PNJFjEpARP+6lVc7NjvrccET5/gD3Dbx08HAVMTh3vc9Ibd0lWDlbinOhGco6Z RVoRKb7twLGALoPP/VUVSii9mk4cdOq8XqJVc2M5aTpb9raneA4pbilHgyEWaHiLmFVD 3zEEiE9UNRuX06jUgcpi5ZhuWfpFk7a0YUMf5iNjqIobzXwjOeFQGML9h8m6J1t8NZaW 7gkw==
X-Gm-Message-State: AOAM532kNYmY7cRrlalTKnzMMNBvBPgEIOmMBBzUVvNY9V+ZQMIpyPnm Z8rPB61qLRBVrMoDCYdVUrSRKIil6zP8s+bdRXAXBg==
X-Google-Smtp-Source: ABdhPJyrrp1yPebCK9Rh60/EzJFX3LEv979f/LqImkl3UUAPYLdsAF//pmUW6RvnK7kcDVmJtzu6cbkMCp886PlFj3Q=
X-Received: by 2002:a05:6402:2810:: with SMTP id h16mr21026793ede.133.1631646837697; Tue, 14 Sep 2021 12:13:57 -0700 (PDT)
MIME-Version: 1.0
References: <20210903173836.GB56008@tom-desk.erg.abdn.ac.uk> <01879F07-2A69-448A-B6E9-CBEE77B7FD2F@strayalpha.com> <CACL_3VEPRhAbX1Zxuw-PZTZ_ns9kG0XGQvL+fq1gNDWBuJC1Uw@mail.gmail.com> <65FF24E1-5D59-441A-9563-9D8565BADA1C@strayalpha.com>
In-Reply-To: <65FF24E1-5D59-441A-9563-9D8565BADA1C@strayalpha.com>
From: Tom Herbert <tom@herbertland.com>
Date: Tue, 14 Sep 2021 12:13:46 -0700
Message-ID: <CALx6S36mXiWnVFzjx=QAuqwoYWxOqA_mQOKmrDbYg7YZELvnQQ@mail.gmail.com>
To: "touch@strayalpha.com" <touch@strayalpha.com>
Cc: "C. M. Heard" <heard@pobox.com>, 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/zrEHgml0qYV65q-Lw2s97nXb9nY>
Subject: Re: [tsvwg] UDP Options API document
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: Tue, 14 Sep 2021 19:14:07 -0000

On Tue, Sep 14, 2021 at 12:04 PM touch@strayalpha.com
<touch@strayalpha.com> wrote:
>
> Hi, Mike,
>
> I’m a bit confused by the note below.
>
> UDP is a datagram service. Whether an implementation supports cached parameters on a per socket-pair basis or not is their decision; the abstract API should not need to address this.
>
> I.e., every parameter of UDP is per message and should be available via a ’sendmsg()/recvmesg()’ command (or equivalent). Every parameter can potentially be cached into the OS, with OS defaults, overrides on a OS-wide or per-connection basis, etc. - as desired, but that’s outside the scope of a protocol. That’s for the manual page for that OS.
>
> The UDP service is:
> send a message
> (with options) with the following options:
>
> Or
> receive a message
> (with options) which returns an indicator of the options received
>
> Everything else, including per-OS, per-socket, etc. configurations, etc - including decisions on how to override UDP option defaults - are implementation optimizations and should never be part of an abstract API.
>
> If there’s something beyond that you’re expecting, can you give us a simple example? Or are you thinking more of an OS manual page than a protocol spec?

Basically, yes. An API is not a necessary part of protocol
specification, it is part of implementation. Instead of an abstract
API description, what would really be most helpful is a reference to
an open source implementation demonstrating the APIs as well as the
rest of the functionality described in the specification. Until there
is an actual implementation that can be evaluated by developers that
use and support the APIs, any discussions of APIs are pretty much an
academic exercise IMO.

Tom

>
> Joe
>
> —
> Joe Touch, temporal epistemologist
> www.strayalpha.com
>
> On Sep 14, 2021, at 11:19 AM, C. M. Heard <heard@pobox.com> wrote:
>
> On Fri, Sep 3, 2021 at 10:35 AM Tom Jones wrote:
>>
>> It was raised today during the interim (I think by Carsten) that a clear
>> API description is very important for real world adoption of a protocol.
>> Michael Tuexen added that during the original SCTP standardisation a
>> separate API draft made writing portable applications much easier.
>>
>> Let me start the discussion, should we provide a separate draft for UDP
>> Options API or should this work happen inside the UDP Options draft?
>
>
> I would like to see thorough and clear documentation in the base specification of the ***services*** that are provided by UDP options.to the application layer (or the higher layer protocol running on top of UDP).
>
>
> On Sat, Sep 4, 2021 at 9:35 AM Joe Touch replied:
>>
>> As I mentioned during the meeting, there’s already an abstract API in the spirit of TCP's in section 8 of the draft, with a real-world example in Appendix A based on a preliminary implementation.
>>
>> It’s been there since draft-touch-tsvwg-udp-options-06, dated March 27, 2017.
>>
>> I don’t recall anyone commenting on that yet, though.
>
>
> I took Tom's advice and read both RFC 8303 ("On the Usage of Transport Features Provided by IETF Transport Protocols") and RFC 8304 ("Transport Features of the User Datagram Protocol (UDP) and Lightweight UDP (UDP-Lite)"). RFC 8303 (and RFC 8304) relied on existing, documented application interface requirements and abstract APIs, and that Tom is proposing to do something similar for UDP options, and asks whether we should do that in the base spec or as a separate document. Note that RFC 8303, despite its title, deals substantively only with connection-oriented transport protocols, and simply references RFC 8304 in its sections on connectionless transport protocols.
>
> I also heeded Joe's admonition to read the abstract API in the current draft (I indeed have not paid attention to it or commented on it up to now).
>
> My sense is that the existing abstract API is insufficient to serve as a basis for something like an extended version of RFC 8304. But I also feel that RFC 8304 somewhat misses the mark, since it does not adequately distinguish what primitives should actually be per-datagram (i.e., figuring as input parameters to send(), sendto(), or sendmsg() and output parameters from recv(), recvfrom(), and recvmsg() or the like) versus what things should be per-socket (and controlled by setsockopt() or the like).  I would really like to see a complete laundry list written down, and I will take a stab at it if I am asked.
>
> Thanks,
>
> Mike Heard
>
>