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

Martin Burnicki <martin.burnicki@meinberg.de> Fri, 08 January 2021 15:19 UTC

Return-Path: <martin.burnicki@meinberg.de>
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 0E2F03A104B for <ntp@ietfa.amsl.com>; Fri, 8 Jan 2021 07:19:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.361
X-Spam-Level:
X-Spam-Status: No, score=-2.361 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, NICE_REPLY_A=-0.262, 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 (2048-bit key) header.d=meinberg.de
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 AhlPTMFsODFr for <ntp@ietfa.amsl.com>; Fri, 8 Jan 2021 07:19:28 -0800 (PST)
Received: from server1a.meinberg.de (server1a.meinberg.de [176.9.44.212]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB42E3A1045 for <ntp@ietf.org>; Fri, 8 Jan 2021 07:19:28 -0800 (PST)
Received: from srv-kerioconnect.py.meinberg.de (unknown [193.158.22.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by server1a.meinberg.de (Postfix) with ESMTPSA id 59BA171C0627; Fri, 8 Jan 2021 16:19:26 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meinberg.de; s=dkim; t=1610119166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kWrapA183rqwMPBex5oTtM/rigvgaHiBk4ms+A8BwM4=; b=Q3FCjj5VkgtcXb4++cNV7wC7RTZNTAh/2mqlQr/LXyzI9DKnUn8Ct/+d+x+PwzwoENUh0v A5xiTxQSowY9h9kj7m4ijSux110godNsrw+joRSusueBklkFmmpSnry2NzC8n0pPFv42gq imsMhZ45Nu+U0fUPeU0ktDo1ANTtQHhLEHDH/TTAab/Iz1CZ6t5iFP2WzIBg6lQXmfPvpX qqidve6g4tYR8cWm0xmk7CGwK22mtq/uthAM7PZvI20C+c/hj7zqcnD09Tuw4UZQuDab23 Ic5EOc5rx3+pqrAn8m91TH/T07g561GHQMQORGGYDlRwApYlGDmmUcSo5m77lg==
X-Footer: bWVpbmJlcmcuZGU=
Received: from localhost ([127.0.0.1]) by srv-kerioconnect.py.meinberg.de with ESMTPSA (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)); Fri, 8 Jan 2021 16:19:23 +0100
To: Magnus Danielson <magnus@rubidium.se>, Miroslav Lichvar <mlichvar@redhat.com>
Cc: ntp@ietf.org
References: <20210102081603.1F63C40605C@ip-64-139-1-69.sjc.megapath.net> <cecaf661-92af-8b35-4c53-2f025c928144@rubidium.se> <20210104164449.GE2992437@localhost> <b1e61f7d-6cea-5e99-69f0-7eae815d9e19@rubidium.se> <20210105083328.GA3008666@localhost> <ba5d2cde-6b5e-d9b6-1877-c4060bf43e80@rubidium.se> <20210105144225.GH3008666@localhost> <35c4be55-b6af-82b5-aacd-d5a591383dec@rubidium.se> <20210105162901.GJ3008666@localhost> <54387a31-5c6e-7e61-dc2b-270c86ccbb07@rubidium.se> <20210107112506.GA3415835@localhost> <e5e34c6c-59e4-856a-b238-8a1d7b5eed33@rubidium.se>
From: Martin Burnicki <martin.burnicki@meinberg.de>
Organization: Meinberg Funkuhren GmbH & Co. KG, Bad Pyrmont, Germany
Message-ID: <ecef113d-4680-9eda-05cc-794c8e94aa0b@meinberg.de>
Date: Fri, 08 Jan 2021 16:19:18 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <e5e34c6c-59e4-856a-b238-8a1d7b5eed33@rubidium.se>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/i8BB8Nq9iE9NtT_AMze9KgAQYx8>
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: Fri, 08 Jan 2021 15:19:31 -0000

Magnus Danielson wrote:
> Miroslav.
> 
> On 2021-01-07 12:25, Miroslav Lichvar wrote:
>> On Wed, Jan 06, 2021 at 12:53:06AM +0100, Magnus Danielson wrote:
>>> I'm not at all convinced. PTP has little, at least as I can see in
>>> IEEE1588-2008, that really supports the UTC with time-stamps. I should
>>> check IEEE1588-2019 for more details, but you will have to explain very
>>> clearly how that support comes about in PTP, because as I see it, if you
>>> run UTC only it's hand-wavey at best. If you can show clearly how PTP
>>> handles UTC and especially as a leap-second occur without hickup.
>> PTP has the arbitrary timescale, which is typically used for a UTC
>> transfer when serving time from an OS clock (as opposed to a hardware
>> clock). It also has a leap announcement bit. That's all what is
>> needed to synchronize two UTC clocks without knowing the TAI-UTC
>> offset. It can work exactly the same as NTPv4.

Yes, but the arbitrary timescale is only *typically* used for a UTC, it
can also mean something else. So PTP isn't distinct in this case, either.

> OK, I can accept that considering heads-up is provided as needed per
> IEEE1588 and that the UTC to time-stamp mapping is found that details
> how UTC 23:59:60 is time-stamped and progressed. How will be know the
> actual UTC read-out from such as setup?
> 
> The leap second announcement needs to be at least two announce messages
> before, so you need to have heads up information about the upcoming
> leap-second.

If I remember correctly, the leap second warning is sent by the
grandmaster 12 hours in advance, *if* the information is available.

If there's a faulty leap second warning from the time source, the
grandmaster has the same problem as an NTP server that has received a
faulty warning.

And if the PTP slave passes the leap second warning to a Linux kernel so
that the Linux kernel can update its CLOCK_REALTIME at the right opint
in time, applications that are based on UTC/local time will encounter
exactly the same problem as with NTP.

So from this point of view (the use case for applications), there's not
much advantage on using TAI timestamps for the protocol.


Martin
-- 
Martin Burnicki

Senior Software Engineer

MEINBERG Funkuhren GmbH & Co. KG
Email: martin.burnicki@meinberg.de
Phone: +49 5281 9309-414
Linkedin: https://www.linkedin.com/in/martinburnicki/

Lange Wand 9, 31812 Bad Pyrmont, Germany
Amtsgericht Hannover 17HRA 100322
Geschäftsführer/Managing Directors: Günter Meinberg, Werner Meinberg,
Andre Hartmann, Heiko Gerstung
Websites: https://www.meinberg.de  https://www.meinbergglobal.com
Training: https://www.meinberg.academy