Re: [tsvwg] draft-ietf-udp-options issues from IETF 104

Joe Touch <touch@strayalpha.com> Mon, 15 July 2019 20:34 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 40A7E12004E for <tsvwg@ietfa.amsl.com>; Mon, 15 Jul 2019 13:34:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.219
X-Spam-Level:
X-Spam-Status: No, score=-1.219 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779] 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 otTMUWHvpIN4 for <tsvwg@ietfa.amsl.com>; Mon, 15 Jul 2019 13:34:43 -0700 (PDT)
Received: from server217-3.web-hosting.com (server217-3.web-hosting.com [198.54.115.226]) (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 9EE7A12007C for <tsvwg@ietf.org>; Mon, 15 Jul 2019 13:34:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=strayalpha.com; s=default; h=Message-ID:References:In-Reply-To:Subject:Cc: To:From:Date:Content-Type:MIME-Version: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=hpcFca31bOMM8eQB0/Fus8e51E5ekXFqXUMSvHujry4=; b=65zqk2iEejlH/oM66GM85rXdj /zDD7eODonlI4u7Xq8Uz0edLG+g+v90VExfmSTk/p73irJXJeOCOBH8pxXFjwUgDiB6s13/S90mj2 FoJvFzl5CwiawLNH672XyH5V6odBQxYDhqZ375mAvg88L+H7+9hziiYuRXfTO8ImWqhw8OiOhXvtS t7ZzRUYMr3dV/Yodwrz+zQh3V7ph5ch9EC8V/ozMCsbYTlj62ZGOi2U/ic2iuAh5TQfTj6vZJ8Roo v/+R+mOMuLfo0uGGcLXcrsrU9t5vUX0i/WVsHIDyiZR7uA4PZp2ICC7cA8DiWQOPgk2WM0ZJmN7Ul j8PlnFEnA==;
Received: from [::1] (port=60482 helo=server217.web-hosting.com) by server217.web-hosting.com with esmtpa (Exim 4.92) (envelope-from <touch@strayalpha.com>) id 1hn7gD-0007dN-UQ; Mon, 15 Jul 2019 16:34:43 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_081e94890415ecab193e3b7102775a02"
Date: Mon, 15 Jul 2019 13:34:37 -0700
From: Joe Touch <touch@strayalpha.com>
To: Tom Herbert <tom@herbertland.com>
Cc: tsvwg <tsvwg@ietf.org>
In-Reply-To: <82FF6486-FABF-4D2C-B5E2-178779C720A4@strayalpha.com>
References: <CAPDqMeq9GjEQKukH1pZOTdE50e_rc3U6gpdxT-5qrS5phD0RGw@mail.gmail.com> <646D45AD-D79B-4BD2-A084-7DA97CE2C415@strayalpha.com> <7EC37B50-45D5-4CF1-B113-205E55BF244E@strayalpha.com> <CALx6S34s7L7xo+26bt5Cdaqi4Es5Aci42GHk1WNKzugr5st-Gw@mail.gmail.com> <B525BF50-EFCC-44A5-A604-6CDDA914A1CB@strayalpha.com> <CAPDqMep3R6z9PRKkHyOvrh6sV9n5Sc0B++-zVz0FYJCwE6swrQ@mail.gmail.com> <E42A2AE2-F499-465E-BDE6-5EFC0AB20042@strayalpha.com> <CE03DB3D7B45C245BCA0D24327794936306138E9@MX307CL04.corp.emc.com> <CAPDqMeoyNb7vQTdqxLpZpnKb9S7QKeDJNLyQJBmq95yXhB+xfQ@mail.gmail.com> <7D365770-64FE-40BC-901D-B4D7DF6B484B@strayalpha.com> <20190713182554.GB39770@clarinet.employees.org> <CALx6S36mH2M6SYnRSecWXa7k_d1u8O43+CXE-=KqeO0x2e5+qw@mail.gmail.com> <82FF6486-FABF-4D2C-B5E2-178779C720A4@strayalpha.com>
Message-ID: <30c17e9c174f6b0da3ecc6b503a8cb17@strayalpha.com>
X-Sender: touch@strayalpha.com
User-Agent: Roundcube Webmail/1.3.7
X-OutGoing-Spam-Status: No, score=-0.5
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/cZpWFoxf8DYHREjGwjiTopVdbqY>
Subject: Re: [tsvwg] draft-ietf-udp-options issues from IETF 104
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: Mon, 15 Jul 2019 20:34:45 -0000

Trying to get back on topic, with explicit clarification and context: 

Where we are on UDP options: 

- this thread is currently discussing only OCS 

- we need to pickup the previous thread on variants of LITE and FRAG,
but for now we're assuming the existing definitions of those 

- options will consume ALL the surplus space when present (which means
we might end up removing EOL) 

Where we currently are on OCS: 

- 16-bit, as per current UDP-options draft TEXT (figs and tables need to
be updated) 

- zeroes-out with the checksummed data, to enable transit of widespread
implementation bugs in middleboxes 

- the OCS field is now manditory (not signalled with a KIND field or
optional as a field) 

- OCS *SHOULD be computed, but MAY be set to zero (e.g., when UDP CS=0,
at user discretion and peril) 

- with LITE, OCS might be transmit-side computed and receive-side
ignored to allow for the intended NON-ROBUST capability (at least when
NOT transiting buggy middbleboxes; see below) of LITE 

(if LITE data doesn't change, that will transit middleboxes; if the LITE
data does change, there's no way to help it transit middleboxes anyway) 

------------ 

So we need to decide: 

- where OCS is (head or tail of the surplus space) 

- whether OCS is aligned, and if so is that 16-bit or 32-bit 

I propose that OCS can come first with no padding or alignment. 

Here's why and questions to guide the discussion (please address the
questions below or indicate why they're not sufficient):

*Given* that we *are* different from UDP and TCP in that we do NOT have
the luxury of a fixed-offset FROM THE BEGINNING OF THE TRANSPORT HEADER
for this checksum: 

- why does the offset distance matter, i.e., front vs. end? 
  NOTE that arguments based on existing implementations that limit 
  the "offset FROM TRANSPORT START" to 255 are not viable, 
  because we're already in a surplus area that's likely to be 
  500+ bytes from that location 

- how *MUCH* does the offset alignment matter, keeping in mind: 
    - ALL offloading requires dealing with the last byte not being
aligned (even when treated as zero-fill)
    - no offset might require 1 byte-swap at some point, but consumes
the least space
    - half-word alignment wastes 4 bits on avg.
    - full-word alignment wastes 12 bits (1.5 bytes) on avg

In comms, the typical figure of merit is 1 opcode per bit. So, IMO:

- if we can save 4 bits with 4 or fewer opcodes, it's a win
- if we can save 12 bits with 12 or fewer opcodes, it's a win

My assumption is that offload engines or the core processor need to do
"non-halfword length" cleanup regardless.

That cleanup should be at most 5 opcodes:
    load
    mask the addend
    add w/carry
    mask the sum (for the 1's compl wrap)
    add w/carry (for the 1's compl wrap)
    swap (if not half-word aligned)

That suggests we're either very close to no real penalty for "no offset"
or that we win by using at least half-word offset.

Note: the alignment overhead will also NEED to be zero-fill - and
checked that it's zero-fill, which are additional opcodes needed that
are not too far from the cleanup ones above.

i.e., given the similarity of the zero-check and the cleanup, why is it
useful to waste these bytes?

Joe