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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Flinuxptp-devel&data=04%7C01%7Cerez.geva.ext%40siemens.com%7Cce92cac7a2e54da1d0ee08d9a06a0f5a%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637717200851549067%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=C4Lklo7GuVxeZLz0e7zEqC1VaRehGgip4vUynjqLXyI%3D&reserved=0 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel