Discussion:
[Linuxptp-devel] [PATCH] Set also priority1 in slave only mode.
Miroslav Lichvar
2012-08-27 17:20:42 UTC
Permalink
Signed-off-by: Miroslav Lichvar <***@redhat.com>
---
ptp4l.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ptp4l.c b/ptp4l.c
index eb26cce..ad4676f 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -175,6 +175,7 @@ int main(int argc, char *argv[])
break;
case 's':
ds->slaveOnly = TRUE;
+ ds->priority1 = 255;
ds->clockQuality.clockClass = 255;
*cfg_ignore |= CFG_IGNORE_SLAVEONLY;
break;
--
1.7.7.6
Richard Cochran
2012-08-27 19:35:19 UTC
Permalink
Post by Miroslav Lichvar
---
ptp4l.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/ptp4l.c b/ptp4l.c
index eb26cce..ad4676f 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -175,6 +175,7 @@ int main(int argc, char *argv[])
break;
ds->slaveOnly = TRUE;
+ ds->priority1 = 255;
So I understand why you want this (or at least I guess that you did
just what I did once). By accident you set a slave only node to a
higher priority than the master, right?

And so the slave never chooses the master in the BMC, right?

I hesitate to take this patch, because I don't think 1588 requires
it. My goal with ptp4l is to be a 'reference implementation' and to
follow it more or less literally.

[ Maybe someone wants to prevent synchronizing to a certain master,
and so sets the priority in this way on purpose. ]

Anyhow, I do see another problem here at appeared with the recent
restructuring of the options, namely that when slave only is in the
configuration file, we should also set the clock class to 255.

Thanks,
Richard
Miroslav Lichvar
2012-08-27 20:29:05 UTC
Permalink
Post by Richard Cochran
Post by Miroslav Lichvar
ds->slaveOnly = TRUE;
+ ds->priority1 = 255;
So I understand why you want this (or at least I guess that you did
just what I did once). By accident you set a slave only node to a
higher priority than the master, right?
I was trying to sync against ptpd2 (which seems to use lower default
priority) and it wasn't very obvious why ptp4l refused to enter slave
mode.
Post by Richard Cochran
I hesitate to take this patch, because I don't think 1588 requires
it. My goal with ptp4l is to be a 'reference implementation' and to
follow it more or less literally.
Ok, thanks. I'm not very familiar with the spec yet.
--
Miroslav Lichvar
Loading...