[Linuxptp-devel] [PATCH RFC v3 18/69] config: convert 'use_syslog' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 8 +--- config.h | 2 -- ptp4l.c | 6 ++ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/config.c b/config.c index 143d9db..90d7659 100644 --- a/config.c +++ b/config.c @@ -99,6 +99,7 @@ struct

[Linuxptp-devel] [PATCH RFC v3 65/69] config: convert 'tsproc_mode' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 3 ++- config.c | 35 ++- config.h | 1 - ds.h | 1 - port.c | 2 +- ptp4l.c | 1 - 6 files changed, 13 insertions(+), 30 deletions(-) diff --git a/clock.c b/clock.c index d0298f4

[Linuxptp-devel] [PATCH RFC v3 10/69] config: convert 'tx_timestamp_timeout' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 7 +-- config.h | 1 - ptp4l.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/config.c b/config.c index 871e277..ad398c1 100644 --- a/config.c +++ b/config.c @@ -78,6 +78,7 @@ struct config_item

[Linuxptp-devel] [PATCH RFC v3 52/69] config: convert 'timeSource' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 2 +- config.c | 7 +-- ds.h | 1 - ptp4l.c | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/clock.c b/clock.c index ee20a3c..ab048f5 100644 --- a/clock.c +++ b/clock.c @@ -830,7 +830,7 @@ struct

[Linuxptp-devel] [PATCH RFC v3 02/69] clock: add a method to obtain the configuration.

2015-08-16 Thread Richard Cochran
This function allows the ports to read configuration variables without changing the port method signatures. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 5 + clock.h | 7 +++ 2 files changed, 12 insertions(+) diff --git a/clock.c b/clock.c index 1569108..a47e1e9

[Linuxptp-devel] [PATCH RFC v3 48/69] config: convert 'gmCapable' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 2 +- config.c | 7 +-- ds.h | 1 - ptp4l.c | 5 ++--- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/clock.c b/clock.c index 8c20d64..f31ae42 100644 --- a/clock.c +++ b/clock.c @@ -826,7 +826,7

[Linuxptp-devel] [PATCH RFC v3 53/69] config: convert the fault interval options to the new scheme.

2015-08-16 Thread Richard Cochran
This conversion is not straightforward due to the fact that these options can take a value of ASAP or a number. We check for the special ASAP case in a helper function and leave the numbers to the generic code. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 66

[Linuxptp-devel] [PATCH RFC v3 45/69] config: port: convert 'delay_filter_length' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 6 -- config.c | 14 +- config.h | 1 - ds.h | 1 - port.c | 2 +- ptp4l.c | 1 - 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/clock.c b/clock.c index 0856f81..73cf016 100644

[Linuxptp-devel] [PATCH RFC v3 69/69] ptp4l: set print levels earlier.

2015-08-16 Thread Richard Cochran
Now we have debug messages in the configuration code. Therefore set up the print levels immediately after parsing the command line and the file, so that those messages have a chance to be seen. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- ptp4l.c | 10 +- 1 file changed

[Linuxptp-devel] [PATCH RFC v3 61/69] config: convert 'domainNumber' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 12 ++-- ptp4l.c | 5 ++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/config.c b/config.c index afb3879..3f4014c 100644 --- a/config.c +++ b/config.c @@ -99,6 +99,7 @@ struct config_item

[Linuxptp-devel] [PATCH RFC v3 64/69] config: convert 'delay_mechanism' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 33 + config.h | 4 port.c | 2 +- ptp4l.c | 14 ++ 4 files changed, 16 insertions(+), 37 deletions(-) diff --git a/config.c b/config.c index 66d6954..3fce7d2 100644

[Linuxptp-devel] [PATCH RFC v3 54/69] config: remove the 'port_defaults' structure.

2015-08-16 Thread Richard Cochran
This definition is now empty and can serve no purpose any more. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 3 --- config.h | 2 -- ds.h | 3 --- port.c | 2 -- 4 files changed, 10 deletions(-) diff --git a/config.c b/config.c index ee91a40..e1eac73 100644

[Linuxptp-devel] [PATCH RFC v3 68/69] config: convert 'clock_servo' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 3 ++- clock.h | 3 +-- config.c | 21 + config.h | 2 -- ptp4l.c | 7 ++- 5 files changed, 14 insertions(+), 22 deletions(-) diff --git a/clock.c b/clock.c index 112d0a2..320a84c 100644

[Linuxptp-devel] [PATCH RFC v3 67/69] config: convert 'time_stamping' to the new scheme.

2015-08-16 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 3 ++- clock.h | 2 -- config.c | 22 +- config.h | 6 -- ptp4l.c | 29 + 5 files changed, 24 insertions(+), 38 deletions(-) diff --git a/clock.c b/clock.c index

