Re: [Ntp] Drafts on interleaved modes and correction field

Tal Mizrahi <tal.mizrahi.phd@gmail.com> Wed, 01 November 2017 06:48 UTC

Return-Path: <tal.mizrahi.phd@gmail.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 C8F0713F8CD for <ntp@ietfa.amsl.com>; Tue, 31 Oct 2017 23:48:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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=gmail.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 L4R8AEXh5Dia for <ntp@ietfa.amsl.com>; Tue, 31 Oct 2017 23:48:51 -0700 (PDT)
Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9FBEA13FDFB for <ntp@ietf.org>; Tue, 31 Oct 2017 23:48:49 -0700 (PDT)
Received: by mail-oi0-x233.google.com with SMTP id h6so2075240oia.10 for <ntp@ietf.org>; Tue, 31 Oct 2017 23:48:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ti87NJSBhLgu0ZCtsWGr+LhJKupbqej1MTNMOk/wJZo=; b=KzYUUv0MFnpnOvzmVjtgQGvsCxuN0Q3aRp82JKX+8lAvDxwN/k+4bVLRmcdGYWxaoc vF2Cvb/B9fDUD6Hir0uObm3liD8+adir+UKO7FLm2UMDYR8Yyx7H4Hrl/5pM7srWohk8 2MgQ4WwdGk411fcjHpLs8AMvxNGgDCAvX7mk4S+PjffjyMOlIDedQlxOxyOYmONzqTug RCK+Kbd1QrVy8TjmuG/ac0z7+f4gTsmtyaIxCAU3I4xoVoL3r7Kp7G6pkJ8i6A+ev7aM LoSnA3WYEIy8BUpdhAx0zpTAWjM+qkCf01KVzZSjBW5ARBKGPtAAQuMZIN+BxkK2uuLI wgaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ti87NJSBhLgu0ZCtsWGr+LhJKupbqej1MTNMOk/wJZo=; b=DiI+vptHIr7deHynz+uwiBQ+msgS0pciMujCCGgo4Zqxa3PzkelQHXu3dJWqkDDz1L NgnNXHfmg6vsHDw8+PYDbQtoZz9vzcGpXRv61tAJ6fAMabQNXtQAiWN2ib7JcI07nEBC IwM83dmDD66DQ3SGT3BaCYbstOElUIU8vWbSL0ozH0H/srRc5Z0Lcqk/8H4bAB9PQL3o ZVXATYU0HtIpScmhWQg/5w6V93ZrnyJqB1s7msIPn8aKG5qUzAITsTTwB+aJLWO3pnL3 a8wj2x3xxXUSqtyTDzGr06Qme/W4F+Vcpo9nh1iwX/GYbyU3g22b4VUGEdte+DQkYwuO WGVQ==
X-Gm-Message-State: AMCzsaUlLcuixJ6mxhCSrBjwWYTBQFWP5pmZkmU+NNAyxGI5uU/n+xWv QSbMm4VcVmf4XOPJb0hJd3XMA25axS5TZx+VONE=
X-Google-Smtp-Source: ABhQp+SbPu4aygXSl1rB7l0OGu+4xh02E9/IlOTlSyJCdbkjdNzvtW2JimUDiGWN69bnxhzkk7Fu7BnBAuiwdmp20hk=
X-Received: by 10.202.64.136 with SMTP id n130mr2348738oia.154.1509518929068; Tue, 31 Oct 2017 23:48:49 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.168.25.194 with HTTP; Tue, 31 Oct 2017 23:48:48 -0700 (PDT)
In-Reply-To: <20171031155717.GC7648@localhost>
References: <20171031090139.GD15597@localhost> <CABUE3XmV1sUvq0KAJVrQv1sZ8vK6R8GwR+qeO1huTUgnOdujfQ@mail.gmail.com> <20171031135247.GB7648@localhost> <CABUE3X=pDEL9mcfoTGJw3PbwzHKnDTddr7Aqk71PyEBY77kzSw@mail.gmail.com> <20171031155717.GC7648@localhost>
From: Tal Mizrahi <tal.mizrahi.phd@gmail.com>
Date: Wed, 01 Nov 2017 08:48:48 +0200
Message-ID: <CABUE3Xmz0YQ4OoDtE2SB-zimsA5yY32M1j3qotv_si4_OiqyHw@mail.gmail.com>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: ntp@ietf.org, Aanchal Malhotra <aanchal4@bu.edu>
Content-Type: multipart/alternative; boundary="001a113db4928c85d1055ce64371"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/_cYmv1lPOqomXYn38IFPKBQeCo0>
Subject: Re: [Ntp] Drafts on interleaved modes and correction field
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.22
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, 01 Nov 2017 06:48:54 -0000

