Re: [Linuxptp-devel] [PATCH v7 1/2] pmc_agent: Add option to run callback for signaling messages

2023-12-04 Thread Maciek Machnikowski
On 04/12/2023 17:46, Richard Cochran wrote: > On Mon, Dec 04, 2023 at 08:39:47AM +0100, Maciek Machnikowski wrote: >> Hey, please take a look at these patches and merge them if there are no >> bugs in this code. > > I don't understand the need for this series. > Wh

Re: [Linuxptp-devel] [PATCH v7 1/2] pmc_agent: Add option to run callback for signaling messages

2023-12-03 Thread Maciek Machnikowski
Hey, please take a look at these patches and merge them if there are no bugs in this code. Thanks, Maciek On 10/11/2023 15:14, Maciek Machnikowski wrote: > Add option to run callback that when the PMC agent receives signaling > messages. > > v2: changed pmc_agent implementatio

Re: [Linuxptp-devel] [PATCH v2] Add support for DELAY_REQ and SYNC packets RX filters

2023-11-28 Thread Maciek Machnikowski
On 28/11/2023 14:39, Erez wrote: > > > On Tue, 28 Nov 2023 at 12:55, Miroslav Lichvar > wrote: > > On Sun, Nov 26, 2023 at 11:10:05AM -0800, Richard Cochran wrote: > > The Rx filters are applied globally at the device level, but the PTP > > operates at

[Linuxptp-devel] [PATCH v2] lstab: Update leapfile validity

2023-11-21 Thread Maciek Machnikowski
No leap seconds will happen till 28 June 2024. Update leapfile validity accordingly. Add a new source of leapsecond file from the IERS. v2: Removed obsolete links Signed-off-by: Maciek Machnikowski --- lstab.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

Re: [Linuxptp-devel] [PATCH] lstab: Update leapfile validity

2023-11-21 Thread Maciek Machnikowski
hat. Regards Maciek > > > > On Tue, 21 Nov 2023 at 09:35, Maciek Machnikowski > mailto:mac...@machnikowski.net>> wrote: > > No leap seconds will happen till 28 June 2024. Update leapfile validity > accordingly. > Add a new source of leapsecond

[Linuxptp-devel] [PATCH] lstab: Update leapfile validity

2023-11-21 Thread Maciek Machnikowski
No leap seconds will happen till 28 June 2024. Update leapfile validity accordingly. Add a new source of leapsecond file from the IERS. Signed-off-by: Maciek Machnikowski --- lstab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lstab.c b/lstab.c index df8cce0..2aa87be

[Linuxptp-devel] [PATCH v4 1/2] msg: Enable changing PTP message header version

2023-11-10 Thread Maciek Machnikowski
packets with ptp_minor version set. v2: clarify compatibility issue caused by the change v3: fix subject line Signed-off-by: Maciek Machnikowski --- msg.c | 1 + msg.h | 5 + port.c | 18 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/msg.c b/msg.c

[Linuxptp-devel] [PATCH v4 2/2] ptp4l: Allow advertisement of legacy PTP 2.0 protocol

2023-11-10 Thread Maciek Machnikowski
. v2: rebase on top, clarify compatibility issues v3: fix subject line v4: change argument to ptp_minor_version Signed-off-by: Maciek Machnikowski --- config.c| 1 + configs/default.cfg | 1 + ptp4l.8 | 5 + ptp4l.c | 3 +++ 4 files changed, 10 insertions

Re: [Linuxptp-devel] [PATCH v2 2/2] Some hardware can't properly timestamp packets with the new PTP header version 2.1. This patch adds legacy_ptp_ver config option that allows advertising of the lega

2023-11-10 Thread Maciek Machnikowski
On 11/10/2023 5:43 PM, Erez wrote: > > > On Fri, 10 Nov 2023 at 14:05, Maciek Machnikowski > mailto:mac...@machnikowski.net>> wrote: > > Additionally, forcing PTP minor version to be nonzero causes > interoperability issues with some legacy grandmasters. >

[Linuxptp-devel] [PATCH v2] phc_ctl: Implement setting frequency from system time.

2023-11-10 Thread Maciek Machnikowski
Implement auto mode for frequency setting. In this mode the tool will measure the frequency difference between PHC and CLOCK_REALTIME and apply the correction to the PHC to match the system clock. v2: rebase and change measure time to 5 seconds Signed-off-by: Maciek Machnikowski --- phc_ctl.8

[Linuxptp-devel] [PATCH v7 2/2] ts2phc: Add PTP as a source of ToD

2023-11-10 Thread Maciek Machnikowski
management_tlv_id is not called on non-management messages v6: optimized code to not check signaling_cb_ena on management messages v7: rebase Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8| 6 ++ ts2phc.c| 2 + ts2phc_pps_source.c | 4

[Linuxptp-devel] [PATCH v7 1/2] pmc_agent: Add option to run callback for signaling messages

2023-11-10 Thread Maciek Machnikowski
on non-management messages v6: optimized code to not check signaling_cb_ena on management messages v7: rebase Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 22 -- pmc_agent.h | 7 +++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/pmc_agent.c b

Re: [Linuxptp-devel] [PATCH v3 1/2] msg: Enable changing PTP message header version

