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

2022-11-14 Thread Miroslav Lichvar
On Thu, Nov 10, 2022 at 09:51:52AM -0800, Jacob Keller wrote: > How specific is this to chronyd? AFAIK no other application implements the server side of the protocol. > Would it make sense to call this chronysock > instead of just sock? Yes, that makes sense. If there are no other issues with

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

2022-11-14 Thread Hal Murray
>> How specific is this to chronyd? > AFAIK no other application implements the server side of the protocol. >> Would it make sense to call this chronysock >> instead of just sock? > Yes, that makes sense. If there are no other issues with the > patches, I can resend. Calling it chronysock has

[Linuxptp-devel] [PATCH] bmc: Fix PortId comparison

2022-11-14 Thread Luigi Mantellini
The PortId is defined as a couple of ClockId (an 8-bytes opaque) and the PortNumber (UInterger16). In order to correctly handle the PortId endianess, the comparison has been split in the ClockIds comparison (using memcmp) and PortNumber comparison. --- bmc.c | 17 ++--- 1 file

[Linuxptp-devel] Fix PortId handling in BMCA

2022-11-14 Thread Luigi Mantellini
During the test I noticed that PortNumber is not correctly handled by BMCA. The ITU-T G.8275.2 is a little bit generic on PortId comparison criteria and the actual LinuxPTP implementation just uses a memcmp() call. This implementation doesn't consider the endianes of PortNumber value

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

2022-11-14 Thread Miroslav Lichvar
On Mon, Nov 14, 2022 at 04:34:05AM -0800, Hal Murray wrote: > Is there a URL for the spec? I don't want an RFC. Good comments in a header > file may be enough. A separate document may be better if there are > complications that need explaining. Here is the structure of the message with some

[Linuxptp-devel] [PATCH] config: Fix -Wformat-truncation warnings.

2022-11-14 Thread Miroslav Lichvar
Check the snprintf() return value in order to avoid the following warnings from gcc: config.c: In function ‘config_create’: config.c:921:52: warning: ‘%s’ directive output may be truncated writing up to 9679 bytes into a region of size 33 [-Wformat-truncation=] 921 |

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

2022-11-14 Thread Keller, Jacob E
> -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: [Linuxptp-devel] [PATCH 2/4] Add sock servo. > > > >> How specific is this to chronyd?

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 2/4] Add sock servo.

2022-11-14 Thread Keller, Jacob E
> -Original Message- > From: Maciek Machnikowski > Sent: Monday, November 14, 2022 10:55 PM > To: Keller, Jacob E > Cc: Hal Murray ; Miroslav Lichvar > ; linuxptp-devel@lists.sourceforge.net > Subject: Re: [Linuxptp-devel] [PATCH 2/4] Add sock servo. > > On Mon, Nov 14, 2022 at