Re: [Linuxptp-devel] Setting asCapable with pmc

2021-09-07 Thread Richard Cochran
On Tue, Sep 07, 2021 at 04:46:56PM +0200, Miroslav Lichvar wrote: > I was trying some tests with the pmc SET command and I noticed that > for PORT_DATA_SET_NP it parses the asCapable argument, but ptp4l > ignores the value. The neighborPropDelayThresh value is accepted. Is > this intentional?

Re: [Linuxptp-devel] [PATCH 2/2] Delay Response Timeout Feature addition for PTP4L

2021-08-20 Thread Richard Cochran
On Wed, Aug 18, 2021 at 03:31:13PM +, Karthikkumar V via Linuxptp-devel wrote: > This code changes brings in the ability to program delay response timeout > within which, if the upstream master does not send a valid delay response > within the configurable delay response timeout duration,

Re: [Linuxptp-devel] [PATCH] Only forward responses to UDS port with corresponding requests on the UDS port, and always send with a unique sequence count from uds.

2021-08-19 Thread Richard Cochran
On Wed, Aug 18, 2021 at 05:25:53PM +, Eric Decker wrote: > So the proper fix would be to ensure the ptp4l's write() is non blocking. > EDecker: I wonder if that approach would have unexpected consequences. No, it would not. ptp4l should never block because of issues at the other end of the

Re: [Linuxptp-devel] [PATCH] Only forward responses to UDS port with corresponding requests on the UDS port, and always send with a unique sequence count from uds.

2021-08-19 Thread Richard Cochran
On Thu, Aug 19, 2021 at 02:32:49PM +, Eric Decker wrote: > I can see now how to use interactive mode. I suggest considering > documenting this in the manpages and the help for pmc. Some > examples in the manpages would be helpful. I agree. Any patches with documentation improvements will

Re: [Linuxptp-devel] process ID size in the pmc tool

