> On Tue, May 19, 2020 at 4:36 PM Chris Caudle <ch...@chriscaudle.org> wrote:
> 
> > As far as I am aware the PHC in the NIC is not used for anything other
> > than network time synchronization using PTP, and the PHC has no relation
> > to the system clock unless you also run phc2sys to transfer time from the
> > PHC to the system (software) clock.

+1  good point

On Tue, May 19, 2020 at 04:59:51PM +0200, Werner Macho wrote:
> The system (Server) MUST be synced with NTP with a given timeserver.
> Directly attached to the Server is a PTP Device:
> ---
>  ethtool -T ens2f1
> Time stamping parameters for ens2f1:
> Capabilities:
>         hardware-transmit     (SOF_TIMESTAMPING_TX_HARDWARE)
>         software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)
>         hardware-receive      (SOF_TIMESTAMPING_RX_HARDWARE)
>         software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
>         software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
>         hardware-raw-clock    (SOF_TIMESTAMPING_RAW_HARDWARE)
> PTP Hardware Clock: 1
> Hardware Transmit Timestamp Modes:
>         off                   (HWTSTAMP_TX_OFF)
>         on                    (HWTSTAMP_TX_ON)
> Hardware Receive Filter Modes:
>         none                  (HWTSTAMP_FILTER_NONE)
>         ptpv1-l4-event        (HWTSTAMP_FILTER_PTP_V1_L4_EVENT)
>         ptpv2-l4-event        (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
>         ptpv2-l2-event        (HWTSTAMP_FILTER_PTP_V2_L2_EVENT)
> ---
> So the hardware clock (which I meant) is the server HW clock, this must be
> leaved untouched and continue to sync with the given time server.

In this case, you don't need to use --free_running.  Simply let ptp4l
control the PHC and synchronize it to the PTP network time.

All you need is a little program that periodically reads two time
values, the PHC and the Linux system time, and computes the offset.

(the phc2sys program shows how to do this)

Then you interpolate the PHC time for a given Linux system time stamp.

HTH,
Richard




_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to