Re: [Ntp] NTS4UPTP Rev 03 - Formal request for WG adoption

Miroslav Lichvar <> Wed, 02 June 2021 13:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 5FA4A3A42CE for <>; Wed, 2 Jun 2021 06:21:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.795
X-Spam-Status: No, score=-2.795 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id OdDjk8vKLFpO for <>; Wed, 2 Jun 2021 06:21:22 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BE1163A42CD for <>; Wed, 2 Jun 2021 06:21:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=mimecast20190719; t=1622640081; 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: in-reply-to:in-reply-to:references:references; bh=obbuTZmRV4MyLYiGz5abzN35Aro0/4+eXyn4m9ol0ok=; b=BsTegu+f4xjwv9DSYeRMEj7tWMM+ftyo5XwkBCU4K8z4qpgbe6ClwEh+GOuAeFNY/UvaQH vSaHcnP1sjNYfk8eivXuv8GA+t8RWpWlyzy0sVTh1paHahwlZAM3t80u5RW6JVwueu3Nhx TBLdr/tveb4ME89Vc4FxQWKEVpzwR1k=
Received: from ( []) (Using TLS) by with ESMTP id us-mta-164-Opxn6JEOOpudpOIOZTrwXg-1; Wed, 02 Jun 2021 09:21:18 -0400
X-MC-Unique: Opxn6JEOOpudpOIOZTrwXg-1
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 52DFE14EE; Wed, 2 Jun 2021 13:21:17 +0000 (UTC)
Received: from localhost ( []) by (Postfix) with ESMTPS id A047B60BD9; Wed, 2 Jun 2021 13:21:16 +0000 (UTC)
Date: Wed, 2 Jun 2021 15:21:14 +0200
From: Miroslav Lichvar <>
To: Heiko Gerstung <>
Cc: "" <>
Message-ID: <YLeFyqZp6bZY9nY9@localhost>
References: <> <YLYCLIEA4/unB6/5@localhost> <> <YLYheZYTSflAdlrF@localhost> <> <YLY3f2/5k1Hjebf7@localhost> <> <YLZVS4jwGOnMIk6g@localhost> <>
MIME-Version: 1.0
In-Reply-To: <>
X-Scanned-By: MIMEDefang 2.79 on
Authentication-Results:; auth=pass smtp.auth=CUSA124A263
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Archived-At: <>
Subject: Re: [Ntp] NTS4UPTP Rev 03 - Formal request for WG adoption
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 02 Jun 2021 13:21:27 -0000

On Wed, Jun 02, 2021 at 01:00:27PM +0200, Heiko Gerstung wrote:
> Yes, it needs to be fleshed out in more detail in a draft. My point is that you could use a different approach than what we chose in our proposal, but you then have to put this down in writing and submit a draft if you are convinced it has enought benefits when compared to our approach. If you believe it would be a lot shorter, more compact document with less complexity and provides the same or a higher level of protection/efficiency, then please write it down so we can compare it in its entirety.

I'm not interested in writing a new NTS4UPTP draft, at least not at
this time. I'm asking you to reconsider your design or at least
describe how it compares to possible alternatives.

> > If you used only NTP4NTS over PTP, you would still have only one sync
> > protocol. Just the transport is different. That's a couple lines of
> > code.
> A couple lines of code? OK, if you volunteer to modify chrony, I would volunteer to test this with our hardware time stamping engine. Just add a comment where you want to get the hw timestamp from our engine and we will add the necessary function call to actually get it from the hardware. Please ensure that you need to read out at least the sequenceId and MessageType from the PTP header as that is required to find the correct timestamp in the queue. See my comments to Kristof earlier today regarding the requirement to add support for different timestamping hardware, but a first test if this actually works would certainly be interesting, so why not give it a shot if it's only a couple lines of code!

It is 7 lines for a quick hack that hardcodes a PTP prefix for all NTP
messages [1]. Both server and client ports need to be configured to
the PTP port. If your timestamper doesn't use the Linux timestamping
API, it will probably require significant changes. I'll leave that up
to you if you think it's worth the trouble.

I tested it on two NICs: Intel XL710 (40Gb) and Broadcom BCM5720
(1Gb). Both seem to work as expected. It seems their filter only
checks the message type and version, ignoring the length and other
fields. If all HW worked like that and it was acceptable to generate
invalid PTP messages, the messages could be only two octets longer.

> The NTS_TLV is not used for the actual sync / delay / announce messages in our draft, that means you have the authentication_TLV as an overhead compared to standard unicast PTP. This TLV has a size of 42 octets (if I assume a ICV size of 256 bit). The Common PTP message header is 34 octets in size, the size of the Sync and Delay_Req messages is another 10 octets, resulting in 44 octets in total, which proves your point. 

Another thing to consider is that PTP exchanges more messages per
measurement than NTP. In NTP it's 2 messages to get all 4 timestamps.
In PTP it's 4 or 5 to get the timestamps and there are also announce
messages and unicast-specific messages. NTP4NTS over PTP might
actually save some network bandwidth.


Miroslav Lichvar