[Linuxptp-devel] [PATCHv2 4/4] phc2sys: Don't exit when reading of PHC fails.

2022-03-24 Thread Miroslav Lichvar
Reading of the PHC can occasionally fail with some drivers, e.g. the ice driver returns -EBUSY when it fails to get a lock. Change do_loop() to ignore the error instead of exiting. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[Linuxptp-devel] [PATCHv2 0/4] Handle temporary errors in sysoff measurements

2022-03-24 Thread Miroslav Lichvar
v2: - added patches to make probing more reliable This patchset improves handling of temporary errors in the PTP_SYS_OFFSET ioctls. The probing function is modified to repeat up to 100 times and phc2sys is modified to continue on all errors. Miroslav Lichvar (4): sysoff: Downgrade

[Linuxptp-devel] [PATCHv2 2/4] sysoff: Change sysoff_measure() to return ioctl errno.

2022-03-24 Thread Miroslav Lichvar
Return -errno instead of SYSOFF_RUN_TIME_MISSING from the sysoff measurement functions to allow the callers to check for specific errors. Signed-off-by: Miroslav Lichvar --- sysoff.c | 15 --- sysoff.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sysoff.c

[Linuxptp-devel] [PATCHv2 1/4] sysoff: Downgrade PTP_SYS_OFFSET error message to debug level.

2022-03-24 Thread Miroslav Lichvar
Make the error message level consistent for all supported sysoff ioctls. Signed-off-by: Miroslav Lichvar --- sysoff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysoff.c b/sysoff.c index 2743859..31b792d 100644 --- a/sysoff.c +++ b/sysoff.c @@ -111,7 +111,7 @@ static

Re: [Linuxptp-devel] [PATCH] Add non-portable management option to query the servo state (via SERVO_STATE_NP).

2022-03-24 Thread Richard Cochran
On Thu, Mar 24, 2022 at 05:18:28PM +, Geva, Erez wrote: > Hi, > > What do you think of: > https://sourceforge.net/p/libpmc/code/ci/master/tree/sample/sync.pl > https://github.com/erezgeva/libpmc/blob/master/sample/sync.pl > > I wrote it in Perl, but can easily translate to C++ or other

Re: [Linuxptp-devel] [PATCH] Add non-portable management option to query the servo state (via SERVO_STATE_NP).

2022-03-24 Thread Martin Pecka
Thanks for sketching the script! A few notes: - I thought better than periodic queries would be the subscription mechanism... or is that overkill? - the threshold should be configurable from command line - it would be nicer if this tool used the read-only socket (or had a configuration to

Re: [Linuxptp-devel] [PATCH] Add non-portable management option to query the servo state (via SERVO_STATE_NP).

2022-03-24 Thread Geva, Erez
Hi, What do you think of: https://sourceforge.net/p/libpmc/code/ci/master/tree/sample/sync.pl https://github.com/erezgeva/libpmc/blob/master/sample/sync.pl I wrote it in Perl, but can easily translate to C++ or other scripts languages. Erez -Original Message- From: Richard Cochran

Re: [Linuxptp-devel] [PATCHv2 2/4] sysoff: Change sysoff_measure() to return ioctl errno.

2022-03-24 Thread Keller, Jacob E
> -Original Message- > From: Miroslav Lichvar > Sent: Thursday, March 24, 2022 6:20 AM > To: linuxptp-devel@lists.sourceforge.net > Subject: [Linuxptp-devel] [PATCHv2 2/4] sysoff: Change sysoff_measure() to > return ioctl errno. > > Return -errno instead of SYSOFF_RUN_TIME_MISSING

Re: [Linuxptp-devel] [PATCH] Add non-portable management option to query the servo state (via SERVO_STATE_NP).

2022-03-24 Thread Erez
On Thu, 24 Mar 2022 at 18:35, Richard Cochran wrote: > On Thu, Mar 24, 2022 at 05:18:28PM +, Geva, Erez wrote: > > Hi, > > > > What do you think of: > > https://sourceforge.net/p/libpmc/code/ci/master/tree/sample/sync.pl > > https://github.com/erezgeva/libpmc/blob/master/sample/sync.pl > > >