lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220307120751.3484125-1-michael@walle.cc>
Date:   Mon,  7 Mar 2022 13:07:51 +0100
From:   Michael Walle <michael@...le.cc>
To:     gerhard@...leder-embedded.com
Cc:     davem@...emloft.net, kuba@...nel.org, mlichvar@...hat.com,
        netdev@...r.kernel.org, richardcochran@...il.com,
        vinicius.gomes@...el.com, yangbo.lu@....com,
        Michael Walle <michael@...le.cc>
Subject: Re: [RFC PATCH net-next 0/6] ptp: Support hardware clocks with additional free running time

Hi,

> ptp vclocks require a clock with free running time for the timecounter.
> Currently only a physical clock forced to free running is supported.
> If vclocks are used, then the physical clock cannot be synchronized
> anymore. The synchronized time is not available in hardware in this
> case. As a result, timed transmission with ETF/TAPRIO hardware support
> is not possible anymore.
> 
> If hardware would support a free running time additionally to the
> physical clock, then the physical clock does not need to be forced to
> free running. Thus, the physical clocks can still be synchronized while
> vclocks are in use.
> 
> The physical clock could be used to synchronize the time domain of the
> TSN network and trigger ETF/TAPRIO. In parallel vclocks can be used to
> synchronize other time domains.
> 
> One year ago I thought for two time domains within a TSN network also
> two physical clocks are required. This would lead to new kernel
> interfaces for asking for the second clock, ... . But actually for a
> time triggered system like TSN there can be only one time domain that
> controls the system itself. All other time domains belong to other
> layers, but not to the time triggered system itself. So other time
> domains can be based on a free running counter if similar mechanisms
> to 2 step synchronisation are used.
> 
> Synchronisation was tested with two time domains between two directly
> connected hosts. Each host run two ptp4l instances, the first used the
> physical clock and the second used the virtual clock. I used my FPGA
> based network controller as network device. ptp4l was used in
> combination with the virtual clock support patch set from Miroslav
> Lichvar.
> 
> Please give me some feedback. For me it seems like a straight forward
> extension for ptp vclocks, but I'm new to this topic.

>From what I understand, you have a second PHC which is just a second
PHC you cannot control; i.e. it is equivalent to a PHC in free running
mode. This PHC will take the timestamps for the PTP frames. You can
create multiple vclocks and you can use ptp4l to synchronize these.

The first (controlable) PHC is used to do the Qbv scheduling, thus
needs a synchronized time.

How do you synchronize the vclock with this PHC? And how precise
is it? I know that some cards can do cross timestamping in hardware
to aid the synchronization (but I think that is not supported right
now in linux).

Richard Cochran wrote:
> You are adding eight bytes per frame for what is arguably an extreme
> niche case.

I don't think it is a niche case, btw. I was always wondering why
NXP introduced the vclock thingy. And apparently it is for
802.1AS-rev, but one use case for that is 802.1Qbv and there you'll
need a (synchronized) hardware clock to control the gates. So while
we can have multiple time domain support with the vclock, we cannot
use Qbv with them. That was something I have always wondered about.
Or.. maybe I'm missing something here.

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