[Linuxptp-devel] [PATCH] Fix drift calculation in PI servo with large values.

2013-12-20 Thread Miroslav Lichvar
When the drift value is adjusted by the newly measured frequency offset, multiply the frequencies instead of adding the measured offset to the old value to get accurate result even when updating a large drift. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- pi.c | 6 -- 1 file

Re: [Linuxptp-devel] [PATCH] Adjust tick length with system clock.

2014-01-02 Thread Miroslav Lichvar
On Sat, Dec 21, 2013 at 08:15:40PM +0100, Richard Cochran wrote: On Thu, Dec 19, 2013 at 06:39:11PM +0100, Miroslav Lichvar wrote: + /* With system clock set also the tick length. */ + if (clkid == CLOCK_REALTIME realtime_nominal_tick) { + tx.modes |= ADJ_TICK; Fooling

Re: [Linuxptp-devel] pmc Problem

2014-01-07 Thread Miroslav Lichvar
on stack is overwritten before the socket is created. Should be the interface name and pod variables copied in port_open()? -- Miroslav Lichvar -- Rapidly troubleshoot problems before they affect your business. Most

Re: [Linuxptp-devel] [PATCH RFC 0/2] UDS bug fixes

2014-01-09 Thread Miroslav Lichvar
and in my tests it seems to be working as expected now. Thanks. -- Miroslav Lichvar -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical

[Linuxptp-devel] [PATCH 3/3] pmc: print cumulativeScaledRateOffset as offset.

2014-02-21 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmc.c b/pmc.c index 077991b..65c789c 100644 --- a/pmc.c +++ b/pmc.c @@ -381,7 +381,7 @@ static void pmc_show(struct ptp_message *msg, FILE *fp

Re: [Linuxptp-devel] Accuracy of ADJ_SETOFFSET with PHC

2014-03-19 Thread Miroslav Lichvar
is calculated as (TS1 + TS2) / 2 - TP, where TS1 and TS2 are system clock readings made right before and after PHC reading (TP). In this case something like (TS1 + TS2 * 5) / 6 - TP would possibly be more accurate. -- Miroslav Lichvar

Re: [Linuxptp-devel] [PATCH 11/14] phc2sys: autoconfiguration

2014-05-12 Thread Miroslav Lichvar
ptp4l is killed (update_pmc fails to update the UTC offset or the resubscription fails)? I'm worried it's too easy to get into a state where phc2sys is not receiving updates and the user is wondering why it's not working as expected. Thanks, -- Miroslav Lichvar

[Linuxptp-devel] [PATCH] Fix sk_interface_addr().

2014-05-12 Thread Miroslav Lichvar
This was broken in commit e804e6, ifa_addr is a pointer to sockaddr, it shouldn't be referenced for the memcpy call. --- sk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sk.c b/sk.c index 838004e..f694bbd 100644 --- a/sk.c +++ b/sk.c @@ -198,7 +198,7 @@ int

Re: [Linuxptp-devel] [PATCH v2 04/14] phc2sys: store information about clocks being UTC or TAI

2014-05-23 Thread Miroslav Lichvar
(int64_t)node-sync_offset * NS_PER_SEC * direction; +} -- Miroslav Lichvar -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get

Re: [Linuxptp-devel] [PATCH v2 11/14] phc2sys: autoconfiguration

2014-05-23 Thread Miroslav Lichvar
NULL, so the PS_SLAVE and PS_MASTER assignments should be moved after the !src and !dst check. -- Miroslav Lichvar -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium

Re: [Linuxptp-devel] addition of a get frequency op?

2014-06-11 Thread Miroslav Lichvar
) of the parent's clock as measured by the slave clock. But compared to what? To another reference clock, the uncorrected slave clock, or adjusted slave clock (with or without currently running phase correction)? -- Miroslav Lichvar

[Linuxptp-devel] [PATCH] Remove unused field from struct config.

2014-06-11 Thread Miroslav Lichvar
The sanity_freq_limit field was erroneously added to the config struct in ed379b40, the right one is in the default_ds struct. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/config.h b/config.h index 1b8cea3..a0b562a 100644

Re: [Linuxptp-devel] [PATCH RFC] Add new servo for NTP SHM reference clock.

2014-06-12 Thread Miroslav Lichvar
On Thu, Jun 12, 2014 at 11:44:42AM +0200, Richard Cochran wrote: On Wed, Jun 11, 2014 at 06:07:08PM +0200, Miroslav Lichvar wrote: This is mainly useful when other time sources are available on the system (e.g. NTP, hardware reference clocks, or other PTP domains) and a fallback to/from

