[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
Add PPS ToD source that extracts ToD from master timestamps from a slave event monitor of the running ptp4l instance. It enables scenarios where reliable ToD sources, such as nmea, may not be available, but a system is connected to different ptp masters. It can be used in the APTS deployment

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 Machnikowski ---

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
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). This patch adds the check if the tool is still running before reporting the error.

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

2023-04-11 Thread Maciek Machnikowski
Add PPS ToD source that extracts ToD from master timestamps from a slave event monitor of the running ptp4l instance. It enables scenarios where reliable ToD sources, such as nmea, may not be available, but a system is connected to different ptp masters. It can be used in the APTS deployment

[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; > +               } > > > -