Always disable the clock sanity check when the ntpshm servo is used,
because it doesn't know when or how is the clock adjusted. Disable also
the kernel leap option as the process controlling the clock is
responsible for setting the kernel flag.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 phc2sys.c | 5 +++++
 ptp4l.c   | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/phc2sys.c b/phc2sys.c
index 4b8051e..87c1749 100644
--- a/phc2sys.c
+++ b/phc2sys.c
@@ -1324,6 +1324,11 @@ int main(int argc, char *argv[])
                goto bad_usage;
        }
 
+       if (node.servo_type == CLOCK_SERVO_NTPSHM) {
+               node.kernel_leap = 0;
+               node.sanity_freq_limit = 0;
+       }
+
        print_set_progname(progname);
        print_set_verbose(verbose);
        print_set_syslog(use_syslog);
diff --git a/ptp4l.c b/ptp4l.c
index a33900f..25270c6 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -300,6 +300,10 @@ int main(int argc, char *argv[])
            ds->flags & DDS_SLAVE_ONLY) {
                ds->clockQuality.clockClass = 255;
        }
+       if (cfg_settings.clock_servo == CLOCK_SERVO_NTPSHM) {
+               cfg_settings.dds.kernel_leap = 0;
+               cfg_settings.dds.sanity_freq_limit = 0;
+       }
 
        print_set_progname(progname);
        print_set_verbose(cfg_settings.verbose);
-- 
1.9.3


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to