[Linuxptp-devel] [PATCH 3/3] makefile: remove programs on clean.

2014-06-18 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index e36835b..9ab3db1 100644 --- a/makefile +++ b/makefile @@ -69,7 +69,7 @@ install: $(PRG) install -p -m 644 -t $(man8dir) $(PRG

[Linuxptp-devel] [PATCH 1/3] phc2sys: track sync offset and leap second status in each clock.

2014-06-18 Thread Miroslav Lichvar
This simplifies passing of pending leap seconds to the clocks and it will also allow to apply leap second to other clocks than system clock if needed in future. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- phc2sys.c | 54 +++--- 1 file

[Linuxptp-devel] [PATCH 0/3] Set TAI offset of system clock

2014-06-18 Thread Miroslav Lichvar
patch fixes make clean; make on system where leap seconds are tested and the time is jumping backwards :). Miroslav Lichvar (3): phc2sys: track sync offset and leap second status in each clock. Set TAI offset of system clock. makefile: remove programs on clean. clock.c| 9

[Linuxptp-devel] [PATCH 2/3] Set TAI offset of system clock.

2014-06-18 Thread Miroslav Lichvar
When synchronizing the system clock and the PTP UTC offset is valid and traceable, set the TAI offset of the clock to have correct CLOCK_TAI (which is implemented in the kernel as CLOCK_REALTIME + TAI offset). Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c| 9

[Linuxptp-devel] Conflict in DOMAIN with math.h

2014-06-24 Thread Miroslav Lichvar
included from clock.c:24:0: /usr/include/math.h:345:0: note: this is the location of the previous definition # define DOMAIN 1 ^ -- Miroslav Lichvar -- Open source business process management suite built on Java

[Linuxptp-devel] [PATCH 5/5] Append PID to client UDS paths.

2014-07-08 Thread Miroslav Lichvar
This allows running multiple phc2sys and pmc instances at the same time. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- phc2sys.c | 7 +-- pmc.8 | 2 +- pmc.c | 12 +--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index

Re: [Linuxptp-devel] [PATCH 3/5] Move signal handling to util.c.

