Hi,

There is the need to inform an external program about the current state of PTP. Like for example in 802.1Qbv, if PTP looses sync, we need to switch to an emergency state (eg. unconditionally open all gates), or if we regain sync, the Qbv scheduler might be reloaded.

I came up with the following solutions to this problem:
 (1) Poll the state using the unix domain socket and PTP messages
 (2) Extend the event system of linuxptp (SUBSCRIBE_EVENTS_NP)
 (3) Provide hooks at some places inside linuxptp

(1) and (2) both need another external program to poll the state or subscribe to events. Therefore, to use this a user might code their own program and cannot say, execute this script in case of an event. IMHO this makes (1) and (2) not easy to use. On the other hand, it works without having the need to modify linuxptp.

(3) would be my favorite but there are still open questions like, are the hooks executed asynchronous or synchronous. Synchronous hook might have an impact on linuxptp itself because it takes too much time to finish execution. Asynchronous hooks might have no relation with the event anymore; think of something like the port state, when the hook is executed the port state might have already changed again.

Another option would be to combine (2) and (3) and provide an additional binary in linuxptp which call external hook scripts on events.

Any suggestions? ideas?

-michael

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to