Hello,

I wanted to simulate the loss and recover of my ptp link by simply doing 
"ifconfig enp7s0f1 down" and later "ifconfig enp7s0f1 up".

After the UP, I get a ~35s offset on the source in chrony.
It was observed with chrony with ptp4l and direct PHC access (chrony PHC 
refclock) and with the complete suite with timemaster and (chrony SHM 
refclock).
A ptp4l or timemaster restart fix the issue.

I think the big jump is because the PHC was stopped and completely reset 
between a down/up sequence.
But as the ptp4l is configured in slave only, we should perhaps jump to 
adjust the time as long as we are in uncalibrated state as ptp4l will do 
at restart ?
(and not run BMCA ?)

Chrony is correctly setting the UTC-TAI kernel offset.
So the Intel (here) driver is not using it when initializing the PHC 
otherwise the offset would be minimum after putting the interface UP and 
I would not have seen the problem.

Is it an expected behavior ? Could we do something on the ptp4l side to 
address this case ?

Logs:

Aug 20 14:48:51 ns2 ptp4l: [1046806.047] [0:enp7s0f1] port 1: link down
Aug 20 14:48:51 ns2 ptp4l: [1046806.047] [0:enp7s0f1] port 1: SLAVE to FAULTY 
on FAULT_DETECTED (FT_UNSPECIFIED)
Aug 20 14:48:51 ns2 ptp4l: [1046806.104] [0:enp7s0f1] selected local clock 
a0369f.fffe.f1b643 as best master
Aug 20 14:48:51 ns2 ptp4l: [1046806.104] [0:enp7s0f1] assuming the grand master 
role
Aug 20 14:48:51 ns2 ptp4l: [1046806.104] [0:enp7s0f1] port 1: master state 
recommended in slave only mode
Aug 20 14:48:51 ns2 ptp4l: [1046806.104] [0:enp7s0f1] port 1: 
defaultDS.priority1 probably misconfigured
Aug 20 14:49:12 ns2 ptp4l: [1046827.119] [0:enp7s0f1] selected local clock 
a0369f.fffe.f1b643 as best master
Aug 20 14:49:12 ns2 ptp4l: [1046827.119] [0:enp7s0f1] assuming the grand master 
role
Aug 20 14:49:12 ns2 ptp4l: [1046827.119] [0:enp7s0f1] port 1: master state 
recommended in slave only mode
Aug 20 14:49:12 ns2 ptp4l: [1046827.119] [0:enp7s0f1] port 1: 
defaultDS.priority1 probably misconfigured
Aug 20 14:49:15 ns2 ptp4l: [1046830.204] [0:enp7s0f1] port 1: link up
Aug 20 14:49:15 ns2 kernel: [1046809.055056] igb 0000:07:00.1 enp7s0f1: igb: 
enp7s0f1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Aug 20 14:49:15 ns2 kernel: [1046809.055218] IPv6: ADDRCONF(NETDEV_CHANGE): 
enp7s0f1: link becomes ready
Aug 20 14:49:15 ns2 ptp4l: [1046830.248] [0:enp7s0f1] port 1: FAULTY to 
LISTENING on INIT_COMPLETE
Aug 20 14:49:15 ns2 ptp4l: [1046830.614] [0:enp7s0f1] clockcheck: clock jumped 
backward or running slower than expected!
Aug 20 14:49:16 ns2 ptp4l: [1046831.440] [0:enp7s0f1] port 1: new foreign 
master ec4670.fffe.009fc5-1
Aug 20 14:49:20 ns2 ptp4l: [1046835.441] [0:enp7s0f1] selected best master 
clock ec4670.fffe.009fc5
Aug 20 14:49:20 ns2 ptp4l: [1046835.441] [0:enp7s0f1] port 1: LISTENING to 
UNCALIBRATED on RS_SLAVE
Aug 20 14:49:20 ns2 ptp4l: [1046835.476] [0:enp7s0f1] port 1: minimum delay 
request interval 2^1
Aug 20 14:49:25 ns2 ptp4l: [1046840.617] [0:enp7s0f1] port 1: UNCALIBRATED to 
SLAVE on MASTER_CLOCK_SELECTED

Version used: linuxptp 2.0

Emmanuel.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to