Dear all, I'm facing an issue with configuring my yocto x86 box as a boundary clock. It has 2 NICs: eth3 connected to a grand master (another yocto x86 box) and enp4s0 connected to a time slave.
Basically, it already works as one can see in the following logs: ptp4l[46851.600]: selected /dev/ptp2 as PTP clock ptp4l[46851.600]: port 2: just a bunch of devices ptp4l[46851.620]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[46851.620]: port 2: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[46851.620]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[46853.358]: port 2: new foreign master c400ad.fffe.32f35f-1 ptp4l[46853.630]: port 1: bad message ptp4l[46854.630]: port 1: bad message ptp4l[46854.962]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[46854.962]: selected local clock 74fe48.fffe.3f4d66 as best master ptp4l[46854.962]: port 1: assuming the grand master role ptp4l[46857.358]: selected best master clock c400ad.fffe.32f35f ptp4l[46857.358]: port 2: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[46859.144]: master offset -3201 s0 freq -2719 path delay 303 ptp4l[46860.144]: master offset -3237 s2 freq -2755 path delay 303 ptp4l[46860.144]: port 2: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[46861.144]: master offset -3229 s2 freq -5984 path delay 299 ptp4l[46862.144]: master offset 23 s2 freq -3701 path delay 296 .... and pch2sys: phc2sys[46853.012]: reconfiguring after port state change phc2sys[46853.012]: selecting eth3 for synchronization phc2sys[46853.012]: selecting enp4s0 for synchronization phc2sys[46853.012]: no source, selecting enp4s0 as the default clock .... phc2sys[46855.013]: port 74fe48.fffe.3f4d66-1 changed state phc2sys[46855.013]: reconfiguring after port state change phc2sys[46855.013]: selecting eth3 for synchronization phc2sys[46855.013]: selecting enp4s0 for synchronization phc2sys[46855.013]: no source, selecting enp4s0 as the default clock .... phc2sys[46858.013]: port 74fe48.fffe.3f4d66-2 changed state phc2sys[46858.014]: reconfiguring after port state change phc2sys[46858.014]: selecting enp4s0 for synchronization phc2sys[46858.014]: master clock not ready, waiting... phc2sys[46861.014]: port 74fe48.fffe.3f4d66-2 changed state phc2sys[46861.014]: reconfiguring after port state change phc2sys[46861.014]: selecting enp4s0 for synchronization phc2sys[46861.014]: selecting CLOCK_REALTIME for synchronization phc2sys[46861.014]: selecting eth3 as the master clock phc2sys[46861.014]: CLOCK_REALTIME phc offset 37000001931 s0 freq -2074 delay 1660 phc2sys[46861.015]: enp4s0 phc offset 437 s0 freq -713 delay 12944 .... I think this is all fine, but the BMCA takes an extra step before selecting the remote GM. Since startup time is critical, I want to avoid that. So I found that I can disable BMCA in linuxptp 3.1, the doc states: "In a bridge, slaveOnly (which is a global option) can be set to make all ports assume the slave role. masterOnly (which is a per-port config option) can then be used to set individual ports to take master role." So my ptp4l.conf results in s.t. like this: ------------ [global] time_stamping hardware boundary_clock_jbod 1 BMCA noop slaveOnly 1 [enp4s0] masterOnly 1 [eth3] ------------ With this, I get the following log message: ptp4l[46920.907]: selected /dev/ptp2 as PTP clock ptp4l[46920.907]: port 2: just a bunch of devices ptp4l[46920.929]: port 1: INITIALIZING to MASTER on INIT_COMPLETE ptp4l[46920.929]: port 2: INITIALIZING to SLAVE on INIT_COMPLETE ptp4l[46920.929]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[46921.359]: port 2: new foreign master c400ad.fffe.32f35f-1 .... ptp4l[46925.359]: selected best master clock c400ad.fffe.32f35f ptp4l[46925.359]: port 1: master state recommended in slave only mode ptp4l[46925.359]: port 1: defaultDS.priority1 probably misconfigured ptp4l[46927.147]: master offset -15422 s0 freq +530 path delay 389 .... and pch2sys: phc2sys[46922.304]: reconfiguring after port state change phc2sys[46922.305]: selecting enp4s0 for synchronization phc2sys[46922.305]: selecting CLOCK_REALTIME for synchronization phc2sys[46922.305]: selecting eth3 as the master clock .... So ptp4l/pch2sys immediately shows the clock configuration I expect. However, the master offset and the offset of enp4s0 is not getting synced but stays constant/drifts away. Why is that? And I'm also confused by the message 'master state recommended in slave only mode'. Why does it complain when the port is already set to master? Please find also more detailed logs and the exact ptp4l.conf here: https://gist.github.com/gotzl/2db2037a36c47f09abb5cb4a564d2228 I hope the information is sufficient and I would appreciate any input, I'm sure that I've some miss-conception as I'm quite new to the subject ... Thank you and kind regards, Matthias ReplyForward
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users