On Mon, Nov 08, 2021 at 09:44:27AM +0000, Joanna Yurdal wrote:
> Without the proposed patch the result of pmc "get time_status" when lost 
> synchronization with external GM shows:
>  pmc -u -b 0  'get time_status' :
>       c86314.fffe.30006e-0 seq 0 RESPONSE MANAGEMENT TIME_STATUS_NP 
>               master_offset              192
>               ingress_time               0
>               cumulativeScaledRateOffset +0.000000000
>               scaledLastGmPhaseChange    0
>               gmTimeBaseIndicator        0
>               lastGmPhaseChange          0x0000'0000000000000000.0000
>               gmPresent                  true
>               gmIdentity                 ec4670.fffe.00ee5f
> 
> while result of the "get port_data_set"  is:
>       c86314.fffe.30006e-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET 
>               portIdentity            c86314.fffe.30006e-1
>               portState               LISTENING

You omitted the important data, namely PARENT_DATA_SET.  You will see
that grandmasterIdentity differs from PORT_DATA_SET.portIdentity.

That is the very condition used to set gmPresent:

                if (cid_eq(&c->dad.pds.grandmasterIdentity, 
&c->dds.clockIdentity))
                        tsn->gmPresent = 0;
                else
                        tsn->gmPresent = 1;

Thanks,
Richard



_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to