Re: [Linuxptp-devel] [PATCH RFC v3 00/69] New configuration implementation

2015-08-17 Thread Richard Cochran
On Mon, Aug 17, 2015 at 06:53:35AM +, Keller, Jacob E wrote: You converted the PI options, but I can't figure exactly how they were read. There doesn't appear to be any calls to config_get_int or config_get_dbl for them in their respective patches. You are right, Jake. I forgot the

Re: [Linuxptp-devel] [PATCH RFC v3 00/69] New configuration implementation

2015-08-17 Thread Richard Cochran
On Mon, Aug 17, 2015 at 04:15:59PM +, Keller, Jacob E wrote: Where is the linuxptp-testsuite hosted? https://github.com/mlichvar/linuxptp-testsuite.git You also need: https://github.com/mlichvar/clknetsim.git Cheers, Richard

Re: [Linuxptp-devel] discrepancy between ptp4l output and oscilloscope readings on Beaglebone Black

2015-07-29 Thread Richard Cochran
On Wed, Jul 29, 2015 at 05:28:12PM +0200, Juan Solano wrote: Oops! time to ditch the BBB then. I have written a PPS generator driver through GPIO: https://github.com/jsln/pps-gen-gpio Right, so the jitter you are seeing is mostly due to latencies in the OS. You can improve this a bit by

Re: [Linuxptp-devel] discrepancy between ptp4l output and oscilloscope readings on Beaglebone Black

2015-07-29 Thread Richard Cochran
On Wed, Jul 29, 2015 at 10:08:47AM -0700, Chris Healy wrote: The Freescale MX6 based Sabre boards are inexpensive and have good PTP support now, don't they? IIRC, recently there was some changes made to support the HW 1588 block in the MAC that allows the HW to drive a 1588 output pin

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

2015-08-01 Thread Richard Cochran
Gary, The configuration file scheme can't do what you want it to do, even without the ntpshm_segment option. This [global] uds_address /var/run/ptp4l clock_servo ntpshm [eno1] ntpshm_segment 0 [eno2] ntpshm_segment 1 is the same as entering

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

2015-08-02 Thread Richard Cochran
On Sun, Aug 02, 2015 at 02:58:34AM +, Gary E. Miller wrote: Yeah, but then both instances try to grab ports 319 and 320. I tried putting one instance on UDPv4 and one UDPv6, but the UDPv6 seems to also grab the UDPv4 port. You can run two instances, each on its own port, using Layer2

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

