Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)

FUSTE Emmanuel <emmanuel.fuste@thalesgroup.com> Wed, 06 January 2021 15:09 UTC

Return-Path: <emmanuel.fuste@thalesgroup.com>
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 3D59F3A0E31 for <ntp@ietfa.amsl.com>; Wed, 6 Jan 2021 07:09:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.632
X-Spam-Level:
X-Spam-Status: No, score=-2.632 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.262, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=thalesgroup.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 naufiHTk1P-H for <ntp@ietfa.amsl.com>; Wed, 6 Jan 2021 07:09:05 -0800 (PST)
Received: from thsbbfxrt02p.thalesgroup.com (thsbbfxrt02p.thalesgroup.com [192.93.158.29]) (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 8C6273A0E4B for <ntp@ietf.org>; Wed, 6 Jan 2021 07:09:05 -0800 (PST)
Received: from thsbbfxrt02p.thalesgroup.com (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4D9t7364nJzJpdL; Wed, 6 Jan 2021 16:09:03 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thalesgroup.com; s=xrt20181201; t=1609945743; bh=fJSaRes+khK6UHViVRsbAIhww5BD3Zwbh8YI70p4fkg=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:From; b=dhOwxLgkTGutK7GluLYd6SA3+4DcPPFT+g1JYmfBVznAmVFfIziM7da4FX+Czlj/P 4iaI4G2TmgKcFXjo7hF3Z9z4MhNm+Nlw+gPyWOHqTqakvGKNHVDKL5zPKSXEA4+RR8 cd0wGE8gZp5MVTRfF3HJJplz/CzUxt+K1gvR3ZhvP1zmAs3agioXNkVIpWfzS7pZQt GBTX2EtGVwnjEFuEFLGvyAz3m484WEF9yr7SmWLzdjgg0ytAXIixed33cv58UQ6BcZ PGdjPGgscPwjA1BOo5/iDN5fszmDArvkHqHBjy0x+Z8taNRCm/1etbAfNGn+q6mP3u bUGEAcwsjjD2w==
From: FUSTE Emmanuel <emmanuel.fuste@thalesgroup.com>
To: Martin Burnicki <martin.burnicki@meinberg.de>, "ntp@ietf.org" <ntp@ietf.org>
Thread-Topic: [Ntp] CLOCK_TAI (was NTPv5: big picture)
Thread-Index: AQHW42CuXi8LkZF0l0qFi5+u6qEKyaoZItuAgABF+oCAAPWCgIAADHAAgAAuRwCAAAsoAA==
Date: Wed, 06 Jan 2021 15:09:02 +0000
Message-ID: <76d5de51-1f00-7b6c-95e5-2bf6b932e0cf@thalesgroup.com>
References: <20210105124544.5EF5C40605C@ip-64-139-1-69.sjc.megapath.net> <f876a3ff-16ee-fc63-c27c-d5a3cb847a3d@meinberg.de> <59A706AB-A151-4779-989B-B957F2C50FD0@redfish-solutions.com> <f6871e77-7130-0234-b30f-a1efd7fc501d@meinberg.de> <5d9b2399-dbb4-99c8-4495-69ad03479a23@thalesgroup.com> <c28ac809-1d5b-0e1d-48fa-88d4c45d870b@meinberg.de>
In-Reply-To: <c28ac809-1d5b-0e1d-48fa-88d4c45d870b@meinberg.de>
Accept-Language: fr-FR, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1
x-pmwin-version: 4.0.3, Antivirus-Engine: 3.79.0, Antivirus-Data: 5.80
Content-Type: text/plain; charset="utf-8"
Content-ID: <D25A96A3BC69FC4C9E06AA9FDA7A9347@iris.infra.thales>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/mgZTU2JHgRLiipOS-HXA_ZnoABs>
Subject: Re: [Ntp] CLOCK_TAI (was NTPv5: big picture)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <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: Wed, 06 Jan 2021 15:09:07 -0000

Le 06/01/2021 à 15:29, Martin Burnicki a écrit :
> FUSTE Emmanuel wrote:
>> Le 06/01/2021 à 11:58, Martin Burnicki a écrit :
>>> Or you would have to provide (and maintain) an NTP server implementation
>>> that supports both v4 and v5, depending on the version of the request.
>> As the vast majority of today ones which still support v1/v2/v3/v4,
>> being based on ntpd,  and v3/v4 for most of the others.
> I don't thing NTPv1 and v2 are really supported by current
> implementations, maybe except for a v2 version code in the mode 6 packets.
>
> If I remember correctly, NTPv2 wasn't even widespread, but some fields
> of the packet were changed in v3. When that happened, NTPv2 wasn't very
> widespread, either.
>
> The only thing a v4 server has to do to when it receives a v3 request is
> to copy the v3 version code into the reply packet instead of the native
> v4 code. That's it.
>
> In a compatible approach you could set up the reply packet as usually,
> and only append extension fields with more detailed information if the
> protocol version sent by the client is v5.
>
> A possible approach could be that
>
> - a v5 client could send an initial v5 request
>
> - when the server sees v5 it replies with a base packet and one or more
> extension fields indicating its features/capabilities
>
> - the client could send further requests with extension fields
> requesting for additional information
>
> - a v4 client would simply send and receive a v4 packet without the
> extensions
Ok we mostly agree.
You advocate for a v5 format which permit to do less implementation work 
in a dual v4/v5 server.
And I prefer a departure from UTC like timestamps which imply a little 
more bit of work on the server side for v4 clients as the base packet 
will not have the same meaning and will contain some "mandatory" extensions.

> I think whether hardware timestamping is supported or not isn't related
> to the packet format. Even NTPv4 can use timestamping in the kernel
> driver, if the OS supports it.
Yes but as the common time-stamping hardware only has and support only 
one time-stamping clock and is responsible to put this clock value in 
the outbound packet, format matter.
You could not share the same interface with hardware time-stamping 
between NTPv4 and PTP for this reason unless you are on custom or very 
uncommon hardware.
For the receiving part it does not matter as the timestamp is purely a 
local measure which could be converted to whatever you want.

Emmanuel.