Re: [Linuxptp-users] Selecting a master

2017-05-18 Thread Richard Cochran
On Thu, May 18, 2017 at 10:17:32AM +0200, Petr Kulhavy wrote: > Is the interface always polling? Or can the daemon send notifications? We have one "push" message for port state. See phc2sys.c for the client side. Internally, in ptp4l, the push code can be easily enough expanded if needs be. Tha

Re: [Linuxptp-users] Selecting a master

2017-05-18 Thread Petr Kulhavy
Is the interface always polling? Or can the daemon send notifications? Cheers Petr On 18/05/17 06:42, Richard Cochran wrote: > On Thu, May 18, 2017 at 12:43:02AM +0200, Petr Kulhavy wrote: >> The only remaining question is how to efficiently get the ptp4l status (or >> even better the status chan

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Richard Cochran
On Thu, May 18, 2017 at 12:43:02AM +0200, Petr Kulhavy wrote: > The only remaining question is how to efficiently get the ptp4l status (or > even better the status change event) from a C application. We have the management interface over UNIX Domain Socket. You can program this directly or fork+e

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Petr Kulhavy
Hi Richard, I'm reading once again the RFC and the AES specifications. The documents indeed say that the receiver just checks if his clock matches the ts-refclk. And if it doesn't it simply indicates that it cannot play. So you're right. There is no need to influence the master selection, as I o

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Richard Cochran
On Wed, May 17, 2017 at 04:08:07PM +0200, Petr Kulhavy wrote: > See the "ts-refclk" attribute defined in RFC7273 Section 4.3: The PTP protocols employ a distributed election protocol called the "Best Master Clock Algorithm" (BMCA) to determine the active clock master. The clock master c

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Petr Kulhavy
See the "ts-refclk" attribute defined in RFC7273 Petr On 17/05/17 15:43, Richard Cochran wrote: > On Wed, May 17, 2017 at 03:01:03PM +0200, Petr Kulhavy wrote: >> The reason why I was asking is that some protocols like AVB provide >> the clock master ID and domain number with the stream descripti

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Richard Cochran
On Wed, May 17, 2017 at 03:01:03PM +0200, Petr Kulhavy wrote: > The reason why I was asking is that some protocols like AVB provide > the clock master ID and domain number with the stream description. AVB, you say? IIRC, there is absolutely nothing in 802.1AS-2011 that allows the client to pick a

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Petr Kulhavy
The reason why I was asking is that some protocols like AVB provide the clock master ID and domain number with the stream description. The slave is supposed to sync to the given master and domain rather than to the best one. This of course will be fully exploited only in non-trivial networks, wh

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Miroslav Lichvar
On Tue, May 16, 2017 at 10:26:01PM +0200, Petr Kulhavy wrote: > How is it with domain number? Does the domainNumber limit the slave to > operate only in that particular domain? > Can the domainNumber be changed in runtime using pmc? If there is command to switch the domain in run time, what will

Re: [Linuxptp-users] Selecting a master

2017-05-17 Thread Richard Cochran
On Tue, May 16, 2017 at 10:26:01PM +0200, Petr Kulhavy wrote: > How is it with domain number? Does the domainNumber limit the slave to > operate only in that particular domain? Yes. > Can the domainNumber be changed in runtime using pmc? 1588 allows this, but it is not implemented. We only have

Re: [Linuxptp-users] Selecting a master

2017-05-16 Thread Petr Kulhavy
Thanks Richard. That seems to be what I'm looking for ;-) How is it with domain number? Does the domainNumber limit the slave to operate only in that particular domain? Can the domainNumber be changed in runtime using pmc? Thanks Petr On 16/05/17 22:05, Richard Cochran wrote: > On Tue, May 16,

Re: [Linuxptp-users] Selecting a master

2017-05-16 Thread Richard Cochran
On Tue, May 16, 2017 at 03:43:50PM +0200, Petr Kulhavy wrote: > is it possible to explicitly tell ptp4l which master it should sync to > in case multiple masters are available on the network? The protocol will pick the best master automatically. You can force one master to be the best by configu

Re: [Linuxptp-users] Selecting a master

2017-05-16 Thread Petr Kulhavy
Hi Kyle and thanks for your hints! Priority and domainNumber relate to the local clock. And I need to to this over UDP. Cheers Petr On 16/05/17 15:51, Mace, Kyle P. wrote: > I have not personally done it but there might be a few options you can set up > in a config file. This https://linux.die.

Re: [Linuxptp-users] Selecting a master

2017-05-16 Thread Mace, Kyle P.
I have not personally done it but there might be a few options you can set up in a config file. This https://linux.die.net/man/8/ptp4l has a list of the configurations options. I would look into priority, domainNumber, and if doing L2 transport maybe ptp_dst_mac and p2p_dst_mac. -Original Me