2023-11-10 Thread Maciek Machnikowski
uot;ptp_minor_number" > > > ciao > > > luigi > > > > > In data venerdì 10 novembre 2023 14:10:37 CET, Maciek Machnikowski ha > scritto: > >> Caution: This message was sent from an external source. Please take care > >> when clic

[Linuxptp-devel] [PATCH v3 2/2] ptp4l: Allow advertisement of legacy PTP 2.0 protocol

2023-11-10 Thread Maciek Machnikowski
. v2: rebase on top, clarify compatibility issues v3: fix subject line Signed-off-by: Maciek Machnikowski --- config.c| 1 + configs/default.cfg | 1 + ptp4l.8 | 5 + ptp4l.c | 4 4 files changed, 11 insertions(+) diff --git a/config.c b/config.c index

[Linuxptp-devel] [PATCH v3 1/2] msg: Enable changing PTP message header version

2023-11-10 Thread Maciek Machnikowski
packets with ptp_minor version set. v2: clarify compatibility issue caused by the change v3: fix subject line Signed-off-by: Maciek Machnikowski --- msg.c | 1 + msg.h | 5 + port.c | 18 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/msg.c b/msg.c

[Linuxptp-devel] [PATCH v2 2/2] Some hardware can't properly timestamp packets with the new PTP header version 2.1. This patch adds legacy_ptp_ver config option that allows advertising of the legacy 2

2023-11-10 Thread Maciek Machnikowski
Additionally, forcing PTP minor version to be nonzero causes interoperability issues with some legacy grandmasters. Signed-off-by: Maciek Machnikowski --- config.c| 1 + configs/default.cfg | 1 + ptp4l.8 | 5 + ptp4l.c | 4 4 files changed, 11

[Linuxptp-devel] [PATCH v2 1/2] Some hardware can't properly timestamp packets with the new PTP header version 2.1. This patch introduces a global var ptp_hdr_ver that can be changed externally to all

2023-11-10 Thread Maciek Machnikowski
Forcing 2.1 also breaks interoperability with some older grandmasters which will ignore packets with ptp_minor version set. Signed-off-by: Maciek Machnikowski --- msg.c | 1 + msg.h | 5 + port.c | 18 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git

Re: [Linuxptp-devel] [PATCH v1] phc_ctl: Implement setting frequency from system time.

2023-11-10 Thread Maciek Machnikowski
On 11/10/2023 7:02 AM, Richard Cochran wrote: > On Wed, Sep 13, 2023 at 05:09:04PM +0000, Maciek Machnikowski wrote: >> Implement auto mode for frequency setting. In this mode the tool >> will measure the frequency difference between PHC and CLOCK_REALTIME >> and apply the

[Linuxptp-devel] [PATCH v1] phc_ctl: Implement setting frequency from system time.

2023-09-13 Thread Maciek Machnikowski
Implement auto mode for frequency setting. In this mode the tool will measure the frequency difference between PHC and CLOCK_REALTIME and apply the correction to the PHC to match the system clock. Signed-off-by: Maciek Machnikowski --- phc_ctl.8 | 13 +++- phc_ctl.c | 92

Re: [Linuxptp-devel] [RESEND v5 2/2] ts2phc: Add PTP as a source of ToD

2023-09-04 Thread Maciek Machnikowski
On 9/4/2023 1:01 AM, Richard Cochran wrote: > On Tue, Aug 08, 2023 at 11:36:52AM +0200, Maciek Machnikowski wrote: > >> v2: changed pmc_agent implementation to not use a separate callback >> v3: updated poll thread to use less CPU >> v4: changed sleep routine to usleep

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-22 Thread Maciek Machnikowski
On 8/22/2023 1:50 PM, Miroslav Lichvar wrote: > On Tue, Aug 22, 2023 at 12:34:35PM +0200, Maciek Machnikowski wrote: >> root@equinox:[~]#: phc_ctl ens6f0np0 set freq 5000 >> root@equinox:[~]#: sudo ptp4l -m -i ens6f0np0 -2 -s > >> ptp4l[248.614]: master offset -301

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-22 Thread Maciek Machnikowski
On 8/22/2023 11:24 AM, Miroslav Lichvar wrote: > On Mon, Aug 21, 2023 at 07:02:55PM +0200, Maciek Machnikowski wrote: >> On 8/21/2023 2:04 PM, Miroslav Lichvar wrote: >>> s->drift is the drift of the uncompensated clock. It's not supposed to be >>> scaled by anyth

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-21 Thread Maciek Machnikowski
On 8/21/2023 2:04 PM, Miroslav Lichvar wrote: > On Fri, Aug 18, 2023 at 12:31:47PM +0200, Maciek Machnikowski wrote: >> Current implementation saves s->drift as an offset between current clock >> frequency and the remote clock frequency calculated on first two samples.

[Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-18 Thread Maciek Machnikowski
the lock needs more time to stabilize when the frequency offset is very large (ex. set to extreme values with phc_ctl) or may totally prevent servo from correctly locking. This patch fixes the s->drift when entering the stable state to hold the scaled drift. Signed-off-by: Maciek Machnikowski -

[Linuxptp-devel] [RESEND v5 1/2] pmc_agent: Add option to run callback for signaling messages

2023-08-08 Thread Maciek Machnikowski
Add option to run callback that when the PMC agent receives signaling messages. Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 19 ++- pmc_agent.h | 7 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pmc_agent.c b/pmc_agent.c index 62d1a86..7ffcec8

[Linuxptp-devel] [RESEND v5 2/2] ts2phc: Add PTP as a source of ToD

2023-08-08 Thread Maciek Machnikowski
0d0 --- /dev/null +++ b/ts2phc_ptp_pps_source.c @@ -0,0 +1,199 @@ +/** + * @file ts2phc_ptp_pps_source.c + * @note Copyright (C) 2023 Maciek Machnikowski + * @note SPDX-License-Identifier: GPL-2.0+ + */ +#include +#include +#include + +#include "missing.h" +#include "pmc_agent.h" +#include &qu

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-21 Thread Maciek Machnikowski
On 7/10/2023 12:33 PM, Maciek Machnikowski wrote: > > > On 7/10/2023 12:03 PM, Miroslav Lichvar wrote: >> On Mon, Jul 10, 2023 at 11:18:36AM +0200, Maciek Machnikowski wrote: >>> Do you mean the one in clock.c? If so, the clock_stats_display resets >>> th

Re: [Linuxptp-devel] [PATCH] sk: don't report random errno on timeout

2023-07-18 Thread Maciek Machnikowski
On 7/18/2023 1:08 AM, Jacob Keller wrote: > > > On 7/16/2023 1:27 PM, Richard Cochran wrote: >> On Fri, Jul 14, 2023 at 08:43:30PM +, Keller, Jacob E wrote: >> With this patch applied, one will get proper error in last line, "Timer expired", and more modern suggestion about how

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-10 Thread Maciek Machnikowski
On 7/10/2023 12:03 PM, Miroslav Lichvar wrote: > On Mon, Jul 10, 2023 at 11:18:36AM +0200, Maciek Machnikowski wrote: >> Do you mean the one in clock.c? If so, the clock_stats_display resets >> them, so there's no way of printing the stats from a whole run - >> especially i

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-10 Thread Maciek Machnikowski
On 7/10/2023 10:33 AM, Miroslav Lichvar wrote: > On Mon, Jul 03, 2023 at 04:18:57PM +0200, Maciek Machnikowski wrote: >> Currently running servo reports current offsets in numerous tools, but lacks >> statistical data. Having the basic statistical data makes it easier to >&g

[Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-03 Thread Maciek Machnikowski
parameters and prints basic offset min/avg/max/stddev/rms stats on servo destroy call (when the tool is treminated). Signed-off-by: Maciek Machnikowski --- makefile| 2 +- servo.c | 42 ++ servo_private.h | 6 ++ 3 files changed, 49

Re: [Linuxptp-devel] [PATCH RFC 1/5] Rename NSEC2SEC as NSEC_PER_SEC

2023-06-07 Thread Maciek Machnikowski
On 6/7/2023 17:03, Erez wrote: > > > On Wed, 7 Jun 2023 at 00:09, Rahul Rameshbabu via Linuxptp-devel > > wrote: > > The name NSEC2SEC implies converting nanoseconds to seconds, but the > value > used for the macro converts seconds to

Re: [Linuxptp-devel] [PATCH] Use the peerDelay computation specified in 802.1AS when transportSpecific value is 1 and the clock domain is 0.

2023-06-06 Thread Maciek Machnikowski
On 6/5/2023 6:56 PM, Dylan Robinson wrote: > The 1588 defined computation using variable names from this project is: > D = [(t4 - t1) - (t3 - t2) - c1 - c2]/2 > > The existing code combines the corrections into a variable t3c which we > can get the value of by isolating t3, c1 and c2: >

Re: [Linuxptp-devel] Can ptp4l specify master clock source by ip address?

2023-06-03 Thread Maciek Machnikowski
On 6/2/2023 9:01 PM, Trey Harrison wrote: > Subject kinda says it all.. We have previously been using chrony to > synchronize systems on a network, and chrony allows slave devices to > specify the ip address of their clock source. > > It does not seem obvious after reviewing documentation here

[Linuxptp-devel] [PATCH v1] lstab: Update leapfile validity

2023-04-27 Thread Maciek Machnikowski
No leap seconds will happen till the end of 2023. Update leapfile validity accordingly. Signed-off-by: Maciek Machnikowski --- lstab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lstab.c b/lstab.c index facf3e4..df8cce0 100644 --- a/lstab.c +++ b/lstab.c @@ -51,7 +51,7

[Linuxptp-devel] [PATCH v6 2/2] ts2phc: Add PTP as a source of ToD

2023-04-26 Thread Maciek Machnikowski
management_tlv_id is not called on non-management messages v6: optimized code to not check signaling_cb_ena on management messages Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8| 6 ++ ts2phc.c| 2 + ts2phc_pps_source.c | 4

[Linuxptp-devel] [PATCH v6 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-26 Thread Maciek Machnikowski
on non-management messages v6: optimized code to not check signaling_cb_ena on management messages Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 22 -- pmc_agent.h | 7 +++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/pmc_agent.c b/pmc_agent.c index

Re: [Linuxptp-devel] [PATCH v5 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-26 Thread Maciek Machnikowski
On 4/21/2023 6:46 PM, Erez wrote: > > > On Fri, 21 Apr 2023 at 17:27, Maciek Machnikowski > mailto:mac...@machnikowski.net>> wrote: > > On 4/21/2023 1:25 PM, Erez wrote: > > > > > > On Thu, 20 Apr 2023 at 19:01, Maciek Machnikow

Re: [Linuxptp-devel] [PATCH v2 0/1] Last (?) patch before version 4 release

2023-04-26 Thread Maciek Machnikowski
On 4/19/2023 11:43 AM, Maciek Machnikowski wrote: > On 4/17/2023 4:34 PM, Richard Cochran wrote: >> On Mon, Apr 17, 2023 at 11:07:10AM +0200, Miroslav Lichvar wrote: >> >>> As for the 4.0 release, can you please have a look at this bug fix? >>> https://ww

[Linuxptp-devel] [PATCH v5 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-20 Thread Maciek Machnikowski
Add option to run callback that when the PMC agent receives signaling messages. Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 21 +++-- pmc_agent.h | 7 +++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/pmc_agent.c b/pmc_agent.c index 62d1a86

[Linuxptp-devel] [PATCH v5 2/2] ts2phc: Add PTP as a source of ToD

2023-04-20 Thread Maciek Machnikowski
management_tlv_id is not called on non-management messages Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8| 6 ++ ts2phc.c| 2 + ts2phc_pps_source.c | 4 + ts2phc_pps_source.h | 1 + ts2phc_ptp_pps_source.c | 199

Re: [Linuxptp-devel] [PATCH v2 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-20 Thread Maciek Machnikowski
On 4/17/2023 3:24 PM, Erez wrote: > > > On Mon, 17 Apr 2023 at 15:21, Maciek Machnikowski > mailto:mac...@machnikowski.net>> wrote: > > > > On 4/14/2023 2:58 PM, Erez wrote: > > > > > > On Tue, 11 Apr 2023 at 10:28, Maciek Mac

Re: [Linuxptp-devel] [PATCH v2 0/1] Last (?) patch before version 4 release

2023-04-19 Thread Maciek Machnikowski
On 4/17/2023 4:34 PM, Richard Cochran wrote: > On Mon, Apr 17, 2023 at 11:07:10AM +0200, Miroslav Lichvar wrote: > >> As for the 4.0 release, can you please have a look at this bug fix? >> https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg06420.html > > +1 > Can we also get

[Linuxptp-devel] [PATCH v4 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-11 Thread Maciek Machnikowski
Add option to run callback that when the PMC agent receives signaling messages. Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 19 ++- pmc_agent.h | 7 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pmc_agent.c b/pmc_agent.c index 62d1a86..7ffcec8

[Linuxptp-devel] [PATCH v4 2/2] ts2phc: Add PTP as a source of ToD

2023-04-11 Thread Maciek Machnikowski
0d0 --- /dev/null +++ b/ts2phc_ptp_pps_source.c @@ -0,0 +1,199 @@ +/** + * @file ts2phc_ptp_pps_source.c + * @note Copyright (C) 2023 Maciek Machnikowski + * @note SPDX-License-Identifier: GPL-2.0+ + */ +#include +#include +#include + +#include "missing.h" +#include "pmc_agent.h" +#include &qu

Re: [Linuxptp-devel] [PATCH v3 2/2] ts2phc: Add PTP as a source of ToD

2023-04-11 Thread Maciek Machnikowski
On 4/11/2023 3:20 PM, Jakub Raczyński wrote: > Dear Maciek, > >> +if (ts - s->last_update >= TOD_UPDATE_INTERVAL) { >> +pmc_agent_update(s->agent); >> +s->last_update = ts; >> +} else { >> +sleep(0.01); >> +

[Linuxptp-devel] [PATCH v1] tz2alt: Add tz2alt to .gitignore

2023-04-11 Thread Maciek Machnikowski
Add tz2alt to .gitignore list Signed-off-by: Maciek Machnikowski --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1e7d1ca..8d3e171 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /snmp4lptp /timemaster /ts2phc +/tz2alt -- 2.30.2

[Linuxptp-devel] [PATCH v2] ts2phc: Prevent reporting poll error when received termination signal

2023-04-11 Thread Maciek Machnikowski
Currently ts2phc prints "poll failed" error to the LOG_EMERG when the poll for tod fails. This causes error print on all terminals when the tool gets terminated using SIGINT (ex. by pressing CTRL+C). v2: Properly handle poll interrupt to prevent the error Signed-off-by: Maciek Ma

Re: [Linuxptp-devel] [PATCH v1] ts2phc: Prevent reporting poll error when received termination signal

2023-04-11 Thread Maciek Machnikowski
On 4/11/2023 2:52 PM, Jürgen Appel wrote: > Dear Maciek, > > On Tuesday, 11 April 2023 11:19:50 CEST, you wrote: > >> Currently ts2phc prints "poll failed" error to the LOG_EMERG when >> the poll for tod fails. This causes error print on all terminals >> when the tool gets terminated using

[Linuxptp-devel] [PATCH v1] ts2phc: Prevent reporting poll error when received termination signal

2023-04-11 Thread Maciek Machnikowski
Signed-off-by: Maciek Machnikowski --- ts2phc.c | 3 ++- ts2phc_pps_sink.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ts2phc.c b/ts2phc.c index 4393059..7d19de6 100644 --- a/ts2phc.c +++ b/ts2phc.c @@ -763,7 +763,8 @@ int main(int argc, char *argv[])

[Linuxptp-devel] [PATCH v3 2/2] ts2phc: Add PTP as a source of ToD

2023-04-11 Thread Maciek Machnikowski
--slave_event_monitor /var/run/ts2phc-mon Note: Do not enable ptp4l control of the clock on the same port. v2: changed pmc_agent implementation to not use a separate callback v3: updated poll thread to use less CPU Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8

[Linuxptp-devel] [PATCH v3 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-11 Thread Maciek Machnikowski
Add option to run callback that when the PMC agent receives signaling messages. Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 19 ++- pmc_agent.h | 7 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pmc_agent.c b/pmc_agent.c index 62d1a86..7ffcec8

Re: [Linuxptp-devel] [PATCH v2 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-11 Thread Maciek Machnikowski
On 4/8/2023 5:42 PM, Erez wrote: > > I think I have it: > > +               /* Run the callback on signaling messages if configured */ > +               if (res == 0 && node->signaling_cb_ena && > (msg_type(*msg) == SIGNALING)) { > +                       res=2; > +               } > > > -   

[Linuxptp-devel] [PATCH v2 1/2] pmc_agent: Add option to run callback for signaling messages

2023-04-07 Thread Maciek Machnikowski
Add option to run callback that when the PMC agent receives signaling messages. Signed-off-by: Maciek Machnikowski --- pmc_agent.c | 19 ++- pmc_agent.h | 7 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/pmc_agent.c b/pmc_agent.c index 62d1a86..7ffcec8

[Linuxptp-devel] [PATCH v2 2/2] ts2phc: Add PTP as a source of ToD

2023-04-07 Thread Maciek Machnikowski
--slave_event_monitor /var/run/ts2phc-mon Note: Do not enable ptp4l control of the clock on the same port. Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8| 6 ++ ts2phc.c| 2 + ts2phc_pps_source.c | 4 + ts2phc_pps_source.h

Re: [Linuxptp-devel] [PATCH v1 1/2] pmc_agent: Add callback for signaling messages

2023-04-05 Thread Maciek Machnikowski
On 4/2/2023 1:48 PM, Erez wrote: > On Fri, 31 Mar 2023 at 13:35, Maciek Machnikowski > mailto:mac...@machnikowski.net>> wrote: > > Add callback that will act on signaling messages. > > > Adding a second callback seems like an unnecessary overhead. > All you

[Linuxptp-devel] [PATCH v1 1/2] pmc_agent: Add callback for signaling messages

2023-03-31 Thread Maciek Machnikowski
Add callback that will act on signaling messages. Signed-off-by: Maciek Machnikowski --- phc2sys.c | 4 ++-- pmc_agent.c | 17 - pmc_agent.h | 7 +-- ts2phc.c| 2 +- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 19e8012

[Linuxptp-devel] [PATCH v1 2/2] ts2phc: Add PTP as a source of ToD

2023-03-31 Thread Maciek Machnikowski
--slave_event_monitor /var/run/ts2phc-mon Note: Do not enable ptp4l control of the clock on the same port. Signed-off-by: Maciek Machnikowski --- makefile| 3 +- ts2phc.8| 6 ++ ts2phc.c| 2 + ts2phc_pps_source.c | 4 + ts2phc_pps_source.h

[Linuxptp-devel] [PATCH v2] ntpshm: Invalidate SHM data before releasing the servo

2023-03-16 Thread Maciek Machnikowski
system suspend), an incorrec timestamp might be accepted by the consumer To prevent such behavior - invalidate the SHM data when releasing the SHM servo. v2: Fix commit message Signed-off-by: Maciek Machnikowski --- ntpshm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ntpshm.c b/ntpshm.c

Re: [Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-16 Thread Maciek Machnikowski
On 16/03/2023 09:37, Miroslav Lichvar wrote: > On Wed, Mar 15, 2023 at 05:44:43PM +0100, Maciek Machnikowski wrote: >> If you start the synchronization process and see that it doesn't work >> correctly then, this cleanup will prevent leaving invalid timestamps in >> memory

Re: [Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-15 Thread Maciek Machnikowski
On 15/03/2023 13:51, Miroslav Lichvar wrote: > On Wed, Mar 15, 2023 at 12:55:56PM +0100, Maciek Machnikowski wrote: >> The SHM is not cleared upon servo release when exiting the tool. This leaves >> the last update in the shared memory region marked as valid. As a result, th

[Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-15 Thread Maciek Machnikowski
releasing the SHM servo. Signed-off-by: Maciek Machnikowski --- ntpshm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ntpshm.c b/ntpshm.c index 3b62a3f..6453ac4 100644 --- a/ntpshm.c +++ b/ntpshm.c @@ -69,6 +69,9 @@ static void ntpshm_destroy(struct servo *servo) { struct

[Linuxptp-devel] [PATCH v2] ts2phc: Fix potential null-pointer dereference

2023-03-13 Thread Maciek Machnikowski
An unallocated pmc_agent may be dereferenced in the pmc_agent_destroy called by the ts2phc_cleanup(). Check if the agent was allocated before releasing it. v2: Fixed coding standard Signed-off-by: Maciek Machnikowski --- ts2phc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Linuxptp-devel] [PATCH v1] ts2phc: Fix potential null-pointer dereference

2023-03-13 Thread Maciek Machnikowski
An unallocated pmc_agent may be dereferenced in the pmc_agent_destroy called by the ts2phc_cleanup(). Check if the agent was allocated before releasing it. Signed-off-by: Maciek Machnikowski --- ts2phc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts2phc.c b/ts2phc.c

[Linuxptp-devel] [PATCH v1 2/2] ptp4l: Allow advertisement of legacy PTP 2.0 protocol

2023-03-07 Thread Maciek Machnikowski
Some hardware can't properly timestamp packets with the new PTP header version 2.1. This patch adds legacy_ptp_ver config option that allows advertising of the legacy 2.0 protocol. Signed-off-by: Maciek Machnikowski --- config.c| 1 + configs/default.cfg | 1 + ptp4l.8

[Linuxptp-devel] [PATCH v1 1/2] msg: Enable changing PTP message header version

2023-03-07 Thread Maciek Machnikowski
Some hardware can't properly timestamp packets with the new PTP header version 2.1. This patch introduces a global var ptp_hdr_ver that can be changed externally to allow legacy PTP version to be advertised. Signed-off-by: Maciek Machnikowski --- msg.c | 1 + msg.h | 5 + port.c | 18

Re: [Linuxptp-devel] [PATCH v6 00/10] Dynamic sync direction for ts2phc

2023-02-28 Thread Maciek Machnikowski
On 31/08/2022 01:12, Vladimir Oltean wrote > In text, it would be described as this: > > cat ts2phc.cfg > [global] > first_step_threshold0.2 > step_threshold 0.2 > ts2phc.pulsewidth 5 > ts2phc.perout_phase 0 > > #

[Linuxptp-devel] [PATCH v3 1/3] lstab: Add LSTAB_EXPIRED result

2023-02-08 Thread Maciek Machnikowski
LSTAB_UNKNOWN is too generic, add LSTAB_EXPIRED result to return the latest lstab correction and indicate that the tab used to resolve it is expired. This is useful for more precise reporting of lstab file state and will enable an override of expired table. Signed-off-by: Maciek Machnikowski

[Linuxptp-devel] [PATCH v3 0/3] Fix TAI offset in generic pps source

2023-02-08 Thread Maciek Machnikowski
that was applied to nmea source also to the generic, when the value read from system is incorrect. v2: Fixes after Richard's review v3: Fixed static function conflicting with header Maciek Machnikowski (3): lstab: Add LSTAB_EXPIRED result lstab: move update_leapsecond_table function to lstab

[Linuxptp-devel] [PATCH v3 3/3] ts2phc: Fix generic pps source when tai offset is not set in OS

2023-02-08 Thread Maciek Machnikowski
be used when the tai offset read from system is 0. Signed-off-by: Maciek Machnikowski Reviewed-by: Jacob Keller Signed-off-by: Maciek Machnikowski --- ts2phc_generic_pps_source.c | 83 + 1 file changed, 76 insertions(+), 7 deletions(-) diff --git

[Linuxptp-devel] [PATCH v3 2/3] lstab: move update_leapsecond_table function to lstab

2023-02-08 Thread Maciek Machnikowski
To enable handling lstab in the same way by different pps sources, move update_leapsecond_table function from the nmea_pps_source to the generic lstab file. This also required moving leapfile filename and its modification time to the struct lstab. Signed-off-by: Maciek Machnikowski Reviewed

Re: [Linuxptp-devel] [PATCH v2 1/1] clock: Fix stale clock parent pid usage after best master change

2022-12-13 Thread Maciek Machnikowski
On 12/9/2022 1:56 AM, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > Please add a short description to the patch (ex. the problem and solution from the cover letter), as the description from the cover letter will not get to the git repo. > Signed-off-by: Vincent Cheng > --- >

[Linuxptp-devel] [PATCH v2 1/3] lstab: Add LSTAB_EXPIRED result

2022-12-12 Thread Maciek Machnikowski
LSTAB_UNKNOWN is too generic, add LSTAB_EXPIRED result to return the latest lstab correction and indicate that the tab used to resolve it is expired. This is useful for more precise reporting of lstab file state and will enable an override of expired table. Signed-off-by: Maciek Machnikowski

[Linuxptp-devel] [PATCH v2 3/3] ts2phc: Fix generic pps source when tai offset is not set in OS

2022-12-12 Thread Maciek Machnikowski
be used when the tai offset read from system is 0. Signed-off-by: Maciek Machnikowski Reviewed-by: Jacob Keller --- ts2phc_generic_pps_source.c | 83 + 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/ts2phc_generic_pps_source.c b

[Linuxptp-devel] [PATCH v2 2/3] lstab: move update_leapsecond_table function to lstab

2022-12-12 Thread Maciek Machnikowski
To enable handling lstab in the same way by different pps sources, move update_leapsecond_table function from the nmea_pps_source to the generic lstab file. This also required moving leapfile filename and its modification time to the struct lstab. Signed-off-by: Maciek Machnikowski Reviewed

[Linuxptp-devel] [PATCH v2 0/3] Fix TAI offset in generic pps source

2022-12-12 Thread Maciek Machnikowski
that was applied to nmea source also to the generic, when the value read from system is incorrect. v2: Fixes after Richard's review Signed-off-by: Maciek Machnikowski Maciek Machnikowski (3): lstab: Add LSTAB_EXPIRED result lstab: move update_leapsecond_table function to lstab ts2phc: Fix

Re: [Linuxptp-devel] [PATCH 2/4] Add sock servo.

2022-11-14 Thread Maciek Machnikowski
On Mon, Nov 14, 2022 at 05:06:17PM +, Keller, Jacob E wrote: > > > > -Original Message- > > From: Hal Murray > > Sent: Monday, November 14, 2022 4:34 AM > > To: Miroslav Lichvar > > Cc: Keller, Jacob E ; linuxptp- > > de...@lists.sourceforge.net; Hal Murray > > Subject: Re:

Re: [Linuxptp-devel] [PATCH v2] ptp4l: Add profile_id configuration support for G.8275.1 and G.8275.2.

2022-11-02 Thread Maciek Machnikowski
On Mon, Oct 31, 2022 at 04:49:57PM -0400, izunna.otiji...@renesas.com wrote: > From: Izunna Otiji > > Signed-off-by: Izunna Otiji > --- > port.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/port.c b/port.c > index 871ad68..34c0c09 100644 > ---

Re: [Linuxptp-devel] [PATCH] phc_ctl: add pin_cfg command to display pin functions

2022-10-31 Thread Maciek Machnikowski
On Thu, Oct 27, 2022 at 03:32:48AM -0700, Jacob Keller wrote: > Add a new function to phc_ctl to display the devices pin configuration > data. First, obtain the device capabilities to determine the number of > pins. Then, for each pin, print the name, function, and channel > information. > >

Re: [Linuxptp-devel] [PATCH v1 0/3] Fix TAI offset in generic pps source

2022-10-20 Thread Maciek Machnikowski
On Wed, Oct 19, 2022 at 05:22:33PM -0700, Jacob Keller wrote: > > > On 10/18/2022 8:08 AM, Maciek Machnikowski wrote: > > Current implementation of generic pps source relies on the UTC-TAI offset > > read > > from system. Some OSes don't set that off

[Linuxptp-devel] [PATCH v1 1/3] lstab: Add LSTAB_EXPIRED result

2022-10-18 Thread Maciek Machnikowski
LSTAB_UNKNOWN is too generic, add LSTAB_EXPIRED result to return the latest lstab correction and indicate that the tab used to resolve it is expired. This is useful for more precise reporting of lstab file state and will enable an override of expired table. Signed-off-by: Maciek Machnikowski

[Linuxptp-devel] [PATCH v1 3/3] ts2phc: Fix generic pps source when tai offset is not set in OS

2022-10-18 Thread Maciek Machnikowski
be used when the tai offset read from system is 0. Signed-off-by: Maciek Machnikowski --- ts2phc_generic_pps_source.c | 83 + 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/ts2phc_generic_pps_source.c b/ts2phc_generic_pps_source.c index 6842d8e

[Linuxptp-devel] [PATCH v1 2/3] lstab: move update_leapsecond_table function to lstab

2022-10-18 Thread Maciek Machnikowski
To enable handling lstab in the same way by different pps sources, move update_leapsecond_table function from the nmea_pps_source to the generic lstab file. This also required moving leapfile filename and its modification time to the struct lstab. Signed-off-by: Maciek Machnikowski --- lstab.c

[Linuxptp-devel] [PATCH v1 0/3] Fix TAI offset in generic pps source

2022-10-18 Thread Maciek Machnikowski
that was applied to nmea source also to the generic, when the value read from system is incorrect. Signed-off-by: Maciek Machnikowski Maciek Machnikowski (3): lstab: Add LSTAB_EXPIRED result lstab: move update_leapsecond_table function to lstab ts2phc: Fix generic pps source when tai offset

Re: [Linuxptp-devel] [PATCH] Inclusion of a virtual PTP port on a PTP clock

2022-10-18 Thread Maciek Machnikowski
On Mon, Oct 17, 2022 at 09:14:14PM +0200, Erez wrote: > On Mon, 17 Oct 2022 at 16:46, Vipin Sharma > wrote: > > > Hi Richard, > > We really appreciate the work and time you have spent on our commits and > > the community work you are doing for LinuxPTP and other timesync features. > > > > "I

[Linuxptp-devel] [PATCH v1] ts2phc: Update default lstab expiry date

2022-10-17 Thread Maciek Machnikowski
Update leap second table expiry date to 28 June 2023 based on the latest leap-seconds.list from IETF https://www.ietf.org/timezones/data/leap-seconds.list This fixes the need to give leapfile when running ts2phc with the NMEA source. Signed-off-by: Maciek Machnikowski --- lstab.c | 2 +- 1

Re: [Linuxptp-devel] [PATCH] Inclusion of a virtual PTP port on a PTP clock

2022-10-17 Thread Maciek Machnikowski
On Sat, Oct 08, 2022 at 04:05:17PM -0700, Richard Cochran wrote: > I read Annex B and Appendix III of T-REC-G.8275-202010, and I claim > that linuxptp already implements this functionality, even though there > is no "virtual port" explicitly modeled. > > I also read about APTS in

[Linuxptp-devel] [PATCH v1] phc2sys: Update TAI to UTC offset in manual

2022-10-17 Thread Maciek Machnikowski
To avoid confusion - update offset in the man page to current value. Signed-off-by: Maciek Machnikowski --- phc2sys.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index 963df83..6de2d25 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -465,7 +465,7

[Linuxptp-devel] [PATCH v2 1/3] ts2phc: Rename pps_sink to tod_sink in main()

2022-10-06 Thread Maciek Machnikowski
From: Maciej Machnikowski Rename pps_sink to tod_sink, as it stores the source of the time of day Signed-off-by: Maciej Machnikowski --- ts2phc.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ts2phc.c b/ts2phc.c index f7a57e4..67f2de6 100644 ---

[Linuxptp-devel] [PATCH v2 3/3] ts2phc: Use system time as the default ToD source

2022-10-06 Thread Maciek Machnikowski
From: Maciej Machnikowski If no other Time of Day source is specified use the system timer by default. Signed-off-by: Maciej Machnikowski --- config.c | 2 +- ts2phc.8 | 1 + ts2phc.c | 6 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config.c b/config.c index

[Linuxptp-devel] [PATCH v2 2/3] ts2phc: Add option to specify the ToD source in the config file

2022-10-06 Thread Maciek Machnikowski
From: Maciej Machnikowski Current implementation requires specifying the -s argument for PPS sources that don't provide ToD information and for GNSS modules. Add ts2phc.tod_source config option to enable specifying the source in the config file. Currently only "generic" and "nmea" options are

Re: [Linuxptp-devel] [PATCH v1] ts2phc: Add option to specify the ToD source in the config file

2022-10-04 Thread Maciek Machnikowski
On Tue, Oct 04, 2022 at 06:34:20AM -0700, Richard Cochran wrote: > On Tue, Oct 04, 2022 at 10:30:58AM +0200, Maciek Machnikowski wrote: > > Current implementation requires specifying the -s argument for PPS > > sources that don't provide ToD information and for GNSS module

[Linuxptp-devel] [PATCH v1] ts2phc: Add option to specify the ToD source in the config file

2022-10-04 Thread Maciek Machnikowski
allowed. Signed-off-by: Maciek Machnikowski --- config.c | 1 + ts2phc.8 | 8 ts2phc.c | 12 3 files changed, 21 insertions(+) diff --git a/config.c b/config.c index e454c91..33176f4 100644 --- a/config.c +++ b/config.c @@ -330,6 +330,7 @@ struct config_item config_tab[] = {

Re: [Linuxptp-devel] [PATCH 4/4] APTS support

2022-08-30 Thread Maciek Machnikowski
On Wed, Aug 24, 2022 at 04:32:22PM +0530, SyncMonk Technologies wrote: > adding APTS to participate in BMCA > > Passing the announce message for external source to ptp4l using virtual > port to avoid selection of master from PTP source. > > Signed-off-by: Greg Armstrong > Signed-off-by: Leon

Re: [Linuxptp-devel] [PATCH 3/4] APTS support

2022-08-30 Thread Maciek Machnikowski
On Wed, Aug 24, 2022 at 04:32:21PM +0530, SyncMonk Technologies wrote: > Adding virtual port support for ts2phc. > > Signed-off-by: Greg Armstrong > Signed-off-by: Leon Goldin > Signed-off-by: Vipin Sharma > Signed-off-by: Devasish Dey > --- > makefile | 6 +- > ts2phc_vport.c | 282

Re: [Linuxptp-devel] [PATCH 2/4] APTS support

2022-08-30 Thread Maciek Machnikowski
On Wed, Aug 24, 2022 at 04:32:20PM +0530, SyncMonk Technologies wrote: > Adding virtual port support to ptp4l > > Signed-off-by: Greg Armstrong > Signed-off-by: Leon Goldin > Signed-off-by: Vipin Sharma > Signed-off-by: Devasish Dey > +.B vport_address > +Specifies the address of UNIX

Re: [Linuxptp-devel] [PATCH 1/4] APTS support

2022-08-30 Thread Maciek Machnikowski
On Wed, Aug 24, 2022 at 04:32:19PM +0530, SyncMonk Technologies wrote: > Adding virtual PTP port support > As per G.8275 (Annex-B) including virtual PTP ports on a PTP clock. This > virtual port will be used to support APTS, IWF between different > clock_domains. Please name the patchset

[Linuxptp-devel] [PATCH v1] ts2phc: Print NMEA sentence used as ToD source in loglevel 6

2022-08-08 Thread Maciek Machnikowski
Print the G*RMC NMEA sentence that was correctly parsed and used as the ToD source in the default loglevel when the nmea source was used. This prevents printing all NMEA sentences available only in loglevel 7, and gives enough visibility on the state of GNSS receiver. Signed-off-by: Maciek

[Linuxptp-devel] [PATCH v1] ts2phc: Enable corrections reporting in default log level

2022-07-28 Thread Maciek Machnikowski
-by: Maciek Machnikowski --- ts2phc_pps_sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts2phc_pps_sink.c b/ts2phc_pps_sink.c index 91bd7c9..80bc192 100644 --- a/ts2phc_pps_sink.c +++ b/ts2phc_pps_sink.c @@ -280,8 +280,8 @@ static int ts2phc_pps_sink_event(struct

Re: [Linuxptp-devel] [PATCH v3] phc2sys: Add support for free-running mode

2022-07-25 Thread Maciek Machnikowski
On Sun, Jul 24, 2022 at 05:46:56PM -0700, Richard Cochran wrote: > On Tue, Jun 21, 2022 at 12:16:40PM +0200, Maciek Machnikowski wrote: > > > @@ -544,6 +546,9 @@ static void update_clock(struct phc2sys_private *priv, > > struct clock *clock, > > > > offset

  1   2   >