Hi Erez, The commit message describes what will happen after applying the commit.
Currently when ptp4l starts the "gmPresent" is false. When it synchronizes with external grandmaster "gmPresent" is true. When I block port 319 and 320, then "ingress_time" and "master_offset" becomes 0 but "gmPresent" remains true... I can provide more logs if required. It was the case both in 2.1 and 3.1 release. From: Geva, Erez <erez.geva....@siemens.com> Sent: Friday, 5 November 2021 15:50 To: Joanna Yurdal <j...@trackman.com> Cc: linuxptp-devel@lists.sourceforge.net <linuxptp-devel@lists.sourceforge.net> Subject: RE: [Linuxptp-devel] [PATCH] Set grandmasterIdentity to localClockIdentity Hi, I though gmPresent means an external clock, not own clock. If the ptp4l looses sync, how can you have a grand master present? Please explain. Erez -----Original Message----- From: Joanna Yurdal <j...@trackman.com> Sent: Friday, 5 November 2021 12:04 To: linuxptp-devel@lists.sourceforge.net Subject: [Linuxptp-devel] [PATCH] Set grandmasterIdentity to localClockIdentity When ptp4l looses synchronization with remote grandmaster and local clock is selected, pmc commands "get time_status" and "time_status_np" will return "gmPresent" set to false, same way as before synchronizing with the remote grandmaster Signed-off-by: Joanna Yurdal <j...@trackman.com> --- clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clock.c b/clock.c index bbfd1a8..147bcb6 100644 --- a/clock.c +++ b/clock.c @@ -2001,6 +2001,7 @@ static void handle_state_decision_event(struct clock *c) if (cid_eq(&best_id, &c->dds.clockIdentity)) { pr_notice("selected local clock %s as best master", cid2str(&best_id)); + c->dad.pds.grandmasterIdentity = c->dds.clockIdentity; } else { pr_notice("selected best master clock %s", cid2str(&best_id)); -- 2.25.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&data=04%7C01%7Cjyu%40trackman.com%7C6cf7af4051bf45c12a8208d9a06b9109%7Ceb272a1ee76740419363f8736579f898%7C1%7C1%7C637717206149792436%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Hfgd0WUeIAIfcIPdR9n9mgMBzEZ4WcsOq4Cl6o3EHQI%3D&reserved=0 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel