Commit Graph

6 Commits (28ddb51567f916f813d422a7cf7b3b41c2cff9ab)

Author SHA1 Message Date
Richard Cochran dc1b7c66c6 bmc: Make the second part of the data set comparison algorithm public.
This code will be shared by future alternative algorithms.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-03 09:28:22 -07:00
Richard Cochran 1b3ef0d195 bmc: Allow alternative data set comparison algorithms.
Instead of using a hard coded algorithm, let the caller provide the
function that performs the comparison.  This will allow implementing
alternative algorithms from PTP profiles.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-03 09:28:22 -07:00
Richard Cochran 46db400589 Become the grand master when all alone.
This patch cleans up the BMC logic to allow assuming the GM role when no
other clocks are found in the network. By allowing the "best" to be NULL,
we can let the BMC to naturally pick the local clock as GM. As an added
bonus, this also get rid of the hacky check for a lost master.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-07-14 21:48:23 +02:00
Richard Cochran c2fad7bd51 Fix the BMC state decision algorithm.
We failed to make the distinction between plain old "better" and
"better by topology," but the BMC algorithm really counts on this.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-01-07 08:07:56 +01:00
Richard Cochran 807ec32c96 Fix wrong result from the best master clock algorithm.
The BMC should never return 'faulty', and I don't know what I was thinking
here, so let's just fix it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-01-07 08:07:56 +01:00
Richard Cochran c9a15e6094 Add the best master clock algorithm.
This commit also introduces clock and port objects, but only with the
minimal interface needed by the BMC.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2011-11-04 19:20:23 +01:00