Am 2018-08-18 16:04, schrieb Richard Cochran:
On Mon, Aug 06, 2018 at 05:29:09PM +0200, Michael Walle wrote:
Would an implemention (like execute some shell scripts on specific events)
inside linuxptp be accepted at all?

No.  Even though it seems like the easy way, in the end it will prove
brittle.  Every one will want their own special hook.  It will be a
mess.

From an end-user perspective, this is something which can easily be used, I guess. This could also be an external script/daemon, but then, two daemons (ptp4l and "run-hook-daemon") have to be started. Also there needs some kind of protocol between these two, we could reuse SUBSCRIBE_EVENTS_NP, but have
to add other events to it.

Right.  I merged the events code in expectation of adding new
triggers.  But so far, there have been none.

This is something which could be done right now without any changes. And like you said, should be good enough for monitoring. But IMHO it falls short
for the Qbv use case. Eg. you could miss some events; like transitions
MASTER -> SLAVE -> MASTER within the poll interval.

Right, that is why we have a push model with subscription.

At least in terms of PTP. But if you use Qbv which depends on PTP you'll have your scheduler reloaded as fast as possible. Of course, this is not
time critical for accuracy reasons, but you still want to have decent
performance.

Why do you need to reload the scheduler?

It's an implementation detail (in hardware, so I can't do anything about it) of the scheduler, that it has to be restarted if there was a clock jump. And additionally, if there is no grandmaster anymore, we should stop the scheduler altogether. All this, I cannot do today without patching linuxptp. So I thought it would be a good idea to have some hooks inside linuxptp which can take care of these tasks (and is easy to use and extendable).


-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