2021-08-18 Thread Richard Cochran
On Tue, Aug 17, 2021 at 05:42:41PM +, Geva, Erez wrote: > In pmc_create(...) > > if (transport_type == TRANS_UDS) { > pmc->port_identity.portNumber = getpid(); > > When portNumber is UInteger16 > > However in new Linux systems, I notice that

Re: [Linuxptp-devel] [PATCH] Only forward responses to UDS port with corresponding requests on the UDS port, and always send with a unique sequence count from uds.

2021-08-18 Thread Richard Cochran
On Mon, Aug 16, 2021 at 03:38:21PM +, Eric Decker wrote: > Subject: [PATCH] Only forward responses to UDS port with corresponding > requests on the UDS port, and always send management with a unique sequence > count from uds. The subject line should be ONE sentence, please. > > 1.

Re: [Linuxptp-devel] ptp4l getting blocked while writing log message

2021-08-14 Thread Richard Cochran
On Sat, Aug 14, 2021 at 06:18:25PM +, ramesh t via Linuxptp-devel wrote: > hi, > > Debugging a ptp4l issue, observed its getting blocked while writing into > /var/log/messages file. Blocking of ptp4l can vary from few minutes to > forever. That is too bad. Your system is seriously FUBAR.

Re: [Linuxptp-devel] [RFC] ptp4l: improved-accuracy hook

2021-08-07 Thread Richard Cochran
On Tue, Aug 03, 2021 at 02:31:25PM +0300, Aya Levin via Linuxptp-devel wrote: > I would like to push an infra structure hook to the ptp4l. This hook allows > vendors to estimate the HW time-stamp closer to the actual transmission and > reach better accuracy. The hook will receive the HW

Re: [Linuxptp-devel] [RFC] ptp4l: improved-accuracy hook

2021-08-05 Thread Richard Cochran
On Thu, Aug 05, 2021 at 06:40:35AM -0700, Richard Cochran wrote: > Of course you are welcome to hack it into ptp4l for your research. And once you have the AI algorithm perfected, simply code the result into the device driver as Jacob suggested. Thanks, Rich

Re: [Linuxptp-devel] [RFC] ptp4l: improved-accuracy hook

2021-08-05 Thread Richard Cochran
On Thu, Aug 05, 2021 at 10:50:40AM +0300, Aya Levin wrote: > These AI algorithms frequently tuned and improve over time, hence we don't > think they belong in the driver. Implementing them here allows immediate and > frequent updates of the logic without the heavy operation of driver upgrade.

Re: [Linuxptp-devel] [v2] lstab: update expiration to 28 December 2021

2021-08-04 Thread Richard Cochran
On Mon, Jul 26, 2021 at 05:58:08PM +0800, Yangbo Lu wrote: > Bring the built in leap second table up to date through IERS Bulletin C62. > No new leap seconds have been scheduled for this year. > > Signed-off-by: Yangbo Lu Applied. Thanks, Richard

Re: [Linuxptp-devel] [PATCH] lstab: Close file after reading.

2021-08-04 Thread Richard Cochran
On Tue, Jul 20, 2021 at 11:48:56AM +0200, Miroslav Lichvar wrote: > The lstab_read() function opens a file, but doesn't close it after use. > > Signed-off-by: Miroslav Lichvar Applied. Thanks, Richard ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] [PATCH] Fix quoting in ptp4l man page.

2021-08-04 Thread Richard Cochran
On Mon, Jul 19, 2021 at 05:22:57PM +0200, Miroslav Lichvar wrote: > In the groff syntax lines starting with a dot or quote are requests. A > line in the servo_offset_threshold description starts with a quote, > which breaks the output. Move a word to the beginning of the line to fix > it. > >

Re: [Linuxptp-devel] [PATCH] config: Add workaround for glibc getopt_long().

2021-08-04 Thread Richard Cochran
On Tue, Jul 13, 2021 at 10:31:16AM +0200, Miroslav Lichvar wrote: > getopt_long() in glibc allows shortened long option names, e.g. > ptp4l --domain works as --domainNumber. When the match is ambiguous, > e.g. --fault matches --fault_badpeernet_interval and > --fault_reset_interval, it is supposed

Re: [Linuxptp-devel] [PATCH v3 0/5] Fixes for sanity clock check

2021-08-04 Thread Richard Cochran
On Mon, May 31, 2021 at 11:07:51AM +0200, Miroslav Lichvar wrote: > v3 > - added patch to avoid slow renewal of raw sockets > - added patch to increase the minimum check interval > > v2 > - improved commit message > - added missing NULL check > > These patches make the clock check more reliable

Re: [Linuxptp-devel] [RFC] ptp4l: improved-accuracy hook

2021-08-03 Thread Richard Cochran
On Tue, Aug 03, 2021 at 02:31:25PM +0300, Aya Levin via Linuxptp-devel wrote: > PTP accuracy is increased when the HW time-stamp is taken as close to the > network wire as possible. In an effort to improve the time-stamp accuracy, > we consider extending the ptp4l. I would like to receive your

Re: [Linuxptp-devel] [Linuxptp-users] Need input on clockclass handling

2021-08-03 Thread Richard Cochran
On Tue, Aug 03, 2021 at 12:47:08PM +, ramesh t via Linuxptp-users wrote: > Please suggest, if this is supported or not. Your question doesn't make sense to me. The BC implementation operates exactly as described in the 1588 standard. What more do you need to know? Thanks, Richard

[Linuxptp-devel] [PATCH] Rename management ID macros.

2021-08-01 Thread Richard Cochran
The management ID macros are prefixed with TLV. This is confusing, because the true TLV tags have the same prefix. Make the code more readable by using an appropriate prefix the for management IDs. Signed-off-by: Richard Cochran --- clock.c | 130

Re: [Linuxptp-devel] [PATCH 4/4] ts2phc: Add serial baudrate option

2021-07-19 Thread Richard Cochran
On Mon, Jul 19, 2021 at 11:00:40AM +, Geva, Erez wrote: > This looks like a call to send the a patch with these options. > > Richard, How do you think these options should be implemented? > A single enumerator, separate integer for each? Whichever is easier. Maybe a single code like 8n1

Re: [Linuxptp-devel] [PATCHv2 RFC 0/6] Support for dropping root privileges

2021-07-18 Thread Richard Cochran
On Tue, Jul 13, 2021 at 05:08:36PM +0200, Miroslav Lichvar wrote: > In the v1 discussion there was a suggestion to not use libcap. I have > not looked into that yet, but I can try it if this whole thing makes > sense otherwise. IIRC, after V1, I looked at avoiding libcap, but I came to the

Re: [Linuxptp-devel] FW: [PATCH] Always send with a unique sequence count from uds. Only forward responses to UDS port with corresponding requests on the UDS port.

2021-07-18 Thread Richard Cochran
On Sat, Jul 03, 2021 at 03:59:24AM +, Eric Decker wrote: > Subject: [PATCH] Always send with a unique sequence count from uds. Only > forward responses to UDS port with corresponding requests on the UDS port. Please format the commit with: 1. A brief, one sentence subject line. 2. A commit

Re: [Linuxptp-devel] [PATCH] config: Add workaround for glibc getopt_long().

2021-07-18 Thread Richard Cochran
On Tue, Jul 13, 2021 at 10:31:16AM +0200, Miroslav Lichvar wrote: > getopt_long() in glibc allows shortened long option names, e.g. > ptp4l --domain works as --domainNumber. When the match is ambiguous, > e.g. --fault matches --fault_badpeernet_interval and > --fault_reset_interval, it is supposed

Re: [Linuxptp-devel] [PATCH v2] Increase the default tx_timestamp_timeout to 10

2021-07-18 Thread Richard Cochran
On Thu, Jul 08, 2021 at 12:59:30PM -0700, Jacob Keller wrote: > The tx_timestamp_timeout configuration defines the number of > milliseconds to wait for a Tx timestamp from the kernel stack. This > delay is necessary as Tx timestamps are captured after a packet is sent > and reported back via the

Re: [Linuxptp-devel] [PATCH] lstab: update expiration to 28 December 2021

2021-07-18 Thread Richard Cochran
On Tue, Jun 29, 2021 at 11:47:21AM +0800, Yangbo Lu wrote: > Bring the built in leap second table up to date through IERS Bulletin C59. The bulletin is C62, not C59. See: https://datacenter.iers.org/data/html/bulletinc-062.html Thanks, Richard

Re: [Linuxptp-devel] [PATCH 4/4] ts2phc: Add serial baudrate option

2021-07-18 Thread Richard Cochran
On Sun, Jul 18, 2021 at 07:09:54PM -0700, Richard Cochran wrote: > Otherwise, the patch is fine. I'll fix the order myself. Also, I set a minimum of 300. Thanks, Richard ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net ht

Re: [Linuxptp-devel] [PATCH 4/4] ts2phc: Add serial baudrate option

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 10:16:02AM -0700, Hal Murray wrote: > > > I did think of that, yet of the many serial devices I have used they have > > all > > been running with the setting 8/N/1 and no HW flow control. > > The HP Z3801A is 19200 baud, 7 data bits, odd parity Looks like it is

Re: [Linuxptp-devel] [PATCH 4/4] ts2phc: Add serial baudrate option

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 01:33:44PM +0200, Lars Munch wrote: > Add serial baudrate configuration option. Default to 9600 bps. > > Signed-off-by: Lars Munch > --- > config.c | 1 + > ts2phc.8 | 23 --- > ts2phc_nmea_master.c | 10 +- > 3 files

Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 01:33:42PM +0200, Lars Munch wrote: > Read returns 0 (the traditional "end-of-file" return) when a remote > peer performs an orderly shutdown. Hence, ts2phc needs to close the > socket and try to establish a new connection. > > Signed-off-by: Lars Munch Applied. Thanks,

Re: [Linuxptp-devel] [PATCH 3/4] ts2phc: Update leapfile documentation

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 01:33:43PM +0200, Lars Munch wrote: > Update leapfile documentation to note the file will be > reloaded if modified. > > Signed-off-by: Lars Munch Applied. Thanks, Richard ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] [PATCH 1/4] ts2phc: Fix uninitialized variable in nmea_scan_rmc