2015-08-03 Thread Richard Cochran
I have no problem with adding these options. On Mon, Aug 03, 2015 at 03:49:43PM +0200, Miroslav Lichvar wrote: +unsigned char udp_ttl = 1; ... + if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_TTL, udp_ttl, +sizeof(udp_ttl))) { + pr_err(setsockopt

Re: [Linuxptp-devel] discrepancy between ptp4l output and oscilloscope readings on Beaglebone Black

2015-07-29 Thread Richard Cochran
On Wed, Jul 29, 2015 at 02:46:34PM +0200, Juan Solano wrote: I am learning about PTP and doing tests on 2 Beaglebone Blacks running a recent stable linux (v3.18.16) with disabled dynamic ticks. They support hardware timestamping and I have synchronized the system clocks to the PHC. My logs

Re: [Linuxptp-devel] [PATCH RFC v1 9/9] udp: configure the socket with the TTL option.

2015-08-11 Thread Richard Cochran
On Mon, Aug 10, 2015 at 11:13:00PM +0200, Richard Cochran wrote: @@ -151,8 +157,16 @@ static int udp_open(struct transport *t, const char *name, struct fdarray *fda, enum timestamp_type ts_type) { struct udp *udp = container_of(t, struct udp, t); + struct

Re: [Linuxptp-devel] ptp can't recovery when unplug the cable and plug in after a while

2015-08-11 Thread Richard Cochran
On Tue, Aug 11, 2015 at 11:43:01AM +0800, Arnold kang wrote: when I test linuxptp. I unplug the cable and plug in after a while, the ptp can't recovery. and precision stay bad. any one know why? What driver and HW are you using? Some of the Intel drivers reset the NIC time when the link

Re: [Linuxptp-devel] ptp can't recovery when unplug the cable and plug in after a while

2015-08-11 Thread Richard Cochran
On Tue, Aug 11, 2015 at 03:35:26PM +0800, Arnold kang wrote: Dear Richard, thanks for your reply.I'm using AR8031, and hardware timestamp mode . OS version: 3.0 That HW is not present in mainline Linux, and so I cannot help you with it. Probably it is buggy. Also, from the ptp4l

Re: [Linuxptp-devel] ptp can't recovery when unplug the cable and plug in after a while

2015-08-11 Thread Richard Cochran
On Tue, Aug 11, 2015 at 05:52:41PM +0800, Arnold kang wrote: I know why, when the cable unplugged , the rtc in phy still run as list freq set. so after some seconds, the phy is slower or faster than master . when cable plug in, after a very lone time to adjfreq, the ptp will sync. but how

Re: [Linuxptp-devel] [PATCH RFC v2 00/16] New configuration implementation

2015-08-14 Thread Richard Cochran
On Thu, Aug 13, 2015 at 11:13:17PM +, Keller, Jacob E wrote: Ok. What I meant was that we today have per-port via: [enp2s0f0] options which indicates a port, and not a section. Maybe we should change this to be: [port:enp2s0f0] or something in the oddball case where someone uses

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

2015-08-10 Thread Richard Cochran
On Mon, Aug 10, 2015 at 02:34:58PM +0200, Jiri Benc wrote: Whether or not ptp4l should set IPV6_V6ONLY unconditionally needs some more thinking, but my first impression is it would need to use IPv4 multicast addresses (v4-mapped to IPv6) to send the packets to the v4 hosts and not the IPv6

Re: [Linuxptp-devel] [PATCH] Force IPv6 to IPV6 only, no ipv4 to ipv6 mapping.

2015-08-10 Thread Richard Cochran
Gary, On Mon, Aug 10, 2015 at 12:14:56PM -0700, Gary E. Miller wrote: By default, at least on Linux, opening a PF_INET6 socket also grabs the matching IPv4 port. This patch stops that. Can you please post once again, adding your Signed-off-by: tag? Also, a word about why this is needed

[Linuxptp-devel] [PATCH RFC v1 4/9] transport: store the configuration in the transport data structure.

2015-08-10 Thread Richard Cochran
This will allow modules to read out various user options. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- pmc_common.c| 2 +- port.c | 2 +- transport.c | 7 +-- transport.h | 6 +- transport_private.h | 1 + 5 files changed, 13 insertions

[Linuxptp-devel] [PATCH RFC v1 0/9] New configuration implementation

2015-08-10 Thread Richard Cochran
can be converted to the new system. Once this is done, the config code will be much more compact and maintainable. Review and comments are most welcome. Thanks, Richard Richard Cochran (9): clock: store the configuration in the clock data structure. clock: add a method to obtain

[Linuxptp-devel] [PATCH RFC v1 7/9] config: introduce a new API for reading configuration settings.

2015-08-10 Thread Richard Cochran
to call 'config_init', and so this patch add that into all three programs, ptp4l, phc2sys and pmc. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 22 ++ config.h | 28 makefile | 10 +- phc2sys.c | 3 +++ pmc.c

[Linuxptp-devel] [PATCH RFC v1 1/9] clock: store the configuration in the clock data structure.

2015-08-10 Thread Richard Cochran
This will help us to simplify the passing of parameters between the main program, clock, and ports. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 9 ++--- clock.h | 8 +--- ptp4l.c | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/clock.c b

[Linuxptp-devel] [PATCH RFC v1 2/9] clock: add a method to obtain the configuration.

2015-08-10 Thread Richard Cochran
This function allows the ports to read configuration variables without changing the port method signatures. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 5 + clock.h | 7 +++ 2 files changed, 12 insertions(+) diff --git a/clock.c b/clock.c index 1569108..a47e1e9

[Linuxptp-devel] [PATCH RFC v1 3/9] pmc: require a configuration for creating a PMC instance.

2015-08-10 Thread Richard Cochran
In the near future, the transports will need to consult the configuration database in order to obtain various options. This patch also introduces the idea of a configuration file into the phc2sys and pmc programs. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- phc2sys.c| 10

[Linuxptp-devel] [PATCH RFC v1 8/9] config: add an option for specifying the UDP TTL.

2015-08-10 Thread Richard Cochran
This patch also introduces the generic code for adding and parsing new options. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 121 +++ 1 file changed, 115 insertions(+), 6 deletions(-) diff --git a/config.c b

[Linuxptp-devel] [PATCH RFC v1 5/9] Introduce a simple hash table implementation.

2015-08-10 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- hash.c | 113 +++ hash.h | 59 + makefile | 2 +- 3 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 hash.c create

[Linuxptp-devel] [PATCH RFC v1 6/9] config: Add a hash table into the data structure.

2015-08-10 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 11 +++ config.h | 4 2 files changed, 15 insertions(+) diff --git a/config.c b/config.c index 934caa2..9ef8be1 100644 --- a/config.c +++ b/config.c @@ -24,6 +24,7 @@ #include string.h #include config.h

[Linuxptp-devel] [PATCH RFC v2 16/16] config: convert the 'max_frequency' option to the new scheme.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 7 +-- config.h | 2 -- ptp4l.c | 2 -- servo.c | 4 ++-- servo.h | 6 -- 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/config.c b/config.c index 08c89a0..f2ce71e 100644 --- a/config.c +++ b

[Linuxptp-devel] [PATCH RFC v2 10/16] config: convert 'tx_timestamp_timeout' to the new scheme.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 7 +-- config.h | 1 - ptp4l.c | 3 ++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/config.c b/config.c index 7cb503d..ce3378a 100644 --- a/config.c +++ b/config.c @@ -80,6 +80,7 @@ struct config_item

[Linuxptp-devel] [PATCH RFC v2 08/16] udp: configure the socket with the TTL option.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- udp.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/udp.c b/udp.c index b100dbf..b8aa76a 100644 --- a/udp.c +++ b/udp.c @@ -30,6 +30,7 @@ #include unistd.h #include address.h +#include config.h

[Linuxptp-devel] [PATCH RFC v2 12/16] servo: store the configuration in the servo data structure.

2015-08-12 Thread Richard Cochran
This will allow removing the code that passes configuration options via global variables. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 4 ++-- phc2sys.c | 3 ++- servo.c | 3 ++- servo.h | 5 - 4 files changed, 10 insertions(+), 5 deletions(-) diff --git

[Linuxptp-devel] [PATCH RFC v2 00/16] New configuration implementation

2015-08-12 Thread Richard Cochran
and 14-16 convert some legacy options. Patch 13 adds a way to lock options from the command line. Review and comments are most welcome. Thanks, Richard Richard Cochran (16): clock: store the configuration in the clock data structure. clock: add a method to obtain the configuration. pmc

[Linuxptp-devel] [PATCH RFC v2 07/16] config: introduce a new API for reading configuration settings.

2015-08-12 Thread Richard Cochran
an option for specifying the UDP TTL. Users are required to call 'config_init', and so this patch add that into all three programs, ptp4l, phc2sys and pmc. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 260

[Linuxptp-devel] [PATCH RFC v2 11/16] config: convert the 'check_fup_sync' option to the new scheme.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 7 +-- config.h | 2 -- ptp4l.c | 4 +--- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/config.c b/config.c index ce3378a..9a240d7 100644 --- a/config.c +++ b/config.c @@ -80,6 +80,7 @@ struct

[Linuxptp-devel] [PATCH RFC v2 06/16] config: Add a hash table into the data structure.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 11 +++ config.h | 4 2 files changed, 15 insertions(+) diff --git a/config.c b/config.c index 934caa2..9ef8be1 100644 --- a/config.c +++ b/config.c @@ -24,6 +24,7 @@ #include string.h #include config.h

[Linuxptp-devel] [PATCH RFC v2 14/16] config: convert the 'step_threshold' option to the new scheme.

2015-08-12 Thread Richard Cochran
Signed-off-by: Richard Cochran richardcoch...@gmail.com --- config.c | 21 +++-- config.h | 1 - phc2sys.c | 9 ++--- ptp4l.c | 1 - servo.c | 4 +++- servo.h | 9 - 6 files changed, 24 insertions(+), 21 deletions(-) diff --git a/config.c b/config.c index

[Linuxptp-devel] [PATCH RFC v2 01/16] clock: store the configuration in the clock data structure.

2015-08-12 Thread Richard Cochran
This will help us to simplify the passing of parameters between the main program. clock, and ports. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- clock.c | 9 ++--- clock.h | 8 +--- ptp4l.c | 3 ++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/clock.c b

[Linuxptp-devel] [PATCH RFC v2 03/16] pmc: require a configuration for creating a PMC instance.

2015-08-12 Thread Richard Cochran
In the near future, the transports will need to consult the configuration database in order to obtain various options. This patch also introduces the idea of a configuration file into the phc2sys and pmc programs. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- phc2sys.c| 10

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

2015-07-24 Thread Richard Cochran
On Thu, May 28, 2015 at 03:46:51PM +0200, Miroslav Lichvar wrote: 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

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

2015-07-24 Thread Richard Cochran
These patches add a new servo type that keep the frequency adjustment always zero. This is useful in a Synchronous Ethernet network, where a slave clock will use this servo together with 'freq_noadj 1' and 'step_threshold 0.1' in the configuration. Richard Cochran (2): Add a servo

[Linuxptp-devel] [PATCH RFC v2 1/2] Add a servo that inhibits all frequency adjustment

2015-07-24 Thread Richard Cochran
When running with Synchronous Ethernet (SyncE), the correct clock frequency is provided by the link partner. In this case, only the offset needs correcting. This patch provides SyncE nodes with an way to keep the frequency correction dialed to zero. Signed-off-by: Richard Cochran richardcoch

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

2015-07-24 Thread Richard Cochran
On Fri, Jul 24, 2015 at 10:35:08PM +0200, Richard Cochran wrote: These patches add a new servo type that keep the frequency adjustment always zero. This is useful in a Synchronous Ethernet network, where a slave clock will use this servo together with 'freq_noadj 1

Re: [Linuxptp-devel] Peer delay regression in v1.6

2015-10-23 Thread Richard Cochran
> The math in the tsproc code was supposed to be identical to the code > it replaced. t2 and t3 in tsproc are local times. The mapping between > the port and tsproc timestamps is (t1, t2, t3, t4) -> (t3, t4, t1, t2). Oh, tricky! Now I vaguely recall that from the original review. > Maybe it

[Linuxptp-devel] Peer delay regression in v1.6

2015-10-22 Thread Richard Cochran
We figure the neighbor rate ratio in port_nrate_calculate(): delta t3 / delta t4 = peer_interval / local_interval Originally the peer delay was figured like this: pd = tmv_sub(tmv_sub(t4, t1), tmv_sub(t3, t2)); Since t4-t1 are local, and t3-t2 are from the peer, there will

Re: [Linuxptp-devel] EtherCAT and max frequency shift

2015-11-09 Thread Richard Cochran
On Mon, Nov 09, 2015 at 08:57:14AM -0600, Bassam Alsanie wrote: > > etherCAT has its own software stack over the physical layer (mostly at the > data link layer), and I was wondering if I enabled the etherCAT on my > device, can the linuxptp run over etherCAT software stack? PTP is either

Re: [Linuxptp-devel] EtherCAT and max frequency shift

2015-11-09 Thread Richard Cochran
On Mon, Nov 09, 2015 at 07:29:02AM -0600, Bassam Alsanie wrote: > I have couple of questions. > > Can linuxptp and etherCAT coexist? Define "coexist". > Regards the maximum frequency shift the clock can support, I have a case > that my custom ptp clock has maximum of 1000 ppm possible tune

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 02:37:53PM -0600, Bassam Alsanie wrote: > I will be going over the PHC APIs and some of the kernel PHC modules to get > deeper understand. > Just to let you know why my questions seem little bit weird. I am working > on developing a user mode framework for to accessing the

Re: [Linuxptp-devel] Frequency offset computation

2015-11-12 Thread Richard Cochran
On Thu, Nov 12, 2015 at 10:15:04AM -0600, Bassam Alsanie wrote: > and my custom clock I can compute the frequency shift as the following: > > __u16 fraction = ((__u64) tx.freq & 0x); > __u16 integer = (__u64) tx.freq >> 16; > __u64 requestedPpb = (integer * 1000) + fraction; > >

Re: [Linuxptp-devel] Small typo in manpage of ptp4l

2015-11-01 Thread Richard Cochran
On Sun, Nov 01, 2015 at 07:17:29PM +0100, Wolfgang Wallner wrote: > Hi all, > > see the attached patch, there is a parenthesis to much in the manpage of > ptp4l. > > regards, Wolfgang Applied. Next time, please put the patch in line, not as an attachment. Thanks, Richard

Re: [Linuxptp-devel] Question: LinuxPTP cannot be convergent after ethernet cable hot-plug

2015-11-05 Thread Richard Cochran
On Thu, Nov 05, 2015 at 10:30:24AM +, Duan Andy wrote: > Thanks for your response. Set 'step_threhold' can workaround the > issue even if ifconfig eth0 down/up. The driver after link down and > interface down will reset the MAC that cause ptp timer register > reset to zero, so after link up,

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

2015-11-07 Thread Richard Cochran
On Fri, Nov 06, 2015 at 07:44:02PM -0800, Andrew Symington wrote: ... > On closer examination of the packets using wireshark I noticed that the > RSG2488 was modifying the correction field of the Sync message rather than > the Follow_Up message. This is okay, since both correction fields are

Re: [Linuxptp-devel] Offset Filters

2015-11-04 Thread Richard Cochran
On Wed, Nov 04, 2015 at 01:46:52PM +, Shlomi Tubul wrote: > For some reason, I see spikes at clients, which are > unreasonable. Most of the time the offset is around +- 200ns, > but from time to time it jumps to more than 20 micro second. You shouldn't have such spikes. >

Re: [Linuxptp-devel] Custom PHC driver example

2015-10-30 Thread Richard Cochran
On Fri, Oct 30, 2015 at 11:33:28AM -0500, Bassam Alsanie wrote: > Is there any code example shows how to write PHC custom clock? See Documentation/ptp/ptp.txt in the Linux source tree. There are plenty of examples in the kernel. From the README.org:

Re: [Linuxptp-devel] Trying to use ptp4l

2015-11-05 Thread Richard Cochran
On Thu, Nov 05, 2015 at 05:42:48PM -0600, Bassam Alsanie wrote: > I am I missing something here? No packets are getting through. Check your firewall rules. Thanks, Richard --

Re: [Linuxptp-devel] Question: LinuxPTP cannot be convergent after ethernet cable hot-plug

2015-11-04 Thread Richard Cochran
On Wed, Nov 04, 2015 at 08:50:03AM +, Duan Andy wrote: > I found there have one issue while running LinuxPTP stack (1.5/1.6, > all versions) on i.MX6/7x platform. The issue is PTP cannot be > convergent after PTP slave Ethernet cable plug-out and then > plug-in. Of course, networking works

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

2015-08-28 Thread Richard Cochran
On Fri, Aug 28, 2015 at 03:36:23PM +0200, Miroslav Lichvar wrote: The new code looks good to me. I did some testing and I see no problems. ptp4l/phc2sys/pmc work as expected, valgrind reports no errors. Ok, I'll go ahead push this series out. (Then, you can add that UDPv6 option you had

[Linuxptp-devel] [PATCH RFC v1 3/4] Use the standardized low level socket address format.

2015-08-29 Thread Richard Cochran
-by: Richard Cochran richardcoch...@gmail.com --- address.h | 2 ++ raw.c | 9 + sk.c | 6 -- udp.c | 2 +- udp6.c| 2 +- util.c| 12 ++-- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/address.h b/address.h index b780387..7578f91 100644

[Linuxptp-devel] [PATCH RFC v1 2/4] udp6: set the destination port unconditionally.

2015-08-29 Thread Richard Cochran
Even if the caller provides the destination address, still the port must depend on the passed 'event' value for correct delivery. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- udp6.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/udp6.c b/udp6.c index

Re: [Linuxptp-devel] [PATCH v2 03/27] Allow sending to a specified (unicast) address

2015-08-25 Thread Richard Cochran
On Mon, Aug 24, 2015 at 06:17:46PM +, Duncan wrote: I don't know why you don't implement this, Why? Because I don't have unlimited time to work on ptp4l for free. Thanks, Rihcard --

Re: [Linuxptp-devel] [PATCH] udp6: set hop limit with udp_ttl option.

2015-08-31 Thread Richard Cochran
On Mon, Aug 31, 2015 at 02:02:46PM +0200, Miroslav Lichvar wrote: > Use the udp_ttl option to configure both IPv4 and IPv6 transports. > > Signed-off-by: Miroslav Lichvar > --- > default.cfg | 1 + > ptp4l.8 | 7 +++ > udp6.c | 14 ++ > 3 files

Re: [Linuxptp-devel] [PATCH RFC 2/2] port: constrain the master's logMinDelayReqInterval.

2015-09-04 Thread Richard Cochran
On Fri, Sep 04, 2015 at 11:20:25AM +0200, Miroslav Lichvar wrote: > Would it make sense to make it a warning message so the user can see > it and maybe think about reporting it to the vendor? To not spam the > syslog there could be a rate limit. Yeah, but we need rate limit support in the

[Linuxptp-devel] Planning release 1.6

2015-09-05 Thread Richard Cochran
Dear linuxptp users and developers, Soon it will be time, once again, for a release. We have two shiny new features, the tsproc and the hybrid mode. The tsproc code has been in git for a while, but I only just pushed out the hybrid mode today. I would like to release version 1.6 in about two

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

2015-09-11 Thread Richard Cochran
On Thu, Sep 10, 2015 at 11:49:28AM +0200, Miroslav Lichvar wrote: > 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 Series applied. Thanks, Richard

Re: [Linuxptp-devel] [PATCH] Update UTC offset

2015-09-17 Thread Richard Cochran
On Thu, Sep 17, 2015 at 12:04:28PM +0200, Libor Pechacek wrote: > The difference between Coordinated Universal Time UTC and the International > Atomic Time TAI is : > > from 2015 July 1, 0h UTC, until further notice : UTC-TAI = -36 s > > https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat >

[Linuxptp-devel] [announce] version 1.6 released

2015-09-19 Thread Richard Cochran
ttl option. util: add function for simple rate limiting. print: add rate limited versions of pr_* macros. port: print bogus delay request message as rate limited info. Richard Cochran (96): clock: support management SET of the priority attributes. pmc: support setting th

Re: [Linuxptp-devel] [announce] version 1.6 released

2015-09-22 Thread Richard Cochran
On Tue, Sep 22, 2015 at 04:42:31PM +, Keller, Jacob E wrote: > Thanks richard. I don't see the v1.6 tag.. Oops. Sorry. It should be there now. Thanks, Richard -- ___

[Linuxptp-devel] [PATCH RFC 1/2] Fix integer overflow in the foreign master bookkeeping code.

2015-08-28 Thread Richard Cochran
. This patch fixes the issue by adding thresholds for the bogus extremes. Signed-off-by: Richard Cochran richardcoch...@gmail.com --- port.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/port.c b/port.c index 3984b78..ef2686d 100644 --- a/port.c +++ b/port.c @@ -163,10

[Linuxptp-devel] [PATCH RFC 0/2] delay request interval fixes

2015-08-28 Thread Richard Cochran
checking, in order to handle wacky foreign masters. Richard Cochran (2): Fix integer overflow in the foreign master bookkeeping code. port: constrain the master's logMinDelayReqInterval. port.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) -- 2.1.4

Re: [Linuxptp-devel] Devel Roadmap

2015-12-16 Thread Richard Cochran
On Wed, Dec 16, 2015 at 04:27:50PM +, Shuval Polacheck wrote: > Can someone please share the development roadmap or point out where I can > learn about it. There is no road map, really. I next big feature that I want to add is Transparent Clock support, but I cannot say when I might start

Re: [Linuxptp-devel] Boundary clock operation on multiple interface with software timestamping

2016-01-03 Thread Richard Cochran
On Thu, Dec 10, 2015 at 04:45:05PM +, Dennis Kong wrote: > a) My linux system time was off by a few hours when I introduced a > PTP device with a better clock (class and priority1/2). The BM > algorithm does select the other PTP device as the grandmaster, > changes that interface port state

Re: [Linuxptp-devel] [PATCH] tsproc: allow zero remote timestamps in delay update

2015-11-20 Thread Richard Cochran
On Wed, Nov 18, 2015 at 02:23:20PM +0100, Miroslav Lichvar wrote: > When remote timestamps from P2P delay measurement are not known (the > remote processing time is saved in the correction field), they are set > to zero. Fix tsproc to not require non-zero t1 and t4. > > Signed-off-by: Miroslav

[Linuxptp-devel] [PATCH RFC 4/7] Perform the time stamping mode check in the clock module.

2016-04-09 Thread Richard Cochran
Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 31 +++ ptp4l.c | 34 +- 2 files changed, 32 insertions(+), 33 deletions(-) diff --git a/clock.c b/clock.c index ab238fb..d18cab0 100644 --- a/clock.c +++ b/c

[Linuxptp-devel] [PATCH RFC 5/7] config: count the interfaces as they are added.

2016-04-09 Thread Richard Cochran
This information is useful to the various clock types. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- config.c | 2 ++ config.h | 1 + 2 files changed, 3 insertions(+) diff --git a/config.c b/config.c index 7bb3b05..80fa255 100644 --- a/config.c +++ b/config.c @@ -607,6

[Linuxptp-devel] [PATCH RFC 7/7] Let the clock code figure the PHC index.

2016-04-09 Thread Richard Cochran
The code that determines the index of the PHC device is useful to all kinds of clock devices. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 30 ++ clock.h | 6 +++--- ptp4l.c | 31 ++- 3 files chang

[Linuxptp-devel] [PATCH RFC 6/6] clock: remove redundant parameter from the create method.

2016-04-03 Thread Richard Cochran
There is no need for the 'ifaces' parameter since the list of network interfaces is already present in the configuration. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 7 +++ clock.h | 4 +--- ptp4l.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-)

[Linuxptp-devel] [PATCH RFC 0/6] Prepare for TC, Batch I

2016-04-03 Thread Richard Cochran
belongs in the clock instance. Two more similar patches are coming in Batch II. Patch 6 simplifies the clock_create() interface even more. Review and comments are welcome. Thanks, Richard Richard Cochran (6): Properly initialize the message lists. fault: protect header against multiple

[Linuxptp-devel] [PATCH RFC 3/6] print: add missing include directive.

2016-04-03 Thread Richard Cochran
This patch adds a #include needed for the declaration of the function, rate_limited. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- print.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/print.h b/print.h index 6d7aa94..e8f2c8e 100644 --- a/print.h +++ b/print.h @@

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

2016-03-31 Thread Richard Cochran
g the test for a non-zero 't4' field within the tsproc. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- tsproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsproc.c b/tsproc.c index 7e14b24..cf5f0dc 100644 --- a/tsproc.c +++ b/tsproc.c @@ -164

Re: [Linuxptp-devel] [PATCH 2/2] Add config option to set the IPv4 Multicast TTL

2016-04-01 Thread Richard Cochran
On Thu, Mar 31, 2016 at 11:00:58AM -0500, Shawn Bohrer wrote: > From: Shawn Bohrer > > Signed-off-by: Shawn Bohrer > --- > config.c| 6 ++ > config.h| 1 + > default.cfg | 1 + > ptp4l.8 | 4 > ptp4l.c | 2 ++ > udp.c

Re: [Linuxptp-devel] [PATCH 1/2] Detect and report missing delay response packets

2016-04-01 Thread Richard Cochran
On Thu, Mar 31, 2016 at 11:00:57AM -0500, Shawn Bohrer wrote: > From: Shawn Bohrer > > When we send a delay request message check to see if we received a delay > response to the previous delay request. This adds reporting of missing > responses and also reports if the

Re: [Linuxptp-devel] [PATCH RFC 7/7] Let the clock code figure the PHC index.

2016-04-15 Thread Richard Cochran
On Mon, Apr 11, 2016 at 05:31:49PM +, Keller, Jacob E wrote: > Would this make more logical sense as a separate function here? Yes, it might look cleaner in a helper function, but that would be a follow on patch. I prefer not to change blocks of code when moving them, since it makes harder

Re: [Linuxptp-devel] [PATCH]Recognize PTP port link status

2016-07-29 Thread Richard Cochran
On Thu, Jul 28, 2016 at 10:14:18AM +, Jesuiter, Henry (ALC NetworX GmbH) wrote: > So yes we would like that feature to be added (on one or the other > way). Ok, I'll post a RFC series soon, and we can work from there. Thanks, Richard

[Linuxptp-devel] [PATCH RFC 7/7] clock: Monitor the link status using a RT netlink socket.

2016-07-31 Thread Richard Cochran
Poll for link up/down events. When a link goes down, the port becomes faulty until the link goes up again. Because the netlink notifications race with our existing fault detection, we keep the fault timer from before, but a downed link prevents clear the fault. Signed-off-by: Richard Cochran

[Linuxptp-devel] [PATCH RFC 6/7] port: Provide methods to set and get the link status.

2016-07-31 Thread Richard Cochran
Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- port.c | 13 + port.h | 14 ++ 2 files changed, 27 insertions(+) diff --git a/port.c b/port.c index 9f07cea..666fed0 100644 --- a/port.c +++ b/port.c @@ -117,6 +117,7 @@ struct port {

[Linuxptp-devel] [PATCH RFC 3/7] clock: Remove stray semicolon.

2016-07-31 Thread Richard Cochran
Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 0107ef2..aaff688 100644 --- a/clock.c +++ b/clock.c @@ -314,7 +314,7 @@ static void clock_freq_est_reset(struct clock *c)

[Linuxptp-devel] [PATCH RFC 2/7] sk: Add a method to obtain a socket for utility purposes.

2016-07-31 Thread Richard Cochran
The clock module will want to know the interface indexes, in order to implement link monitoring. However, the clock does not open any sockets directly. This helper function lets us keep the clock module free of socket level code. Signed-off-by: Richard Cochran <richardcoch...@gmail.

Re: [Linuxptp-devel] [PATCH RFC 1/1] Introduce options to set DSCP values in PTP messages.

2016-07-12 Thread Richard Cochran
On Tue, Jul 12, 2016 at 11:52:48AM +, Jesuiter, Henry (ALC NetworX GmbH) wrote: > In the last years there are several media streaming standards > evolving that are relying on PTP. These standards make requirements > about the DSCP priority of PTP messages. This patch introduces two > new

Re: [Linuxptp-devel] Planning release 1.7

2016-07-12 Thread Richard Cochran
On Tue, Jul 12, 2016 at 12:14:47PM +, Jesuiter, Henry (ALC NetworX GmbH) wrote: > Hello, > > as a bug fix release, it may be useful if you consider my patch from last > Friday ([PATCH] Fix data type for return value of vasprintf()), > regarding the the data type issue in util.c. > >

Re: [Linuxptp-devel] transportSpecific field

2016-07-20 Thread Richard Cochran
On Wed, Jul 20, 2016 at 10:03:52AM +, Jesuiter, Henry (ALC NetworX GmbH) wrote: > according to IEEE 1588-2008 Annex D.4 it is possible to set the > transport specific bit to signal that PTP event (and Announce) > messages have to be padded. Now we are discussing here, if that > consequently

<    1   2   3   4   5   6   7   8   9   10   >