From: Vincent Cheng <vsch...@gmail.com>

Problem
=======
When local data set has better clock class than remote server, log shows best 
master is foreign clock.
Expected log to show local clock is best master.

=======================================
| Client   080027.fffe.799fc5         |
|                                     |
|   clockClass              6         |
|   dataset_comparison      G.8275.x  |
|   clock_type              OC        |
|                                     |
| enp0s8                              |
| port 1                              |
=======================================
  |                             
  |
  Server A
  080027.fffe.fd0000, clockClass 7

ptp4l[8180.149]: port 1 (enp0s8): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[8184.164]: port 1 (enp0s8): new foreign master 080027.fffe.fd0000-1
ptp4l[8185.489]: port 1 (enp0s8): LISTENING to MASTER on 
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[8185.489]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[8185.489]: port 1 (enp0s8): assuming the grand master role
ptp4l[8188.161]: selected best master clock 080027.fffe.fd0000
ptp4l[8188.162]: port 1 (enp0s8): assuming the grand master role


Solution
========
Include comparison of the local default data set and the best foreign clock 
data set for best_id assignment.


After Fix
=========
// Local clock class 6 vs remote clock class 7
ptp4l[8115.316]: port 1 (enp0s8): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[8119.327]: port 1 (enp0s8): new foreign master 080027.fffe.fd0000-1
ptp4l[8119.351]: port 1 (enp0s8): LISTENING to MASTER on 
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[8119.351]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[8119.351]: port 1 (enp0s8): assuming the grand master role
ptp4l[8123.326]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[8123.326]: port 1 (enp0s8): assuming the grand master role

// Local clock class 135 vs remote clock class 7
ptp4l[8705.933]: port 1 (enp0s8): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[8709.945]: port 1 (enp0s8): new foreign master 080027.fffe.fd0000-1
ptp4l[8711.514]: port 1 (enp0s8): LISTENING to MASTER on 
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[8711.514]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[8711.514]: port 1 (enp0s8): assuming the grand master role
ptp4l[8713.945]: selected best master clock 080027.fffe.fd0000
ptp4l[8713.945]: port 1 (enp0s8): MASTER to UNCALIBRATED on RS_SLAVE



Vincent Cheng (1):
  clock: Fix best master log message when D0 is better than Erbest

 clock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.34.1



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

Reply via email to