2014-07-09 Thread Miroslav Lichvar
On Tue, Jul 08, 2014 at 05:18:29PM +, Keller, Jacob E wrote: On Tue, 2014-07-08 at 16:14 +0200, Miroslav Lichvar wrote: @@ -404,7 +385,7 @@ int main(int argc, char *argv[]) return -1; } - while (running) { + while (is_running()) { Is there a reason we

[Linuxptp-devel] PTP+NTP configuration

2014-07-17 Thread Miroslav Lichvar
-serial /dev/ttyS2] Would you be interested in including this program in linuxptp? Are dependencies on external programs acceptable? -- Miroslav Lichvar -- Want fast and easy access to all the code in your enterprise? Index

Re: [Linuxptp-devel] PTP+NTP configuration

2014-07-18 Thread Miroslav Lichvar
On Thu, Jul 17, 2014 at 07:35:30PM +0200, Richard Cochran wrote: On Thu, Jul 17, 2014 at 03:15:20PM +0200, Miroslav Lichvar wrote: Are dependencies on external programs acceptable? That depends. Will the library be available on every system that wants to run linuxptp? I meant the runtime

[Linuxptp-devel] [PATCH 2/3] Add string and pointer array utility functions.

2014-07-25 Thread Miroslav Lichvar
Add some functions to work with strings and arrays of pointers that will be useful later. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- util.c | 95 ++ util.h | 57 2 files changed

[Linuxptp-devel] [PATCH 0/3] timemaster

2014-07-25 Thread Miroslav Lichvar
. The first patch seems to be needed to avoid deadlocks in the ptp4l/phc2sys signal handler when terminating the program by CTRL-C and the second patch adds some utility functions used in the third patch. Miroslav Lichvar (3): Don't print messages in signal handler. Add string and pointer

[Linuxptp-devel] [PATCH 1/3] Don't print messages in signal handler.

2014-07-25 Thread Miroslav Lichvar
Only reentrant functions should be called here. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util.c b/util.c index ae66bb1..cb428b1 100644 --- a/util.c +++ b/util.c @@ -318,7 +318,6 @@ int get_arg_val_d(int op, const char

Re: [Linuxptp-devel] [PATCH 0/3] timemaster

2014-10-01 Thread Miroslav Lichvar
On Tue, Sep 30, 2014 at 04:38:48PM +0200, Richard Cochran wrote: On Tue, Sep 30, 2014 at 04:21:48PM +0200, Miroslav Lichvar wrote: I can add a check to incdefs.sh and build timemaster only if fork() is available, would that be ok? Okay, or maybe just keep timemaster out of the all target

[Linuxptp-devel] [PATCH 3/4] Add string and pointer array utility functions.

2014-10-02 Thread Miroslav Lichvar
Add some functions to work with strings and arrays of pointers that will be useful later. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- incdefs.sh | 3 ++ util.c | 95 ++ util.h | 57

[Linuxptp-devel] [PATCHv2 0/4] timemaster

2014-10-02 Thread Miroslav Lichvar
the system clock to NTP and PTP time sources. The PTP time is provided by phc2sys and ptp4l via SHM reference clocks to chronyd/ntpd, which can compare all time sources and use the best sources to synchronize the system clock. Miroslav Lichvar (4): Don't print messages in signal handler. Don't include

[Linuxptp-devel] [PATCHv3 1/4] Don't print messages in signal handler.

2014-10-03 Thread Miroslav Lichvar
Only reentrant functions should be called here. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- util.c | 1 - 1 file changed, 1 deletion(-) diff --git a/util.c b/util.c index ae66bb1..cb428b1 100644 --- a/util.c +++ b/util.c @@ -318,7 +318,6 @@ int get_arg_val_d(int op, const char

[Linuxptp-devel] [PATCHv3 4/4] Add timemaster.

2014-10-03 Thread Miroslav Lichvar
to synchronize the system clock. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- incdefs.sh | 18 +- makefile |7 +- timemaster.8 | 335 + timemaster.c | 1173 ++ 4 files changed, 1529 insertions(+), 4

[Linuxptp-devel] [PATCHv3 0/4] timemaster

2014-10-03 Thread Miroslav Lichvar
to synchronize the system clock. Miroslav Lichvar (4): Don't print messages in signal handler. Don't include config.h in util.h Add string and pointer array utility functions. Add timemaster. config.h |8 - incdefs.sh | 23 +- makefile |7 +- phc_ctl.c|1 + timemaster.8

[Linuxptp-devel] [PATCHv3 2/4] Don't include config.h in util.h

2014-10-03 Thread Miroslav Lichvar
The config module is used by ptp4l only, but util is shared with other programs. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- config.h | 8 phc_ctl.c | 1 + util.h| 12 +++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/config.h b/config.h

[Linuxptp-devel] [PATCH] port: fix fda initialization.

2014-11-05 Thread Miroslav Lichvar
Initialize all descriptors to prevent polling invalid descriptors from faulty ports. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index aae5910..6ce63f7 100644 --- a/port.c +++ b/port.c

[Linuxptp-devel] [PATCH] linreg: fix servo resetting

2014-11-20 Thread Miroslav Lichvar
The stats for the maximum size were not reset, which caused the the servo to reuse old data instead of returning with unlocked state. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- linreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linreg.c b/linreg.c index

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-02-18 Thread Miroslav Lichvar
On Tue, Feb 17, 2015 at 08:25:03PM +0100, Richard Cochran wrote: On Tue, Feb 17, 2015 at 12:31:44PM +0100, Miroslav Lichvar wrote: With the change I'm proposing, the offsets/delays of t1't2't3't4' and t1t2t3t4 samples are used directly to update the clock and the filtered value is used just

Re: [Linuxptp-devel] [PATCH RFC 4/6] clock: set sample weight.

2015-02-17 Thread Miroslav Lichvar
On Mon, Feb 16, 2015 at 08:48:15PM +0100, Richard Cochran wrote: On Fri, Feb 13, 2015 at 01:56:16PM +0100, Miroslav Lichvar wrote: + if (sync_delay_rate = 0 servo_weight_samples(c-servo)) { + /* Get new sample delay with updated t1 and t2 */ + sample_delay

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-02-17 Thread Miroslav Lichvar
On Mon, Feb 16, 2015 at 09:07:12PM +0100, Richard Cochran wrote: On Fri, Feb 13, 2015 at 01:56:12PM +0100, Miroslav Lichvar wrote: These patches should improve the synchronization of the clock with larger jitters, e.g. with software timestamping, wireless networks, etc. What kind

[Linuxptp-devel] [PATCH RFC 3/6] servo: add support for weighted samples.

2015-02-13 Thread Miroslav Lichvar
Add weight parameter to the sample function and add a new function to check if the servo prefers weighted (and more noisy) samples. Samples with smaller weight are less reliable, they can be ignored or the adjustments of the clock can be smaller. Signed-off-by: Miroslav Lichvar mlich

[Linuxptp-devel] [PATCH RFC 5/6] linreg: use sample weight.

2015-02-13 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- linreg.c | 63 +++ 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/linreg.c b/linreg.c index 3f7fe9a..e2915c5 100644 --- a/linreg.c +++ b/linreg.c @@ -42,6 +42,7

[Linuxptp-devel] [PATCH RFC 1/6] clock: save delay timestamps and correction.

2015-02-13 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 22 ++ clock.h | 5 - port.c | 3 ++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/clock.c b/clock.c index b841e81..9bc0352 100644 --- a/clock.c +++ b/clock.c @@ -108,8 +108,11

[Linuxptp-devel] [PATCH RFC 2/6] clock: split out calculation of sample delay.

2015-02-13 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/clock.c b/clock.c index 9bc0352..d42d604 100644 --- a/clock.c +++ b/clock.c @@ -1292,19 +1292,11 @@ int clock_poll(struct clock

[Linuxptp-devel] [PATCH] timemaster: set mode in ntp config to create private SHM segments.

2015-02-09 Thread Miroslav Lichvar
In ntp-4.2.8p1 the segment access was made configurable with the refclock mode option. Set the mode to 1 to create all SHM segments with owner-only access. --- timemaster.8 | 10 ++ timemaster.c | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/timemaster.8

[Linuxptp-devel] [PATCHv2 6/6] pi: use sample weight.

2015-03-17 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- pi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pi.c b/pi.c index 9c7b148..e0116fe 100644 --- a/pi.c +++ b/pi.c @@ -137,8 +137,8 @@ static double pi_sample(struct servo *servo, break

[Linuxptp-devel] [PATCHv2 0/6] Improve accuracy with software timestamping

2015-03-17 Thread Miroslav Lichvar
delay is normally 1 ms and the new sample has 10ms delay, the sample weight (and the clock adjustment that will be made) will be 10 times smaller. Miroslav Lichvar (6): Convert and correct time stamps early. Refactor time stamp processing. tsproc: add raw and weighting modes. servo: add

[Linuxptp-devel] [PATCHv2 3/6] tsproc: add raw and weighting modes.

2015-03-17 Thread Miroslav Lichvar
messages were delayed significantly in the network and possibly include a large error. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 5 +++-- config.c| 24 config.h| 1 + default.cfg | 1 + ds.h| 2 ++ gPTP.cfg| 1 + port.c

[Linuxptp-devel] [PATCHv2 5/6] linreg: use sample weight.

2015-03-17 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- linreg.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/linreg.c b/linreg.c index 3f7fe9a..8f354f4 100644 --- a/linreg.c +++ b/linreg.c @@ -42,6 +42,7 @@ struct point

Re: [Linuxptp-devel] [PATCHv2 1/6] Convert and correct time stamps early.

2015-03-19 Thread Miroslav Lichvar
how that happened. Thanks, -- Miroslav Lichvar -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-03-09 Thread Miroslav Lichvar
On Fri, Mar 06, 2015 at 06:11:25PM +0100, Miroslav Lichvar wrote: On Fri, Mar 06, 2015 at 04:05:08PM +0100, Richard Cochran wrote: There are really two issues: 1. The filter algorithm itself. 2. How the new filter fits into the SW design. Although I am not convinced about #1

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-03-10 Thread Miroslav Lichvar
ppm to 0.73 ppm and 0.53 ppm. -- Miroslav Lichvar -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-03-10 Thread Miroslav Lichvar
On Tue, Mar 10, 2015 at 10:29:43AM +0100, Miroslav Lichvar wrote: To give you an idea what difference you can expect with raw delay/offset and weights, here are graphs from a simulation with 10us jitter and default PI constants with SW timestamping. https://mlichvar.fedorapeople.org/tmp/ptp

Re: [Linuxptp-devel] UTC leap, TAI and clock precision

2015-03-12 Thread Miroslav Lichvar
timex contains data relative to clock estimate such as : stabil, jitcnt, stbcnt ... which could be easyer to retrieve by simple call to clock_adjtimex. I think these adjtimex values are set only with the kernel PPS discipline, which is not used with ptp4l or phc2sys. -- Miroslav Lichvar

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-03-06 Thread Miroslav Lichvar
should be automatic. What do you think? -- Miroslav Lichvar -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all

Re: [Linuxptp-devel] UTC leap, TAI and clock precision

2015-03-11 Thread Miroslav Lichvar
this clock precision by creating my own PMC client with an UDS connection to ptp4l to have user defined application managing this state (SYNCHRONIZED/NOT SYNCHRONIZED) or is there some other way ? I think you can write your own client or you can use pmc in a script. -- Miroslav Lichvar

Re: [Linuxptp-devel] [PATCH RFC 0/6] Improve accuracy with software timestamping

2015-03-11 Thread Miroslav Lichvar
On Mon, Mar 09, 2015 at 08:53:52PM +0100, Richard Cochran wrote: On Fri, Mar 06, 2015 at 06:11:25PM +0100, Miroslav Lichvar wrote: The trouble is the raw mode is not a filter that can be easily plugged in, it has a different input than servos. It's a fundamentally different approach in how

[Linuxptp-devel] [PATCH RFC 0/2] time stamp processing

2015-03-13 Thread Miroslav Lichvar
This is an implementation of the time stamp processor as discussed in the thread on improving accuracy with software timestamping. I would like to get some feedback before finishing it and rebasing the other patches on top of it. Is this a step in the right direction? Miroslav Lichvar (2

[Linuxptp-devel] [PATCH RFC 1/2] Refactor time stamp processing.

2015-03-13 Thread Miroslav Lichvar
: transport_destroy(p-trp); err_port: diff --git a/tsproc.c b/tsproc.c new file mode 100644 index 000..f8d5195 --- /dev/null +++ b/tsproc.c @@ -0,0 +1,155 @@ +/** + * @file tsproc.c + * @note Copyright (C) 2015 Miroslav Lichvar mlich...@redhat.com + * + * This program is free software; you can

[Linuxptp-devel] [PATCH RFC 2/2] tsproc: add raw and weighting modes.

2015-03-13 Thread Miroslav Lichvar
--- clock.c | 5 +++-- port.c | 2 +- tsproc.c | 27 ++- tsproc.h | 5 +++-- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/clock.c b/clock.c index f52dc0b..1ec2b0d 100644 --- a/clock.c +++ b/clock.c @@ -852,7 +852,8 @@ struct clock

Re: [Linuxptp-devel] [PATCHv3 0/6] Improve accuracy with software timestamping

2015-03-30 Thread Miroslav Lichvar
On Mon, Mar 30, 2015 at 11:07:16AM +0200, Richard Cochran wrote: On Thu, Mar 26, 2015 at 04:32:11PM +0100, Miroslav Lichvar wrote: This adds new time stamp processing modes that are suitable with software time stamping. Series applied. Thanks! -- Miroslav Lichvar

Re: [Linuxptp-devel] Limited success with hardware PTP

2015-03-03 Thread Miroslav Lichvar
Miroslav Lichvar mlich...@redhat.com wrote: The default precision of the SHM refclock in chrony is 1 microsecond, it won't report jitter smaller than that. Add precision 1e-9 to the SHM line in your chrony.conf to fix that. Ah, that explains a lot. Will that fix the jitter computation

Re: [Linuxptp-devel] Limited success with hardware PTP

2015-03-03 Thread Miroslav Lichvar
refclock samples have identical offset, the calculated dispersion might be zero, but it will be set to the precision before accumulating the sample to avoid division by zero etc. -- Miroslav Lichvar -- Dive into the World

Re: [Linuxptp-devel] Limited success with hardware PTP

2015-02-26 Thread Miroslav Lichvar
samples, but some clients didn't set this correctly, so it is currently ignored. -- Miroslav Lichvar -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership

Re: [Linuxptp-devel] Limited success with hardware PTP

2015-03-04 Thread Miroslav Lichvar
On Tue, Mar 03, 2015 at 11:44:47AM -0800, Gary E. Miller wrote: Miroslav Lichvar mlich...@redhat.com wrote: On Tue, Mar 03, 2015 at 12:38:41AM -0800, Gary E. Miller wrote: First, why does chronyd not support uSec SHM? (I usually use the SOCK) It does support both microsecond

Re: [Linuxptp-devel] ntp SHMs

2015-02-25 Thread Miroslav Lichvar
On Mon, Feb 23, 2015 at 11:56:02PM -0800, Gary E. Miller wrote: Miroslav Lichvar mlich...@redhat.com wrote: On Mon, Feb 23, 2015 at 06:48:51PM -0800, Gary E. Miller wrote: ptp4l[365.571]: clockcheck: clock jumped forward or running faster than expected! Looks like something else

Re: [Linuxptp-devel] [PATCHv2 1/6] Convert and correct time stamps early.

2015-03-25 Thread Miroslav Lichvar
. I thought separate variables for corrected timestamps would be less confusing for someone reading the PTP spec where the corrections are applied later in the delay calculation. -- Miroslav Lichvar -- Dive into the World

Re: [Linuxptp-devel] [PATCHv2 2/6] Refactor time stamp processing.

2015-03-25 Thread Miroslav Lichvar
? That was for consistency with the tsproc_update_delay function, there is one call with NULL delay. For offset that probably won't be needed and it doesn't make much sense anyway. -- Miroslav Lichvar -- Dive into the World

[Linuxptp-devel] [PATCHv3 3/6] tsproc: add raw and weighting modes.

2015-03-26 Thread Miroslav Lichvar
messages were delayed significantly in the network and possibly include a large error. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 5 +++-- config.c| 24 config.h| 1 + default.cfg | 1 + ds.h| 2 ++ gPTP.cfg| 1 + port.c

[Linuxptp-devel] [PATCHv3 5/6] linreg: use sample weight.

2015-03-26 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- linreg.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/linreg.c b/linreg.c index 3f7fe9a..8f354f4 100644 --- a/linreg.c +++ b/linreg.c @@ -42,6 +42,7 @@ struct point

[Linuxptp-devel] [PATCHv3 0/6] Improve accuracy with software timestamping

2015-03-26 Thread Miroslav Lichvar
that will be made) will be 10 times smaller. Miroslav Lichvar (6): Convert and correct time stamps early. Refactor time stamp processing. tsproc: add raw and weighting modes. servo: add support for weighted samples. linreg: use sample weight. pi: use sample weight. clock.c

[Linuxptp-devel] [PATCHv3 6/6] pi: use sample weight.

2015-03-26 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- pi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pi.c b/pi.c index 9c7b148..e0116fe 100644 --- a/pi.c +++ b/pi.c @@ -137,8 +137,8 @@ static double pi_sample(struct servo *servo, break

[Linuxptp-devel] [PATCHv3 4/6] servo: add support for weighted samples.

2015-03-26 Thread Miroslav Lichvar
Add weight parameter to the sample function. Samples with smaller weight are less reliable, they can be ignored by the servo or the adjustments of the clock can be smaller. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 6 +++--- linreg.c| 1 + ntpshm.c

[Linuxptp-devel] [PATCHv3 2/6] Refactor time stamp processing.

2015-03-26 Thread Miroslav Lichvar
Introduce a time stamp processor for offset/delay calculations and use it in the clock and port modules. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- clock.c | 100 ++- clock.h | 5 +- makefile | 2 +- port.c | 39 --- tsproc.c

[Linuxptp-devel] [PATCH] timemaster: kill processes by PID instead of process group.

2015-05-14 Thread Miroslav Lichvar
Instead of killing the whole process group, which may contain other processes than timemaster and its children (e.g. when it is started from a shell script), save the PIDs and kill the processes individually. Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- timemaster.c | 36

Re: [Linuxptp-devel] [PATCH RFC 2/4] Add an option to inhibit frequency adjustment.

2015-05-27 Thread Miroslav Lichvar
On Tue, May 26, 2015 at 08:35:50PM +0200, Richard Cochran wrote: On Tue, May 26, 2015 at 11:23:48AM +0200, Miroslav Lichvar wrote: I'm not familiar with SyncE. What does this mean for the PHC device? The frequency is automatically corrected by the driver or the device itself

Re: [Linuxptp-devel] [PATCH RFC 1/4] Allow the measured path delay to be zero.

2015-05-27 Thread Miroslav Lichvar
using PTP/SyncE! Useful? Maybe not, but it is still cool anyways. A similar feature with non-SyncE PTP could be measuring temperature of the environment from the frequency offset of the clock :). -- Miroslav Lichvar

Re: [Linuxptp-devel] [PATCH RFC 2/4] Add an option to inhibit frequency adjustment.

2015-05-27 Thread Miroslav Lichvar
On Wed, May 27, 2015 at 02:34:22PM +0200, Richard Cochran wrote: On Wed, May 27, 2015 at 01:53:12PM +0200, Miroslav Lichvar wrote: Ok. So what is the new option supposed to do? Reduce the noise in the offset? An easy way to do that I think would be to reduce the PI constants. Really

Re: [Linuxptp-devel] [PATCH RFC 2/4] Add an option to inhibit frequency adjustment.

2015-05-28 Thread Miroslav Lichvar
On Wed, May 27, 2015 at 07:37:39PM +0200, Richard Cochran wrote: On Wed, May 27, 2015 at 03:05:14PM +0200, Miroslav Lichvar wrote: Is it not possible that the offset will change when there is some restart or reconfiguration in the PTP network? Yes, but any phase offset that suddenly

Re: [Linuxptp-devel] [PATCH RFC 2/4] Add an option to inhibit frequency adjustment.

2015-05-28 Thread Miroslav Lichvar
On Thu, May 28, 2015 at 03:01:19PM +0200, Richard Cochran wrote: On Thu, May 28, 2015 at 08:24:59AM +0200, Miroslav Lichvar wrote: Hm, so the offset normally stays at zero or is it stepping on each update? It always stays zero. Non-zero offsets only appear in error conditions, like

Re: [Linuxptp-devel] [PATCH RFC 2/4] Add an option to inhibit frequency adjustment.

2015-05-26 Thread Miroslav Lichvar
when the threshold is reached? I'm wondering if this could be done as a servo option or a completely new servo. -- Miroslav Lichvar -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest out

Re: [Linuxptp-devel] [PATCH RFC 1/4] Allow the measured path delay to be zero.

2015-05-26 Thread Miroslav Lichvar
with tsproc that bug is gone. I used to hit it in my simulator occasionally, but didn't thought it was possible with real hw. -- Miroslav Lichvar -- One dashboard for servers and applications across Physical-Virtual-Cloud Widest

Re: [Linuxptp-devel] [PATCH] Add options to configure TTL/hop limit for UDP/UDP6 transports.

2015-08-04 Thread Miroslav Lichvar
On Mon, Aug 03, 2015 at 10:02:06PM +0200, Richard Cochran wrote: On Mon, Aug 03, 2015 at 03:49:43PM +0200, Miroslav Lichvar wrote: +unsigned char udp_ttl = 1; ... This would be better it it were a per-port option, no? Definitely. That's actually how I originally wanted it, but when I saw

Re: [Linuxptp-devel] unknown option ntpshm_segment at line 8 in eno1 section

2015-08-05 Thread Miroslav Lichvar
ptp4l -l 5 -f /var/run/timemaster/ptp4l.2.conf -S -i ens5 ptp4l -l 5 -f /var/run/timemaster/ptp4l.3.conf -S -i eno1 -- Miroslav Lichvar -- ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] unknown option ntpshm_segment at line 8 in eno1 section

2015-08-03 Thread Miroslav Lichvar
. -- Miroslav Lichvar -- ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH] Add options to configure TTL/hop limit for UDP/UDP6 transports.

2015-08-03 Thread Miroslav Lichvar
Signed-off-by: Miroslav Lichvar mlich...@redhat.com --- config.c| 12 config.h| 2 ++ default.cfg | 2 ++ ptp4l.8 | 10 ++ ptp4l.c | 3 +++ udp.c | 7 +++ udp.h | 5 + udp6.c | 6 ++ udp6.h | 5 + 9 files changed

Re: [Linuxptp-devel] [PATCH RFC v2 0/2] Servo for use with SyncE

2015-07-27 Thread Miroslav Lichvar
. Thanks, -- Miroslav Lichvar -- ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] Hybrid 1-step / 2-step P2P systems and ptp4l

2015-11-09 Thread Miroslav Lichvar
On Mon, Nov 09, 2015 at 01:16:19PM +0100, Richard Cochran wrote: > On Mon, Nov 09, 2015 at 12:24:11PM +0100, Miroslav Lichvar wrote: > > > > Hm, I'm not sure I follow. Which of the four timestamps are allowed to > > be zero and how it's related to the one-step mod

Re: [Linuxptp-devel] [PATCH RFC V5 00/83] New configuration implementation

2015-08-28 Thread Miroslav Lichvar
reports no errors. Thanks, -- Miroslav Lichvar -- ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp

[Linuxptp-devel] [PATCH 1/3] util: add wrappers for memory allocation functions.

2015-08-28 Thread Miroslav Lichvar
Add wrappers for malloc(), calloc(), realloc() and strdup() that check if the allocation failed, print an error message and call exit(1). This allows the caller to use the returned value without checking for errors. --- util.c | 52 util.h | 37

[Linuxptp-devel] [PATCH 0/3] Terminate timemaster when memory allocation fails

2015-08-28 Thread Miroslav Lichvar
As per the discussion on linuxptp-users, this is a set that tries to fix the unhandled errors in memory allocation in timemaster. Miroslav Lichvar (3): util: add wrappers for memory allocation functions. util: exit in string_* and parray_* functions when allocation fails. timemaster: use

[Linuxptp-devel] [PATCH 2/3] util: exit in string_* and parray_* functions when allocation fails.

2015-08-28 Thread Miroslav Lichvar
--- util.c | 27 +-- util.h | 30 ++ 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/util.c b/util.c index 284657b..e7245d6 100644 --- a/util.c +++ b/util.c @@ -426,8 +426,10 @@ char *string_newf(const char *format, ...)

[Linuxptp-devel] [PATCH RFC 1/2] util: add function for rate limiting.

2015-09-07 Thread Miroslav Lichvar
--- util.c | 14 ++ util.h | 18 ++ 2 files changed, 32 insertions(+) diff --git a/util.c b/util.c index 6bbbe91..e10cedc 100644 --- a/util.c +++ b/util.c @@ -512,3 +512,17 @@ void parray_extend(void ***a, ...) va_end(ap); (*a)[len - 1] = NULL; } +

[Linuxptp-devel] [PATCH RFC 2/2] port: print bogus delay request message as rate limited info.

2015-09-07 Thread Miroslav Lichvar
Upgrade the message level to info so the user can see it, but print it at most once per 5 minutes to not spam the syslog. --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index 9c804cf..527cd6b 100644 --- a/port.c +++ b/port.c @@ -1688,8 +1688,8

[Linuxptp-devel] [PATCHv2 3/3] port: print bogus delay request message as rate limited info.

2015-09-10 Thread Miroslav Lichvar
Upgrade the message level to info so the user can see it, but print it at most once per 5 minutes to not spam the syslog too much. Signed-off-by: Miroslav Lichvar <mlich...@redhat.com> --- port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c

[Linuxptp-devel] ptp4l and bonding

2016-03-19 Thread Miroslav Lichvar
interface, send and receive packets, and synchronize the clock. I didn't have a chance to try it with multiple interfaces and other bonding modes. Does anyone know if it would work? Thoughts? -- Miroslav Lichvar -- Transform

Re: [Linuxptp-devel] An update to or a new PI(D) servo?

2016-04-08 Thread Miroslav Lichvar
could converge faster as it would predict the future offset. I'm not sure if it would be as fast as the multi-stage servo you propose. In any case, extending the configuration of the

Re: [Linuxptp-devel] ptp4l and bonding

2016-03-22 Thread Miroslav Lichvar
On Thu, Mar 17, 2016 at 06:20:44PM +0100, Miroslav Lichvar wrote: > FWIW, in a test I did with a single bonded interface and the L2 transport > ptp4l was able to bind to the slave interface, send and receive > packets, and synchronize the clock. I didn't have a chance to try it > w

Re: [Linuxptp-devel] [PATCH] tsproc: Fix time stamp handling with P2P one shot mode.

2016-04-01 Thread Miroslav Lichvar
hould say tsproc_update_offset() ? > clock_synchronize(), and so a slave clock will never leave the > "uncalibrated" state. > > This patch fixes the issue by removing the test for a non-zero 't4' > field within the tsproc. > > Signed-off-by: Richard Cochran <richardcoch...@gmai

Re: [Linuxptp-devel] An update to or a new PI(D) servo?

2016-03-29 Thread Miroslav Lichvar
to the current servo? Also, linuxptp already has an adaptive servo, linreg. Have you tried it? -- Miroslav Lichvar -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics

Re: [Linuxptp-devel] phc2sys timestamp filtering

2017-02-15 Thread Miroslav Lichvar
e PHC accurate to few milliseconds and stable to hundreds of nanoseconds, assuming the PHC is in a reasonably stable temperature. -- Miroslav Lichvar -- Check out the vibrant tech community on one of the world's most en

Re: [Linuxptp-devel] PTP supported profiles.

2017-02-17 Thread Miroslav Lichvar
On Fri, Feb 17, 2017 at 11:00:30AM +0100, Richard Cochran wrote: > On Fri, Feb 17, 2017 at 10:27:34AM +0100, Miroslav Lichvar wrote: > > Do you think it would be worth adding support for the hybrid > > multicast/unicast mode, where only delay request and response are > > unic

Re: [Linuxptp-devel] phc2sys timestamp filtering

2017-02-17 Thread Miroslav Lichvar
lastest ntpd version (4.2.8), it's faster. Running ntpdate before ntpd may help. -- Miroslav Lichvar -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.or

  1   2   3   4   5   >