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

Tal Mizrahi <tal.mizrahi.phd@gmail.com> Wed, 01 November 2017 09:41 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 3869C13F69D for <ntp@ietfa.amsl.com>; Wed, 1 Nov 2017 02:41:30 -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 vDOWDEDAfSCY for <ntp@ietfa.amsl.com>; Wed, 1 Nov 2017 02:41:28 -0700 (PDT)
Received: from mail-oi0-x22b.google.com (mail-oi0-x22b.google.com [IPv6:2607:f8b0:4003:c06::22b]) (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 0DF931395F0 for <ntp@ietf.org>; Wed, 1 Nov 2017 02:41:28 -0700 (PDT)
Received: by mail-oi0-x22b.google.com with SMTP id m198so2600408oig.5 for <ntp@ietf.org>; Wed, 01 Nov 2017 02:41:28 -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=alf3VbUpeLfOoEeS8+kHA2DVpmiHL7lfEZ6W7UYQJZM=; b=JHuYG8KmP751wO9l9JNt2m/yS/k9uzjRqiAstHcSZehPkV89917zS9CWLtgVnDQpg5 IQ22fKR8+ZrjEb81LMf6qnHVUDJV/+o8lqF8ponc9SPrdNTZzGSncS0UZZLqeCRAA08V AZjJrYH8itR9am6P+ggOOD695KlchuqG231YK6KWE3iSTPRZJDHZ+4zjtu1MOMcBKhtv FGjCeEwqIySQsZCqRl0/cgm6iyyrRK+URHowq+mqahu3C7Z5B8OTVukB/r4X8G12Oswo f+kl5SqUxL+UMIcLmjInOBDtSk5z5IGJjcW9+aL5mnZA7FDcFteGcb2yYJ4+vJ8TpB8c hGyA==
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=alf3VbUpeLfOoEeS8+kHA2DVpmiHL7lfEZ6W7UYQJZM=; b=adQoh9QRv9a2SGK7zn91XxH722/P1vTXOvvlePkApxN5PVMg1S7eJt8N3noIsYjq57 jYyolY5U11ok5J/ZkRgZmfAoO9xZbHhox/k1IFh48Ee1frlzxGG6l48ss+TOVkFoleqj fN18mo+d4k4ulub0OpDsz59gCWiRgHq+CFPGPorBChIZyUL1GW0yH0autT+XHU9YfTrz VGcWk8JB2YdumUL1Sgk1wxOnl0RJEhwo4YpJ97cbZo/HbdX7VcdFXXRqdS/z2j6cuqdb AgyYZ9m3Axb0zIj9OlcLJOmLpl4qFsd8hCo9Bc0fhUcaCwyP6G9wjnvfMLFP3S6tDQmc 7m+w==
X-Gm-Message-State: AMCzsaX5Urc2mRjPMQX2KWGnwm03jAjRA9eDV4ObqeaYuGGSPjfTt2Qh roZOxgMh0rWZJsM9E24p5H6Ilo/ckgJIOPtnNXY=
X-Google-Smtp-Source: ABhQp+SPR+bzJ+bD2EzK1mJXQlGYwKMXTVzCGBUsaxCEUtsw/dyErfAz5PA2tTSUHrf4t/zRRVhWxMr8+TdWUtaWVk8=
X-Received: by 10.157.19.10 with SMTP id f10mr2567763ote.493.1509529287351; Wed, 01 Nov 2017 02:41:27 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.168.25.194 with HTTP; Wed, 1 Nov 2017 02:41:26 -0700 (PDT)
In-Reply-To: <CABUE3Xmz0YQ4OoDtE2SB-zimsA5yY32M1j3qotv_si4_OiqyHw@mail.gmail.com>
References: <20171031090139.GD15597@localhost> <CABUE3XmV1sUvq0KAJVrQv1sZ8vK6R8GwR+qeO1huTUgnOdujfQ@mail.gmail.com> <20171031135247.GB7648@localhost> <CABUE3X=pDEL9mcfoTGJw3PbwzHKnDTddr7Aqk71PyEBY77kzSw@mail.gmail.com> <20171031155717.GC7648@localhost> <CABUE3Xmz0YQ4OoDtE2SB-zimsA5yY32M1j3qotv_si4_OiqyHw@mail.gmail.com>
From: Tal Mizrahi <tal.mizrahi.phd@gmail.com>
Date: Wed, 01 Nov 2017 11:41:26 +0200
Message-ID: <CABUE3XmHAgdowNV7ibfCMA0QGc6L6H=zA4=DZjgXaY8f04Cz5w@mail.gmail.com>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: ntp@ietf.org, Aanchal Malhotra <aanchal4@bu.edu>
Content-Type: multipart/alternative; boundary="001a11409f6af36448055ce8ac78"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/JI2j0LLJ1YTCZxS7KXwOeqt7g-c>
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 09:41:30 -0000

Small correction:
Slow-to-fast cut-through is *not* possible.
Fast-to-slow cut-through *is* possible.

I had it reversed in my previous mail. :)

Regards,
Tal.

On Wed, Nov 1, 2017 at 8:48 AM, Tal Mizrahi <tal.mizrahi.phd@gmail.com>
wrote:

> 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
>>
>
>