Re: [Ntp] comments on draft‑mlichvar‑ntp‑ntpv5‑03

Dan Drown <dan-ntp@drown.org> Thu, 25 November 2021 04:18 UTC

Return-Path: <dan-ntp@drown.org>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 85B703A0E89 for <ntp@ietfa.amsl.com>; Wed, 24 Nov 2021 20:18:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 2paORaQznqdr for <ntp@ietfa.amsl.com>; Wed, 24 Nov 2021 20:17:57 -0800 (PST)
Received: from vps3.drown.org (vps3.drown.org [96.126.122.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7C7693A0E86 for <ntp@ietf.org>; Wed, 24 Nov 2021 20:17:57 -0800 (PST)
Received: by vps3.drown.org (Postfix, from userid 48) id 280452FCAC6; Wed, 24 Nov 2021 22:17:52 -0600 (CST)
Received: from 2603-8080-2709-c400-e945-1441-73fa-e502.res6.spectrum.com (2603-8080-2709-c400-e945-1441-73fa-e502.res6.spectrum.com [2603:8080:2709:c400:e945:1441:73fa:e502]) by mail.drown.org (Horde Framework) with HTTPS; Wed, 24 Nov 2021 22:17:52 -0600
Date: Wed, 24 Nov 2021 22:17:52 -0600
Message-ID: <20211124221752.Horde.jVR5d5RhflN9UNe6SuqxlZx@mail.drown.org>
From: Dan Drown <dan-ntp@drown.org>
To: ntp@ietf.org
References: <20211123131501.Horde.ErUH7VWw3Nr2PFkAGzGIEuI@mail.drown.org> <619DEA79020000A10004599E@gwsmtp.uni-regensburg.de> <YZ39jGBrF+zeiYm3@localhost>
In-Reply-To: <YZ39jGBrF+zeiYm3@localhost>
User-Agent: Horde Application Framework 5
Content-Type: text/plain; charset="utf-8"; format="flowed"; DelSp="Yes"
MIME-Version: 1.0
Content-Disposition: inline
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/HkaV-AzaoY6T-_x4Hax7DepiPtk>
Subject: Re: [Ntp] comments on draft‑mlichvar‑ntp‑ntpv5‑03
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Time Protocol <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Nov 2021 04:18:03 -0000

Quoting Miroslav Lichvar <mlichvar@redhat.com>:
> On Wed, Nov 24, 2021 at 08:32:09AM +0100, Ulrich Windl wrote:
>> I wonder: Up to NTPv3 floating-point math was avoided, but starting in NTPv4
>> floating-point math is used.
>
> That is up to the implementation. The specification doesn't require
> floating-point math, but it is easier to implement if you can use it.

Floating point hardware is pretty common in embedded devices with an  
internet connection.  For example esp8266 and esp32 have single  
precision FPU hardware.  Cortex-M4/M7s have optional FPU hardware as  
well.

> For internal calculations, you could keep everything in the 64-bit
> format. Even in the NTPv5 packet we could do that, if we don't mind
> wasting 16 octets per packet. The specification would certainly be
> simpler.

I don't see the value in 64 bits of root delay/dispersion.  Maybe the  
timescale offset field would benefit from more precision, but at the  
moment I prefer to keep it at 16 bits.

> I implemented recently some of the NTPv5 ideas in chrony in an
> experimental extension field. I noticed there is a minor compatibility
> issue with the proposed time32 format and NTPv4. The maximum value is
> not really 16, but slightly less than that. That means it cannot reach
> the MAXDISP value from RFC5905. To avoid having to work with two
> different MAXDISP values, we could specify an infinite value for the
> maximum 32-bit value of the type.

Defining 0xFFFFFFFF (15.999999996) to mean MAXDISP makes sense to me.