2021-07-18 Thread Richard Cochran
On Fri, May 14, 2021 at 01:33:41PM +0200, Lars Munch wrote: > tm_isdst needs to be initialized to make sure mktime does not fail > on recent versions of glibc > > See: > https://bugzilla.redhat.com/show_bug.cgi?id=1653340 > https://sourceware.org/bugzilla/show_bug.cgi?id=24630 > > Signed-off-by:

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-14 Thread Richard Cochran
On Wed, Jul 14, 2021 at 11:20:00AM +, Keller, Jacob E wrote: > I think for Tx the challenges are higher: the timestamp is taken > after we've filled in the descriptor and sent the frame. The only > place it could reasonably be stored again is the descriptor > writeback (since we don't get

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-14 Thread Richard Cochran
On Wed, Jul 14, 2021 at 11:20:23AM +, Keller, Jacob E wrote: > What about at least checking for the case where a timestamp was never > started? Drivers are supposed to set a flag in the SKB when they start a > timestamp (and not set it if they can't start it). How could that happen? Putting

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-12 Thread Richard Cochran
On Mon, Jul 12, 2021 at 03:02:50PM +, Keller, Jacob E wrote: > Right. Though.. running something like ptp4l on the same connection > could be problematic if the applications aren't working together > because most hardware supports a single request at once, I wouldn't say "most". Surely some

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-12 Thread Richard Cochran
On Mon, Jul 12, 2021 at 05:02:58PM -0700, Vinicius Costa Gomes wrote: > Speaking of future improvements, wouldn't it be easier if the > kernel/driver was able to notify userspace that a timestamping request > wasn't able to be serviced? It would fall to the drivers to implement that correctly. I

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-08 Thread Richard Cochran
On Thu, Jul 08, 2021 at 07:15:17PM +, Machnikowski, Maciej wrote: > Can it be a half of the packet rate? No! > Or there is any reason to make a specific tighter > limit to it? See the discussion of the effect of computational delay on stability in John Eidson's "Measurement, Control, and

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-08 Thread Richard Cochran
On Thu, Jul 08, 2021 at 01:10:08PM +0200, Miroslav Lichvar wrote: > On Thu, Jul 08, 2021 at 01:37:38AM +, Eric Decker wrote: > > If the timestamp is available in less than the timeout (5ms) will it still > > wait for the timeout, or continue processing after the timestamp is > > received? >

Re: [Linuxptp-devel] [PATCH] Increase the default tx_timestamp_timeout to 5

2021-07-07 Thread Richard Cochran
On Wed, Jul 07, 2021 at 05:02:21PM -0700, Jacob Keller wrote: > diff --git a/config.c b/config.c > index 4472d3d9d6f9..f33f177c696a 100644 > --- a/config.c > +++ b/config.c > @@ -323,7 +323,7 @@ struct config_item config_tab[] = { > GLOB_ITEM_INT("ts2phc.pulsewidth", 5, 100,

Re: [Linuxptp-devel] tx_timestamp_timeout default

2021-07-07 Thread Richard Cochran
On Wed, Jul 07, 2021 at 11:46:16PM +, Keller, Jacob E wrote: > Either way, I found that whether I used a kthread or not I was > unable to avoid the timeout issue with ice hardware because the > delay is caused by the method we must use to access the Tx > timestamps :( We get into the kthread

Re: [Linuxptp-devel] tx_timestamp_timeout default

2021-07-07 Thread Richard Cochran
On Wed, Jul 07, 2021 at 10:22:59PM +, Keller, Jacob E wrote: > I am wondering if there would be support for either (a) increasing > the default timeout, or (b) adding something to the PTP get > capabilities for indicating a sort of default timeout for the > device, and if it's not set in the

Re: [Linuxptp-devel] Support in Annex P of IEEE 1588-2019 - linuxptp

2021-07-06 Thread Richard Cochran
On Sun, Jul 04, 2021 at 08:45:05AM +, Ariel Almog wrote: > We are mostly interested in Annex P implementation and in particular > authentication TLV in high priority and ipsec. > > Can you share some information on current status, demand, and future plans? I took a close look at the new

[Linuxptp-devel] linuxptp: Fixes published for CVE-2021-3570 and CVE-2021-3571

2021-07-05 Thread Richard Cochran
Dear list, Now that the embargo period has expired, I published fixes for: CVE-2021-3570 linuxptp: missing length check of forwarded messages CVE-2021-3571 linuxptp: wrong length of one-step follow-up in transparent clock The fixes have been published to SourceForge and to GitHub:

Re: [Linuxptp-devel] [PATCH 0/2] gPTP profile interoperability problems

2021-06-21 Thread Richard Cochran
On Mon, Jun 14, 2021 at 12:03:45PM +, Miklas, Marcin via Linuxptp-devel wrote: > gPTP requires that PTP_TIMESCALE flag is set in messages. I noticed that > PDelayReq, PDelayResp, PDelayRespFollowUp, Sync, FollowUp and Signaling all > have > that flag set to 0. One of the bridges just

Re: [Linuxptp-devel] Intel 210 to Intel 255

2021-06-07 Thread Richard Cochran
On Mon, Jun 07, 2021 at 02:01:28PM +, Geva, Erez wrote: > Jun 7 15:44:07 ipc01 ptp4l: [673.869] timed out while polling for tx > timestamp > Jun 7 15:44:07 ipc01 ptp4l: [673.869] increasing tx_timestamp_timeout may > correct this issue, but it is likely caused by a driver bug Try

Re: [Linuxptp-devel] [PATCH v2 3/3] port: Don't check timestamps from non-slave ports.

2021-05-28 Thread Richard Cochran
On Fri, May 28, 2021 at 09:26:07AM +, Amar Subramanyam via Linuxptp-devel wrote: > We could see that ptp4l already has RTNL functionality and hence this > port_renew_transport() seems to be unnecessary redundancy. The link notifications from the kernel are best effort and are not

Re: [Linuxptp-devel] [PATCH 2/2] Log optimization for ptp4l in jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-27 Thread Richard Cochran
On Wed, May 26, 2021 at 12:24:07PM +0300, Amar Subramanyam via Linuxptp-devel wrote: > The port other than SLAVE (LISTENING port) prints an error > "port 1: master state recommended in slave only mode > ptp4l[1205469.356]: port 1: defaultDS.priority1 probably misconfigured" > for every ANNOUNCE

Re: [Linuxptp-devel] [PATCH 1/2] Log optimization for ptp4l in jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-27 Thread Richard Cochran
On Wed, May 26, 2021 at 12:24:06PM +0300, Amar Subramanyam via Linuxptp-devel wrote: > The LISTENING port prints continuously > "selected best master clock 00..03 > updating UTC offset to 37" > > We limited the log such that now it prints only when there is a > change in the

Re: [Linuxptp-devel] [PATCH] Add new CLOCK_STATS_NP TLV GET to pmc and clock

2021-05-27 Thread Richard Cochran
On Tue, May 25, 2021 at 08:28:34PM +, Tim Martin wrote: > Currently there is no way to programmatically access statistics about > the clock frequency offset, time delay, or time offset (collectively, > the "clock_stats" metrics), except for parsing the ptp4l logs. One > option for time offset

Re: [Linuxptp-devel] [PATCH v3 1/1] Add master only management TLV

2021-05-25 Thread Richard Cochran
On Mon, May 24, 2021 at 01:24:10AM +0200, Erez Geva wrote: > - Add support in the pmc tool > - Add the TLV in port module. > > Signed-off-by: Erez Geva Applied. Thanks, Richard ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net

Re: [Linuxptp-devel] [PATCH 1/2] Log optimization for ptp4l in jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-24 Thread Richard Cochran
On Mon, May 24, 2021 at 11:24:47AM +0200, Miroslav Lichvar wrote: > Is there something else that is not already covered by the > clock_update_time_properties() call from port.c? Let's see... void clock_update_time_properties(struct clock *c, struct timePropertiesDS tds) {

Re: [Linuxptp-devel] [PATCH v2 1/1] Add master only management TLV

2021-05-23 Thread Richard Cochran
On Mon, Apr 26, 2021 at 11:18:21AM +0200, Erez Geva wrote: > diff --git a/pmc_common.c b/pmc_common.c > index c5cd992..2ab32d4 100644 > --- a/pmc_common.c > +++ b/pmc_common.c > @@ -106,6 +106,7 @@ struct management_id idtab[] = { > { "ALTERNATE_TIME_OFFSET_PROPERTIES", >

Re: [Linuxptp-devel] [PATCH v4] Rework twoStepFlag in order to handle one step on port basis.

2021-05-23 Thread Richard Cochran
On Thu, Apr 22, 2021 at 09:18:33AM +0200, Luigi 'Comio' Mantellini wrote: > With this patch we introduce the twoStepFlag evaluation at port level. This isn't going to work. The two step flag is an element of a clock, not port, data set. 8.2.1.2.1 defaultDS.twoStepFlag The value of

Re: [Linuxptp-devel] [PATCH] Set domainNumber for telecom examples

2021-05-23 Thread Richard Cochran
On Wed, Apr 21, 2021 at 07:41:48PM +0200, Lars Munch wrote: > Set the default domain numbers according to the ITU-T standards > > Signed-off-by: Lars Munch Applied. Thanks, Richard ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] [PATCH] Handle step_window at port level.

2021-05-23 Thread Richard Cochran
On Sun, May 23, 2021 at 09:31:39AM -0700, Richard Cochran wrote: > On Mon, Apr 19, 2021 at 06:11:34PM +0200, Luigi 'Comio' Mantellini wrote: > > From: Luigi Mantellini > > > > The step_window functionality should be defined at the port level because > > we cannot assum

Re: [Linuxptp-devel] [PATCH] Handle step_window at port level.

2021-05-23 Thread Richard Cochran
On Mon, Apr 19, 2021 at 06:11:34PM +0200, Luigi 'Comio' Mantellini wrote: > From: Luigi Mantellini > > The step_window functionality should be defined at the port level because > we cannot assume that different ports have the same sync message rate. > --- > clock.c| 13 + >

Re: [Linuxptp-devel] [PATCH 1/2] Log optimization for ptp4l in jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-23 Thread Richard Cochran
On Sat, May 22, 2021 at 05:09:07PM +0300, Amar Subramanyam via Linuxptp-devel wrote: > The LISTENING port prints continuously > "selected best master clock 00..03 > updating UTC offset to 37" > > We limited the log such that now it prints only when there is a > change in the

Re: [Linuxptp-devel] gpsd support in ts2phc

2021-05-14 Thread Richard Cochran
On Thu, May 13, 2021 at 07:31:27PM +0200, Lars Munch wrote: > On Sat, May 8, 2021 at 8:47 PM Richard Cochran > wrote: > > > > On Sat, May 08, 2021 at 02:57:30PM +0200, Lars Munch wrote: > > > > > 1. Use the time provided by gpsd to ntpshm. This

Re: [Linuxptp-devel] [PATCH] Sync issues observed when ptp4l is ran with jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-12 Thread Richard Cochran
On Wed, May 12, 2021 at 10:28:34AM +0200, Miroslav Lichvar wrote: > I think the fix should be one of the following: > - disable clock check in jbod mode (it cannot work reliably as it is) > - limit the check to timestamps from the synchronized port This sounds like the best choice to me. > -

Re: [Linuxptp-devel] [PATCH] Sync issues observed when ptp4l is ran with jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-12 Thread Richard Cochran
On Wed, May 12, 2021 at 10:57:24AM +, Amar Subramanyam wrote: > Should we rate limit log (a) as it will be printed whenever BMCA is triggered > and avoid log (b) when boundary_clock_jbod=1 and clientOnly=1 Sounds reasonable to me. Thanks, Richard

Re: [Linuxptp-devel] [PATCH] Sync issues observed when ptp4l is ran with jbod and client only mode (clientOnly=1 and boundary_clock_jbod=1)

2021-05-11 Thread Richard Cochran
On Tue, May 11, 2021 at 02:16:04PM +, Amar Subramanyam via Linuxptp-devel wrote: > What happens here exactly is, due to the continuous triggering of > BMCA, the value of mono_interval (the interval between two > successive calls of clock_check_sample ()) gets increased and > SYNCRONIZATION

Re: [Linuxptp-devel] gpsd support in ts2phc

2021-05-08 Thread Richard Cochran
On Sat, May 08, 2021 at 02:57:30PM +0200, Lars Munch wrote: > 1. Use the time provided by gpsd to ntpshm. This can be implemented without > dependencies to gpsd. Doesn't sound aweful, but not great either. > 2. Use libgpsd to get the time, but that adds a dependency to gpsd No, I won't use

Re: [Linuxptp-devel] Announce message generates SDE on MasterOnly port

2021-05-04 Thread Richard Cochran
On Tue, May 04, 2021 at 02:24:07PM +0200, Luigi 'Comio' Mantellini wrote: > As side note, In my testing scenario the master-only ports receive > announce messages and when the slave port loses the signal the node > evolves in grand-master flooding the log with "assuming the grand > master role"

Re: [Linuxptp-devel] Announce message generates SDE on MasterOnly port

2021-05-04 Thread Richard Cochran
On Mon, May 03, 2021 at 06:52:02PM +0200, Luigi 'Comio' Mantellini wrote: > I noticed that the Announce messages received on MasterOnly ports > generate a SDE condition in bc_event(). and so what? What is the problem? > I think that we can return > EV_NONE when the port is a master_only (or we

Re: [Linuxptp-devel] Port down and sde

2021-05-04 Thread Richard Cochran
On Mon, May 03, 2021 at 06:45:56PM +0200, Luigi 'Comio' Mantellini wrote: > /* > * A port going down can affect the BMCA result. > * Force a state decision event. > */ > if (p->link_status & LINK_DOWN) > clock_set_sde(p->clock, 1); > > I think that should be removed Why? What problem does it

Re: [Linuxptp-devel] Planning release 3.2

2021-05-04 Thread Richard Cochran
On Mon, May 03, 2021 at 05:09:09PM +0200, Michael Walle wrote: > did I miss something or wasn't there a 3.2 release? You didn't miss anything. I have been delayed in pushing out the 3.2 release. Sorry, Richard ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] [Linuxptp-users] phc2sys jump into huge value

2021-04-29 Thread Richard Cochran
On Thu, Apr 29, 2021 at 03:04:07PM +, ramesh t via Linuxptp-users wrote: > Did time profiling using time ticks. Under the problem condition, > observing clock_gettime of interface connected to BC is taking more > time ticks. This results in phc offset jumping to 4 digit value > momentarily.

Re: [Linuxptp-devel] [PATCH] To support Ordinary Clock-Subordinate/Slave just a bunch of devices(jbod) feature.

2021-04-27 Thread Richard Cochran
On Tue, Apr 27, 2021 at 03:59:05PM +, Ramana Reddy wrote: > As I said, running independent clients defeats the purpose of BMC > algorithm and breaks the ITU-T G.8275.2 > Spec compliance. The BMC algorithm should be run locally on all ports of > every ordinary and boundary clock in a

Re: [Linuxptp-devel] [PATCH] To support Ordinary Clock-Subordinate/Slave just a bunch of devices(jbod) feature.

2021-04-27 Thread Richard Cochran
On Tue, Apr 27, 2021 at 05:28:46PM +0200, Miroslav Lichvar wrote: > An advantage of having multiple independent clients is that you can > better detect failures in synchronization and avoid corrupting the > other clocks. Right. You can query the ptp4l instances (for example via pmc) and then

Re: [Linuxptp-devel] [PATCH 1/1] Add master only management TLV

2021-04-25 Thread Richard Cochran
On Thu, Apr 22, 2021 at 03:04:17PM +0200, Erez Geva wrote: > diff --git a/pmc.c b/pmc.c > index a767c8a..00d6014 100644 > --- a/pmc.c > +++ b/pmc.c > @@ -335,6 +335,11 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) > fprintf(fp, "TIMESCALE_PROPERTIES " >

Re: [Linuxptp-devel] [PATCH 0/1] Add master only management TLV

2021-04-25 Thread Richard Cochran
On Thu, Apr 22, 2021 at 09:40:46AM -0700, Jacob Keller wrote: > Most of these do sound like great features to have, but many would > require significant architecture changes. As LinuxPTP is an open source > project, you (or your customers) are free to work on such improvements > and contribute

Re: [Linuxptp-devel] [PATCH 0/1] Add master only management TLV

2021-04-22 Thread Richard Cochran
On Thu, Apr 22, 2021 at 01:35:11PM +, Geva, Erez wrote: > You need to verify the ptp4l can dynamically change the master only flag. +1 > As the 'slave only' flag does not allow set, I skip it for now. Right, and it wouldn't work if added naively. > Only priorities 1 and 2 can be changed

Re: [Linuxptp-devel] [PATCH] Fix uninitialized variable in nmea_scan_rmc

2021-04-21 Thread Richard Cochran
On Wed, Apr 21, 2021 at 07:28:59PM +0200, Lars Munch wrote: > My tests show (with recent glibc version) that with TZ=UTC mktime will > return -1 for tm_isdst=1. For tm_isdst=0 and tm_isdst=-1 mktime returns the > same value. > > IMHO, tm_isdst=0 makes the most sense for TZ=UTC as UTC does not

Re: [Linuxptp-devel] [PATCH] RFC: add port.twoStepFlag option in order to handle one step on port basis.

2021-04-21 Thread Richard Cochran
On Wed, Apr 21, 2021 at 07:16:29PM +0200, luigi.mantell...@gmail.com wrote: > Sorry I don't understand. > > Are you suggest to use twoStepFlag in this way: > > PORT_ITEM_INT("twoStepFlag", 0, 0, 1) Yes, sorry, that is what I meant. > Then ptpt.conf should look like this: > > [global] >

Re: [Linuxptp-devel] [PATCH] RFC: add port.twoStepFlag option in order to handle one step on port basis.

2021-04-21 Thread Richard Cochran
On Tue, Apr 20, 2021 at 12:35:08PM +0200, Luigi 'Comio' Mantellini wrote: > port.twoStepFlag. > > When -1, inherit the global twoStepFlag value, otherwise enable two-step mode > for sync messages on port basis. One-step mode can be used only with hardware > time stamping. The default is -1 (as

Re: [Linuxptp-devel] [PATCH] To support Ordinary Clock-Subordinate/Slave just a bunch of devices(jbod) feature.

2021-04-21 Thread Richard Cochran
On Thu, Apr 15, 2021 at 11:16:00AM +0300, Amar Subramanyam via Linuxptp-devel wrote: > This change brings slave clock jbod feature which allows ptp4l to work as a > Ordinary Subordinate/Slave clock using "just a bunch of devices" that are not > synchronized to each other but a collection of

Re: [Linuxptp-devel] [PATCH] [RFC] Add CMake support

2021-04-21 Thread Richard Cochran
On Wed, Apr 21, 2021 at 03:52:09PM +0200, Luigi 'Comio' Mantellini wrote: > I marked it as "RFC" because this patch doesn't add anything and doesn't > resolve any bugs. It is just a product of my work that I prefer to share > with all. Thanks for sharing, but I won't apply this patch, because I

Re: [Linuxptp-devel] [PATCH] Fix uninitialized variable in nmea_scan_rmc

2021-04-21 Thread Richard Cochran
On Wed, Apr 21, 2021 at 11:51:55AM +, Geva, Erez wrote: > Looks like the man page is not accurate. > Looking in > https://pubs.opengroup.org/onlinepubs/009695399/functions/mktime.html Okay, I see now, in the man page we read: The value specified in the tm_isdst field informs mktime()

Re: [Linuxptp-devel] [PATCH] Fix uninitialized variable in nmea_scan_rmc

2021-04-20 Thread Richard Cochran
On Tue, Apr 20, 2021 at 11:44:06AM +0200, Lars Munch wrote: > tm_isdst needs to be initialized to make sure mktime does not fail > or calculates the wrong time. No, take a look at the mktime(3) man page. There you will read the following. The mktime() function modifies the fields of the

Re: [Linuxptp-devel] [PATCH] This code changes brings in the ability to program the acceptable clockClass threshold beyond which device will move to holdover/free-run. Default clockClass threshold is

2021-04-17 Thread Richard Cochran
On Mon, Feb 08, 2021 at 11:34:25AM +, Karthikkumar V via Linuxptp-devel wrote: > diff --git a/clock.c b/clock.c > index a34737a..11b94f5 100644 > --- a/clock.c > +++ b/clock.c > @@ -132,6 +132,7 @@ struct clock { > struct interface *udsif; > LIST_HEAD(clock_subscribers_head,

Re: [Linuxptp-devel] [PATCH 1/1] Fix SLAVE_ONLY TLV

2021-04-17 Thread Richard Cochran
On Tue, Mar 30, 2021 at 01:26:19AM +0200, Erez Geva wrote: > According to IEEE 1588 The slave only flag in the SLAVE_ONLY TLV > is bit 0 and not bit 1 as in the DEFAULT_DATA_SET TLV. > > In pmc we can simply print the value. > According to IEEE 1588 the other bits are zero. > When pmc query old

Re: [Linuxptp-devel] SyncE support

2021-03-30 Thread Richard Cochran
On Tue, Mar 30, 2021 at 11:40:42AM -0700, Jacob Keller wrote: > On 3/22/2021 8:40 AM, Miroslav Lichvar wrote: > > FWIW, some onboard NICs supported by the e1000e driver can > > "cross-timestamp" using the Always Running Timer (ART), which should > > avoid the asymmetry of PCIe. I have not seen any

Re: [Linuxptp-devel] [PATCH 1/1] Fix SLAVE_ONLY TLV

2021-03-28 Thread Richard Cochran
On Mon, Mar 22, 2021 at 04:31:43PM +0100, Erez Geva wrote: > According to IEEE 1588 The slave only flag in the SLAVE_ONLY TLV > is bit 0 and not bit 1 as in the DEFAULT_DATA_SET TLV. > > To retain backward compatibility and as bit 1 in SLAVE_ONLY > is not used anyway. Read and set both bits

Re: [Linuxptp-devel] [PATCH 1/1] Ensure TLV_PORT_STATS_NP statistics uses little endian.

2021-03-28 Thread Richard Cochran
On Tue, Mar 23, 2021 at 11:37:39PM +0100, Erez Geva wrote: > As machine byte order may vary. > Ensure TLV_PORT_STATS_NP statistics use defined order. > > As most of us use little endian hardware and > to retain backward compatible with most of us, > we decide to use little endian for the

Re: [Linuxptp-devel] Unable to have UNCALIBRAT to SLAVE transition

2021-03-28 Thread Richard Cochran
On Wed, Mar 24, 2021 at 02:10:59PM +0100, Luigi 'Comio' Mantellini wrote: > Yes, it works for me. I am going to apply a fix. May I add this tag into the git commit to give you credit? Reported-by: Luigi 'Comio' Mantellini ___ Linuxptp-devel

Re: [Linuxptp-devel] Unable to have UNCALIBRAT to SLAVE transition

2021-03-23 Thread Richard Cochran
On Mon, Mar 15, 2021 at 12:38:58PM +0100, Luigi 'Comio' Mantellini wrote: > Inside port_synchronize() I noticed this: > > case SERVO_LOCKED: > port_dispatch(p, EV_MASTER_CLOCK_SELECTED, 0); > break; > case SERVO_LOCKED_STABLE: > message_interval_request(p, last_state, sync_interval);

Re: [Linuxptp-devel] [PATCH 1/1] Ensure TLV_PORT_STATS_NP statistics uses little endian.

2021-03-23 Thread Richard Cochran
On Mon, Mar 15, 2021 at 04:58:09PM +0100, Erez Geva wrote: > diff --git a/tlv.c b/tlv.c > index 98ef6e1..6e919e6 100644 > --- a/tlv.c > +++ b/tlv.c > @@ -324,6 +324,10 @@ static int mgt_post_recv(struct management_tlv *m, > uint16_t data_len, > psn = (struct port_stats_np

Re: [Linuxptp-devel] [PATCH] Revert "phc2sys: Expand the validation of the PPS mode."

2021-03-23 Thread Richard Cochran
On Mon, Mar 22, 2021 at 05:23:34PM +0100, Miroslav Lichvar wrote: > Allow the -s option to be used together with the -d option again. The > PHC is used in the PPS mode to fix the offset by an integer number of > seconds to get the system clock close to the PHC. > > This reverts commit

Re: [Linuxptp-devel] [PATCHv2] Avoid undefined integer operations.

2021-03-23 Thread Richard Cochran
On Mon, Mar 22, 2021 at 05:04:04PM +0100, Miroslav Lichvar wrote: > This fixes errors reported by the -fsanitize=undefined sanitizer. > > Before accepting the message interval value from a sync message, check > if it is between -10 and 22, same as required for the delay request > interval. > >

Re: [Linuxptp-devel] [PATCH] pmc: Fix printed totalCorrectionField.

2021-03-23 Thread Richard Cochran
On Mon, Mar 15, 2021 at 11:46:58AM +0100, Miroslav Lichvar wrote: > The value needs to be shifted to right to get nanoseconds. > > Signed-off-by: Miroslav Lichvar Applied. Thanks, Richard ___ Linuxptp-devel mailing list

Re: [Linuxptp-devel] Quation regarding the new 'uds_ro_address'

2021-03-23 Thread Richard Cochran
On Tue, Mar 16, 2021 at 12:38:38PM +, Geva, Erez wrote: > Can we set the read only file with a group, so we can run quaries > without root? You can change the permissions to whatever you want. > How about adding a "group" configuration for the uds_ro_address? I don't think we need yet

Re: [Linuxptp-devel] FYI: a summary scribble on my i210 SDP / PPS-in + 25 MHz ref etc sprees

2021-03-22 Thread Richard Cochran
On Mon, Mar 22, 2021 at 06:35:48PM +0100, Frantisek Rysanek wrote: > Dear everybody, > > I've posted some of my source code before, > based on Richard Cochran's synbc.c . FYI, the new ts2phc program does everything that synbc did, and more. Thanks, Richard

Re: [Linuxptp-devel] Unable to have UNCALIBRAT to SLAVE transition

2021-03-14 Thread Richard Cochran
On Sun, Mar 14, 2021 at 10:30:31AM +0100, Luigi 'Comio' Mantellini wrote: > The failures are part of the test and after the HW restoring I'm pretty > sure that the protocol waltzer is running fine. I noticed that the ptp4l > shows master offset and delay summaries. In order to have offset and

Re: [Linuxptp-devel] [PATCHv2] Avoid unaligned pointers to packed members.

2021-03-13 Thread Richard Cochran
On Wed, Mar 10, 2021 at 05:05:55PM +0100, Miroslav Lichvar wrote: > This fixes "taking address of packed member ... may result in an > unaligned pointer value [-Waddress-of-packed-member]" warnings from gcc. > > Signed-off-by: Miroslav Lichvar Applied. Thanks, Richard

Re: [Linuxptp-devel] [PATCH 2/2] Ensure TLV_PORT_STATS_NP statistics uses little endian

2021-03-13 Thread Richard Cochran
On Thu, Mar 11, 2021 at 01:02:36PM +0100, Erez Geva wrote: > @@ -469,26 +480,26 @@ static void pmc_show(struct ptp_message *msg, FILE *fp) > IFMT "tx_Signaling %" PRIu64 > IFMT "tx_Management %" PRIu64, >

Re: [Linuxptp-devel] [PATCH 1/2] Add host order to network order of 64 bits

2021-03-13 Thread Richard Cochran
On Thu, Mar 11, 2021 at 01:02:35PM +0100, Erez Geva wrote: > @@ -455,4 +456,26 @@ void parray_extend(void ***a, ...); > */ > int rate_limited(int interval, time_t *last); > > +/** > + * Swap host order to network order of 64 bits unsigned integer. > + * > + * @param val value to swap. >

Re: [Linuxptp-devel] Unable to have UNCALIBRAT to SLAVE transition

2021-03-12 Thread Richard Cochran
On Fri, Mar 12, 2021 at 10:03:39AM +0100, luigi.mantell...@gmail.com wrote: > The issue that I'm facing is the following: > - After a fault, the port lost the SLAVE role (correct) passing to > MASTER state (cortect) > - After this transition, and after restoring the working condition I'm >

Re: [Linuxptp-devel] [PATCH] port: Accept signalling messages with OpenAVnu/gPTP wildcard, too

2021-03-12 Thread Richard Cochran
On Fri, Mar 12, 2021 at 01:25:21PM +, Wischer Timo (XC-CI1/EPC1-E) wrote: > Hello Richard, > > at least for me the specification is quite confusing at this point. > > Chapter "10.5.4.1 General Signaling message specifications" of > IEEE8021AS-2011 describes > targetPortIdentity with a size

Re: [Linuxptp-devel] [PATCH 1/2] Explicit length byte order swap functions.

2021-03-10 Thread Richard Cochran
On Wed, Mar 10, 2021 at 11:17:48PM +0100, Erez Geva wrote: > Replace byte order with explicit length. > > Add function for byte order for 64 bits. > > Signed-off-by: Erez Geva > --- > clock.c | 4 +- > msg.c | 51 ++--- > nsm.c | 2 +- > port.c | 5 +- >

Re: [Linuxptp-devel] [PATCH] Avoid unaligned pointers to packed members.

2021-03-10 Thread Richard Cochran
On Wed, Mar 10, 2021 at 04:26:18PM +0100, Miroslav Lichvar wrote: > Like this? > > struct message_storage { > unsigned char reserved[MSG_HEADROOM]; > struct ptp_message msg __attribute__ ((aligned (8))); > }; Yes, assuming that makes gcc happy again. > It was meant as a

Re: [Linuxptp-devel] [PATCH] Avoid unaligned pointers to packed members.

2021-03-10 Thread Richard Cochran
On Wed, Mar 10, 2021 at 03:25:18PM +0100, Miroslav Lichvar wrote: > @@ -37,7 +38,7 @@ int assume_two_step = 0; > struct message_storage { > unsigned char reserved[MSG_HEADROOM]; > struct ptp_message msg; > -} PACKED; > +}; Is there a better way? How about dropping PACKED but adding

Re: [Linuxptp-devel] [PATCH] port: Accept signalling messages with OpenAVnu/gPTP wildcard, too

2021-03-10 Thread Richard Cochran
On Wed, Mar 10, 2021 at 09:47:18AM +0100, Timo Wischer via Linuxptp-devel wrote: > +const struct PortIdentity wildcard_pid2 = { > + .clockIdentity = { > + {0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} > + }, > + .portNumber = 0x, Where does this wildcard come from?

  1   2   3   4   5   6   7   8   9   10   >