Re: [Linuxptp-devel] [PATCH v2 2/2] linuxptp: Use ${CC} in incdefs.sh

2023-10-26 Thread Luca Fancellu
> On 23 Oct 2023, at 10:43, Luca Fancellu wrote: > > The Makefile is defining CC and incdefs.sh is using > ${CROSS_COMPILE}cpp inside it, allowing both to use different > compilers depending on what the user pass during make invocation > as CC. > > Align them using ${CC} also inside incdefs.sh.

[Linuxptp-devel] [PATCH 4/5] phc2sys: Better indicate domain with realtime clock.

2023-10-26 Thread Miroslav Lichvar
Add a new field to the domain struct to mark the domain which contains the system realtime clock instead of relying on the fact that the domain doesn't have a subscribed pmc agent. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff -

[Linuxptp-devel] [PATCH 3/5] phc2sys: Adjust pmc subscription duration for clock update interval.

2023-10-26 Thread Miroslav Lichvar
The pmc_agent_update() function is called once per clock update. If the clock update rate configured with -R is smaller than 1 per minute, adjust the subscription interval to avoid gaps in its coverage. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 de

[Linuxptp-devel] [PATCH 2/5] pmc_agent: Add function to check if still subscribed.

2023-10-26 Thread Miroslav Lichvar
Add function to compare the current time with the time of the last successful pmc update to determine if ptp4l is still responding. Signed-off-by: Miroslav Lichvar --- pmc_agent.c | 15 +++ pmc_agent.h | 8 2 files changed, 23 insertions(+) diff --git a/pmc_agent.c b/pmc_a

[Linuxptp-devel] [PATCH 1/5] pmc_agent: Make subscription duration configurable.

2023-10-26 Thread Miroslav Lichvar
Replace the constant 1-minute update interval and 3-minute subscription duration with a duration parameter of pmc_agent_subscribe(). Signed-off-by: Miroslav Lichvar --- phc2sys.c | 2 +- pmc_agent.c | 15 +-- pmc_agent.h | 4 +++- ts2phc.c| 2 +- 4 files changed, 10 insertio

[Linuxptp-devel] [PATCH 0/5] Handle unresponsive ptp4l in phc2sys

2023-10-26 Thread Miroslav Lichvar
This series improves the automatic mode of phc2sys to handle unresponsive ptp4l, e.g. stopped, crashed or accidentaly removed socket. The first four patches prepare the code for the actual handling implemented in the fifth patch. Miroslav Lichvar (5): pmc_agent: Make subscription duration config

[Linuxptp-devel] [PATCH 5/5] phc2sys: Stop synchronization when ptp4l stops responding.

2023-10-26 Thread Miroslav Lichvar
phc2sys in the automatic mode waits for ptp4l on start, but doesn't care if it stopped providing state notifications and responding to UTC offset requests, e.g. if it stopped, crashed, freezed, or its socket was removed by a misconfigured ptp4l instance. To better handle broken communication with