Hi Miroslav,

>> Moreover, we never know which nodes along the path use store-and-forward,
>> and which nodes use cut-through. In cut-through forwarding the packet
>> transmission may start before the last bit is received, so it certainly
>> makes more sense to measure the first-bit-in-to-first-bit-out.
>
>That's a good point. With cut-through switching the correction would
>be negative and generally couldn't be determined in time to be put in
>the packet as the length is unknown. Are there any switches that can
>cut-through from a faster link to slower link?

To the best of my knowledge cut-through from a fast link to a slow link is
not possible. Cut-through from a slow link to a fast link is certainly
possible, and of course between ports that have the same link speed.
In the two latter cases the transmission may start before the end of the
reception.

Regards,
Tal.



On Tue, Oct 31, 2017 at 5:57 PM, Miroslav Lichvar <mlichvar@redhat.com>
wrote:

> On Tue, Oct 31, 2017 at 04:59:52PM +0200, Tal Mizrahi wrote:
> > >With NTP there is generally no HW support, so clients and servers
> > >should use trailer RX timestamps and preamble TX timestamps to avoid
> > >an asymmetric delay with different link speeds. The following document
> > >explains the issue nicely.
> > >
> > >https://www.eecis.udel.edu/~mills/stamp.html
> > >
> > >Do you think it will be difficult to implement? If the link speed and
> > >length of the packet is known, the timestamp can be transposed.
> >
> > The link speed is not necessarily known to the end points.
>
> I meant that the devices which are supposed to modify the correction
> field know the link speed and can transpose preamble timestamps if
> necessary.
>
> The end points don't need to know the link speed on the path. Just the
> speed of their own link if they need to transpose their timestamps.
>
> > Furthermore, the
> > link speed may change several times along the path.
>
> In such case we want the correction to still be symmetric, right?
>
> > Maybe I am missing something, but it appears that when measuring
> > last-bit-in-to-first-bit-out we are ignoring the packet reception time;
> it
> > seems to make sense to include the packet reception time in the residence
> > time.
>
> For PTP yes, but not for NTP. The reception time is included in the
> network delay as measured by the client, which will be symmetric as
> long as no device on the path includes in the correction the
> transmission time or reception time.
>
> > Moreover, we never know which nodes along the path use store-and-forward,
> > and which nodes use cut-through. In cut-through forwarding the packet
> > transmission may start before the last bit is received, so it certainly
> > makes more sense to measure the first-bit-in-to-first-bit-out.
>
> That's a good point. With cut-through switching the correction would
> be negative and generally couldn't be determined in time to be put in
> the packet as the length is unknown. Are there any switches that can
> cut-through from a faster link to slower link?
>
> Maybe it would make sense to allow corrections from preamble RX
> timestamps when the link speeds are equal.
>
> > >The reason for a separate transmit correction is to support the
> > >interleaved modes. The receive correction might not be necessary. If
> > >you have a better use for the 2 octets, I think it could be dropped
> > >and included in the origin correction instead.
> >
> > So it looks like two correction fields would suffice: one for the forward
> > direction, and one for the reverse direction. Right?
>
> I think it's three fields if we want both support the interleaved
> modes and allow the client to check the delay correction in both
> directions. Where would be the transmit correction included if there
> were only two fields?
>
> --
> Miroslav Lichvar
>