Re: [Linuxptp-devel] [PATCH] Add option to bind raw and UDP sockets to interface

2023-03-10 Thread Richard Cochran
On Fri, Mar 10, 2023 at 01:00:51PM +0200, Zaripov Kamil wrote: > This patch allows to set interface name in 'iface:bind' format where: > - 'iface' is network interface that supports PTP > - 'bind' is network interface to bind socket > This feature can be useful if you have one physical network inte

Re: [Linuxptp-devel] ts2phc: rising/falling edge discrimination, generic driver

2023-03-08 Thread Richard Cochran
On Wed, Mar 08, 2023 at 02:07:37PM +, Jürgen Appel via Linuxptp-devel wrote: > I noticed that the servo.c -code has a SERVO_LOCKED_STABLE state that is not > used. It is used. See clock.c and port.c. Thanks, Richard ___ Linuxptp-devel mailing l

Re: [Linuxptp-devel] ts2phc: rising/falling edge discrimination, generic driver

2023-03-08 Thread Richard Cochran
On Wed, Mar 08, 2023 at 02:07:37PM +, Jürgen Appel via Linuxptp-devel wrote: > After the user has set the PHC approximately to the intended time and offset: Not very user friendly. The software should do this automatically. > phc_ctl /dev/ptp3 -- set adjust $(grep -v '^#' > /usr/share/zonei

Re: [Linuxptp-devel] [PATCH] Return 1 from port_is_ieee8021as if asCapable true

2023-03-07 Thread Richard Cochran
On Tue, Mar 07, 2023 at 04:21:52PM +0100, Andrew Zaborowski wrote: > The (minor) problem this attempts to solve, and I didn't state that, > is the confusing semantics and reduced utility of port_is_ieee8021as > if one relies on the name. So there is no bug. Just the code is confusing, right? Th

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

2023-03-07 Thread Richard Cochran
On Tue, Mar 07, 2023 at 04:13:50PM +0100, Maciek Machnikowski wrote: > 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. As previously

Re: [Linuxptp-devel] [PATCH] Return 1 from port_is_ieee8021as if asCapable true

2023-03-06 Thread Richard Cochran
On Tue, Mar 07, 2023 at 12:54:55AM +0100, Andrew Zaborowski wrote: > It seems that port_is_ieee8021as(p) returning zero if p->as_capable == > ALWAYS_CAPABLE was originally intended for skipping checks in > port_capable but this is quite unclear. Maybe you should ask your Intel colleague what he ha

Re: [Linuxptp-devel] [PATCH] Set controlField to zero in message headers

2023-02-28 Thread Richard Cochran
On Tue, Feb 28, 2023 at 07:38:44PM +0100, Andrew Zaborowski wrote: > Hi Richard and Erez, > > On Tue, 28 Feb 2023 at 16:02, Richard Cochran > wrote: > > On Tue, Feb 28, 2023 at 09:36:07AM +0100, Erez wrote: > > > May break when using non Linuxptp, as far as

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

2023-02-28 Thread Richard Cochran
On Tue, Feb 28, 2023 at 12:03:15PM +0100, Maciek Machnikowski wrote: > Can we add it to the configs/ts2phc*.cfg for the 4.0 release? That is not a critical bug, IMO. Thanks, Richard ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net

Re: [Linuxptp-devel] [PATCH] Set controlField to zero in message headers

2023-02-28 Thread Richard Cochran
On Tue, Feb 28, 2023 at 09:36:07AM +0100, Erez wrote: > On Tue, 28 Feb 2023 at 01:49, Andrew Zaborowski > > Since the default behaviour changes, in principle this could break > > > > May break when using non Linuxptp, as far as I understand, linuxptp only > sets the field, but never checks the va

Re: [Linuxptp-devel] The new application 'tz2alt' is missed in .gitignore

2023-02-26 Thread Richard Cochran
On Mon, Feb 27, 2023 at 12:04:33AM +0100, Erez wrote: > Hi Richard, > > You forgot to add 'tz2alt' to .gitignore. Thanks, I'll add that in, Richard ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/li

Re: [Linuxptp-devel] [PATCH v6 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-02-26 Thread Richard Cochran
On Sat, Feb 25, 2023 at 02:35:23PM -0800, Hal Murray wrote: > > richardcoch...@gmail.com said: > >> + NTOHS(atoi->type); > >> + NTOHS(atoi->length); > > These two lines are wrong. The net/host conversion of type and length > > already happened in suffix_post_recv() in msg.c > > They may be wr

Re: [Linuxptp-devel] [PATCH v6 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-02-25 Thread Richard Cochran
On Mon, Feb 20, 2023 at 12:57:53PM -0800, Richard Cochran wrote: > +static int alttime_offset_post_recv(struct tlv_extra *extra) > +{ > + struct TLV *tlv = extra->tlv; > + struct alternate_time_offset_indicator_tlv *atoi = > + (struct alternate_time_offset_in

Re: [Linuxptp-devel] [PATCH 1/1] port: add ptpTimescale to the flag field for 802.1AS-2011

2023-02-24 Thread Richard Cochran
On Fri, Feb 24, 2023 at 02:25:03PM +, Woojung.Huh--- via Linuxptp-devel wrote: > Agree that 802.1AS-2011 and 802.1AS-2021-Cor1 are marked as All for > ptpTimescale. > However, this is updated (fixed) in 802.1AS-2020 to message type "Announce" > which aligns to 1588-2008 and 1588-2019. > May

[Linuxptp-devel] Code freeze for 4.0 release

2023-02-22 Thread Richard Cochran
Dear Devs, I'll be releasing 4.0 in the next day or two. I won't be taking any new stuff until after the release. If you have any last minute critical bug fixes, please let me know ASAP. Thanks, Richard ___ Linuxptp-devel mailing list Linuxptp-devel

[Linuxptp-devel] [PATCH v6 03/11] Introduce the power profile.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- config.c| 15 - configs/default.cfg | 5 + port.c | 53 + port_private.h | 3 +++ power_profile.h | 31 ++ ptp4l.8 | 38

[Linuxptp-devel] [PATCH v6 04/11] Add a custom management message for power profile settings.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- pmc.c| 15 +++ pmc_common.c | 37 + port.c | 20 +++- tlv.c| 20 tlv.h| 1 + 5 files changed, 92 insertions(+), 1 deletion(-) diff --git a/pmc.c

[Linuxptp-devel] [PATCH v6 11/11] Introduce a time zone helper program.

2023-02-20 Thread Richard Cochran
The ptp4l program supports up to four time zones via the ALTERNATE_TIME_OFFSET_INDICATOR TLV. Introduce a helper program that leverages the local time zone database to monitor for changes in daylight savings time and publishing them. Signed-off-by: Richard Cochran --- makefile | 7 +- tz2alt

[Linuxptp-devel] [PATCH v6 08/11] Add the ALTERNATE_TIME_OFFSET_NAME management message.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 21 +++- pmc.c| 9 + pmc_common.c | 56 +++- tlv.c| 11 +++ tlv.h| 5 + 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a

[Linuxptp-devel] [PATCH v6 06/11] Prepare clock based storage of up to four time zones.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 19 --- tz.h| 13 + 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tz.h diff --git a/clock.c b/clock.c index 1e51dd8..2d5b3eb 100644 --- a/clock.c +++ b/clock.c @@ -42,6 +42,7 @@ #include

[Linuxptp-devel] [PATCH v6 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 58 ++ tlv.h | 26 ++ 2 files changed, 84 insertions(+) diff --git a/tlv.c b/tlv.c index 66d797a..81982c6 100644 --- a/tlv.c +++ b/tlv.c @@ -78,6 +78,22 @@ static uint16_t

[Linuxptp-devel] [PATCH v6 10/11] pmc: Convert internal helper function into global method.

2023-02-20 Thread Richard Cochran
The function to set the alternate time offset name, a.k.a. time zone, will be used by the time zone stand alone program. Make the function into a public PMC method. Signed-off-by: Richard Cochran --- pmc_common.c | 5 ++--- pmc_common.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions

[Linuxptp-devel] [PATCH v6 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-02-20 Thread Richard Cochran
ocal Linux system time and the PHC clock are synchronized. Thanks, Richard Richard Cochran (11): Accept the full range for domainNumber. tlv: Encode and decode power profile TLVs. Introduce the power profile. Add a custom management message for power profile settings. tlv: Encode

[Linuxptp-devel] [PATCH v6 07/11] Add the ALTERNATE_TIME_OFFSET_PROPERTIES management message.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 70 +--- pmc.c| 17 + pmc_common.c | 27 +++- tlv.c| 21 util.h | 7 ++ 5 files changed, 137 insertions(+), 5 deletions

[Linuxptp-devel] [PATCH v6 01/11] Accept the full range for domainNumber.

2023-02-20 Thread Richard Cochran
" In addition, Table 2 of IEEE Std 1588-2019 presents an incoherent Swiss cheese of allowed ranges, depending sdoId and network transport. Avoid the standardized madness by allowing the user to simply choose any domainNumber they want. Signed-off-by: Richard Cochran --- config.c | 2 +- 1 file

[Linuxptp-devel] [PATCH v6 02/11] tlv: Encode and decode power profile TLVs.

2023-02-20 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 36 tlv.h | 24 2 files changed, 60 insertions(+) diff --git a/tlv.c b/tlv.c index 7a2a4fa..fb807e8 100644 --- a/tlv.c +++ b/tlv.c @@ -35,6 +35,7 @@ (tlv->length < sizeof(struc

[Linuxptp-devel] [PATCH v6 09/11] Implement the ALTERNATE_TIME_OFFSET_ENABLE management message.

2023-02-20 Thread Richard Cochran
If the local PTP management client enables a time zone, append the matching TLV to outgoing Announce messages. Signed-off-by: Richard Cochran --- clock.c | 80 ++-- clock.h | 8 ++ pmc.c| 8 ++ pmc_common.c | 17

Re: [Linuxptp-devel] [PATCH v5 07/11] Add the ALTERNATE_TIME_OFFSET_PROPERTIES management message.

2023-02-19 Thread Richard Cochran
On Wed, Feb 15, 2023 at 03:20:06PM +0100, Miroslav Lichvar wrote: > With this patch it works for me (new test in the testsuite): Thanks for the patch, and thanks for the super awesome test suite! It lets us develop with confidence. Richard ___ Linuxp

Re: [Linuxptp-devel] [PATCH 0/6] man pages: Spring Cleaning

2023-02-17 Thread Richard Cochran
On Thu, Feb 16, 2023 at 08:10:20PM -0800, Richard Cochran wrote: > Early on, around v1, there were about thirty configuration options, > and these were grouped into functional areas in the man page. At the > time, that made some kind of sense. > > Nowadays, the number of config

Re: [Linuxptp-devel] [PATCH v5 03/11] Introduce the power profile.

2023-02-16 Thread Richard Cochran
On Wed, Feb 15, 2023 at 03:15:13PM +0100, Miroslav Lichvar wrote: > On Tue, Feb 14, 2023 at 09:00:50PM -0800, Richard Cochran wrote: > > @@ -300,6 +308,11 @@ struct config_item config_tab[] = { > > GLOB_ITEM_DBL("pi_proportional_exponent", -0.3, -DBL_MAX, DBL_MA

[Linuxptp-devel] [PATCH 6/6] man pages: Bump date.

2023-02-16 Thread Richard Cochran
Signed-off-by: Richard Cochran --- phc2sys.8 | 2 +- pmc.8 | 2 +- ptp4l.8 | 2 +- ts2phc.8 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index 33c126e..6c6c7e8 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -1,4 +1,4 @@ -.TH PHC2SYS 8 "Ja

[Linuxptp-devel] [PATCH 4/6] Alphabetize configuration options in the pmc man page.

2023-02-16 Thread Richard Cochran
Signed-off-by: Richard Cochran --- pmc.8 | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pmc.8 b/pmc.8 index 2659f3e..f2b6ad7 100644 --- a/pmc.8 +++ b/pmc.8 @@ -145,10 +145,6 @@ options. The name of the section is the name of the configured port (e.g. The domain

[Linuxptp-devel] [PATCH 1/6] Alphabetize configuration options in the ptp4l man page.

2023-02-16 Thread Richard Cochran
Signed-off-by: Richard Cochran --- ptp4l.8 | 1125 ++- 1 file changed, 618 insertions(+), 507 deletions(-) diff --git a/ptp4l.8 b/ptp4l.8 index 8b477f0..484793e 100644 --- a/ptp4l.8 +++ b/ptp4l.8 @@ -142,93 +142,68 @@ See UNICAST DISCOVERY

[Linuxptp-devel] [PATCH 5/6] Alphabetize configuration options in the ts2phc man page.

2023-02-16 Thread Richard Cochran
Signed-off-by: Richard Cochran --- ts2phc.8 | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/ts2phc.8 b/ts2phc.8 index c64a50b..658457d 100644 --- a/ts2phc.8 +++ b/ts2phc.8 @@ -124,12 +124,14 @@ changing the clock frequency (phase when using

[Linuxptp-devel] [PATCH 3/6] Alphabetize configuration options in the phc2sys man page.

2023-02-16 Thread Richard Cochran
Signed-off-by: Richard Cochran --- phc2sys.8 | 122 +++--- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index b686d72..33c126e 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -262,12 +262,38 @@ sets the program

[Linuxptp-devel] [PATCH 0/6] man pages: Spring Cleaning

2023-02-16 Thread Richard Cochran
page is chaotic at best. With so many options, the only sane ordering is alphabetical. When alphabetizing, I did a sanity check that the context wasn't changed by doing: sort ptp4l.8 > before (hack) sort ptp4l.8 > after diff -u before after Richard Cochran (6):

[Linuxptp-devel] [PATCH 2/6] Remove stray copy/pasteo from the phc2sys man page.

2023-02-16 Thread Richard Cochran
--- phc2sys.8 | 5 - 1 file changed, 5 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index e6d9675..b686d72 100644 --- a/phc2sys.8 +++ b/phc2sys.8 @@ -279,11 +279,6 @@ stepping). Relevant only with software time stamping. The default is 1 .B \-x (see above). -The maximum logging level

Re: [Linuxptp-devel] [PATCH v2 1/4] clockadj: return error if failed to adjust clock

2023-02-14 Thread Richard Cochran
On Mon, Feb 13, 2023 at 01:24:27PM +, Wojtek Wasko via Linuxptp-devel wrote: > Current clockadj code only prints a message in case the kernel returns > an error for a clock adjustment and prevents the higher-level code from > reacting to failure. > > Signed-off-by: Wojciech Wasko Series appl

[Linuxptp-devel] [PATCH v5 02/11] tlv: Encode and decode power profile TLVs.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 36 tlv.h | 24 2 files changed, 60 insertions(+) diff --git a/tlv.c b/tlv.c index 7a2a4fa..fb807e8 100644 --- a/tlv.c +++ b/tlv.c @@ -35,6 +35,7 @@ (tlv->length < sizeof(struc

[Linuxptp-devel] [PATCH v5 08/11] Add the ALTERNATE_TIME_OFFSET_NAME management message.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 21 +++- pmc.c| 9 + pmc_common.c | 56 +++- tlv.c| 11 +++ tlv.h| 5 + 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a

[Linuxptp-devel] [PATCH v5 11/11] Introduce a time zone helper program.

2023-02-14 Thread Richard Cochran
The ptp4l program supports up to four time zones via the ALTERNATE_TIME_OFFSET_INDICATOR TLV. Introduce a helper program that leverages the local time zone database to monitor for changes in daylight savings time and publishing them. Signed-off-by: Richard Cochran --- makefile | 7 +- tz2alt

[Linuxptp-devel] [PATCH v5 03/11] Introduce the power profile.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- config.c| 15 +- port.c | 53 + port_private.h | 3 +++ power_profile.h | 31 + tlv.h | 8 5 files changed, 109 insertions(+), 1

[Linuxptp-devel] [PATCH v5 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 58 ++ tlv.h | 26 ++ 2 files changed, 84 insertions(+) diff --git a/tlv.c b/tlv.c index 66d797a..81982c6 100644 --- a/tlv.c +++ b/tlv.c @@ -78,6 +78,22 @@ static uint16_t

[Linuxptp-devel] [PATCH v5 01/11] Accept the full range for domainNumber.

2023-02-14 Thread Richard Cochran
" In addition, Table 2 of IEEE Std 1588-2019 presents an incoherent Swiss cheese of allowed ranges, depending sdoId and network transport. Avoid the standardized madness by allowing the user to simply choose any domainNumber they want. Signed-off-by: Richard Cochran --- config.c | 2 +- 1 file

[Linuxptp-devel] [PATCH v5 10/11] pmc: Convert internal helper function into global method.

2023-02-14 Thread Richard Cochran
The function to set the alternate time offset name, a.k.a. time zone, will be used by the time zone stand alone program. Make the function into a public PMC method. Signed-off-by: Richard Cochran --- pmc_common.c | 5 ++--- pmc_common.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions

[Linuxptp-devel] [PATCH v5 06/11] Prepare clock based storage of up to four time zones.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 19 --- tz.h| 26 ++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 tz.h diff --git a/clock.c b/clock.c index e9072ab..2c9e3f3 100644 --- a/clock.c +++ b/clock.c @@ -42,6 +42,7

[Linuxptp-devel] [PATCH v5 07/11] Add the ALTERNATE_TIME_OFFSET_PROPERTIES management message.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 70 +--- pmc.c| 17 + pmc_common.c | 24 +- tlv.c| 21 util.h | 7 ++ 5 files changed, 134 insertions(+), 5 deletions(-) diff

[Linuxptp-devel] [PATCH v5 09/11] Implement the ALTERNATE_TIME_OFFSET_ENABLE management message.

2023-02-14 Thread Richard Cochran
If the local PTP management client enables a time zone, append the matching TLV to outgoing Announce messages. Signed-off-by: Richard Cochran --- clock.c | 80 ++-- clock.h | 8 ++ pmc.c| 8 ++ pmc_common.c | 17

[Linuxptp-devel] [PATCH v5 04/11] Add a custom management message for power profile settings.

2023-02-14 Thread Richard Cochran
Signed-off-by: Richard Cochran --- pmc.c| 15 +++ pmc_common.c | 37 + port.c | 20 +++- tlv.c| 20 tlv.h| 1 + 5 files changed, 92 insertions(+), 1 deletion(-) diff --git a/pmc.c

[Linuxptp-devel] [PATCH v5 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-02-14 Thread Richard Cochran
t computes the values from the local time and the Linux time zone data base and then sends the values to ptp4l. This method assumes that the local Linux system time and the PHC clock are synchronized. Thanks, Richard Richard Cochran (11): Accept the full range for domainNumber. t

Re: [Linuxptp-devel] [PATCH v4 11/11] Introduce a time zone helper program.

2023-02-14 Thread Richard Cochran
On Mon, Feb 13, 2023 at 12:11:08PM +0100, Miroslav Lichvar wrote: > The lsb field of timeOfNextJump is unsigned, so it will overflow in > year 2106 (in the TAI timescale). Some of the power industry equipment lasts 30 or 40 years (except in California where they make it out of sugar, and it melts

Re: [Linuxptp-devel] [PATCH v4 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-02-12 Thread Richard Cochran
On Sun, Feb 12, 2023 at 07:37:38PM -0800, Richard Cochran wrote: > On Sat, Feb 11, 2023 at 08:04:27AM -0800, Richard Cochran wrote: > > On Thu, Feb 02, 2023 at 11:52:09AM +0100, Miroslav Lichvar wrote: > > > On Sat, Jan 28, 2023 at 02:43:41PM -0800, Richard Cochran wrote: > &g

Re: [Linuxptp-devel] [PATCH v4 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-02-12 Thread Richard Cochran
On Sat, Feb 11, 2023 at 08:04:27AM -0800, Richard Cochran wrote: > On Thu, Feb 02, 2023 at 11:52:09AM +0100, Miroslav Lichvar wrote: > > On Sat, Jan 28, 2023 at 02:43:41PM -0800, Richard Cochran wrote: > > > The Power Profile specifies two new TLVs: > > > > It

Re: [Linuxptp-devel] [PATCH] Handle error returned by kernel for clock adjustments

2023-02-12 Thread Richard Cochran
On Mon, Jan 30, 2023 at 03:39:45PM +, Wojtek Wasko via Linuxptp-devel wrote: > Current code only prints a message in case the kernel returns an error > for a clock adjustment. Failing to adjust clock leads to an inconsistent > state in which a servo continues to report "locked" state while the

Re: [Linuxptp-devel] [PATCH] unicast: Avoid undefined integer shifts.

2023-02-12 Thread Richard Cochran
On Tue, Feb 07, 2023 at 03:16:15PM +0100, Miroslav Lichvar wrote: > Deny client requests and ignore server responses that have > logInterMessagePeriod outside of [-30..30] to avoid undefined > integer shifts in calculation of the interval. > > Signed-off-by: Miroslav Lichvar Applied. Thanks, Ri

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

2023-02-12 Thread Richard Cochran
On Wed, Feb 08, 2023 at 05:51:08PM +0100, Maciek Machnikowski wrote: > Current implementation of generic pps source relies on the UTC-TAI offset read > from system. Some OSes don't set that offset by default and return 0. In such > case ts2phc sets PHC time to UTC timescale without notifying user.

Re: [Linuxptp-devel] [PATCH v4 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-02-11 Thread Richard Cochran
On Thu, Feb 02, 2023 at 11:52:09AM +0100, Miroslav Lichvar wrote: > On Sat, Jan 28, 2023 at 02:43:41PM -0800, Richard Cochran wrote: > > The Power Profile specifies two new TLVs: > > It would be nice to have the new options documented in the ptp4l man > page. Please consider

Re: [Linuxptp-devel] [PATCH v4 11/11] Introduce a time zone helper program.

2023-02-11 Thread Richard Cochran
On Wed, Feb 01, 2023 at 04:52:15PM +0100, Miroslav Lichvar wrote: > > + if (next) { > > + atop.jumpSeconds = next->local_tai_offset - > > tz->local_tai_offset; > > + atop.timeOfNextJump.seconds_lsb = next->timestamp; > > + } > > Is this intentionally not setting the _msb

Re: [Linuxptp-devel] [PATCH v4 06/11] Prepare clock based storage of up to four time zones.

2023-02-11 Thread Richard Cochran
On Wed, Feb 01, 2023 at 02:41:03PM +, Geva, Erez wrote: > Perhaps we can use SPDX, like the Linux kernel do? > https://www.kernel.org/doc/html/latest/process/license-rules.html > https://spdx.dev/ Yes, going forward, let's leave off the boilerplate. I'll fix that. Thanks, Richard

Re: [Linuxptp-devel] [PATCH v4 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-02-11 Thread Richard Cochran
On Wed, Feb 01, 2023 at 02:47:01PM +, Geva, Erez wrote: > I understand the idea in general. > And I understand the files in the TLVs are unaligned. right, not my fault. Profile authors are to blame. > But Does htonl() and ntohl() have problem with alignment? on some machines, yes. Thanks,

Re: [Linuxptp-devel] [PATCH v3 0/4] Support for chrony SOCK refclock

2023-02-06 Thread Richard Cochran
On Mon, Feb 06, 2023 at 04:45:28PM +0100, Miroslav Lichvar wrote: > v3: > - fixed order of new entry in config_tab > - fixed renamed option in man pages > - changed default refclock_sock_address to /var/run/refclock.ptp.sock > > v2: > - renamed servo to "refclock_sock" > > This patchset fixes a b

Re: [Linuxptp-devel] [PATCH] port: start sync rx timer on grant

2023-02-06 Thread Richard Cochran
On Fri, Jan 27, 2023 at 05:58:24AM -0800, Vadim Fedorenko via Linuxptp-devel wrote: > In case of broken network there is a possibility of having management > packets with proper data but absolute absence of sync packets. In such > case the selected best master will stuck in HAVE_SYDY state without

Re: [Linuxptp-devel] [PATCH] raw: Use BPF filter based on tcpdump syntax.

2023-02-06 Thread Richard Cochran
On Thu, Dec 22, 2022 at 06:36:19PM +0100, Sebastian Andrzej Siewior wrote: > Replace the hand written BPF code with something that has been created > by tcpdump based on a filter rule. This has the advantage that it can be > extended/ modified based text syntax and is safer to extend in regard to >

Re: [Linuxptp-devel] [PATCH 0/2] Improve performance of the nullf servo by using write_phase_mode

2023-02-05 Thread Richard Cochran
On Tue, Dec 20, 2022 at 01:36:39PM -0800, Rahul Rameshbabu via Linuxptp-devel wrote: > In the upstream linuxptp tree, the nullf servo has no way to transition to > the SERVO_LOCKED state except when the offset is zero. Transitioning to the > SERVO_LOCKED state is important for a servo that makes n

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

2023-02-05 Thread Richard Cochran
On Tue, Dec 13, 2022 at 11:11:41AM -0500, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > > Problem > === > Unselected master port may unintentionally continue to request > announce/sync/delay_resp packets. Expecting port with unselected master > to only maintain announce message

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

2023-02-05 Thread Richard Cochran
On Mon, Dec 12, 2022 at 12:47:59PM +0100, Maciek Machnikowski wrote: > 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 ti

Re: [Linuxptp-devel] [PATCH v4 1/4] [Interface Rate TLV] function to support get interface speed via ethtool

2023-02-05 Thread Richard Cochran
On Thu, Dec 29, 2022 at 11:53:20AM +0530, SyncMonk Technologies wrote: > When master and slave instance interacting with each other operating > at different interface speed, delay assymetry needs to be compensated > as described in G.8271 appendix V. Series applied. Thanks, Richard

Re: [Linuxptp-devel] [PATCH 0/3] unicast_client: stop sending CANCEL_UNICAST_TRANSMISSION for inactive services

2023-02-05 Thread Richard Cochran
On Tue, Dec 06, 2022 at 08:42:09PM -0500, vincent.cheng...@renesas.com wrote: > From: Vincent Cheng > > This patch set improves the sending of CANCEL_UNICAST_TRANSMISSION to cancel > service. > > Currently all entries in the unicast master table receive > CANCEL_UNICAST_TRANSMISSION > for anno

Re: [Linuxptp-devel] [PATCH] port: start sync rx timer on grant

2023-02-05 Thread Richard Cochran
On Thu, Feb 02, 2023 at 01:22:33PM -0500, Vincent Cheng wrote: > On Fri, Jan 27, 2023 at 05:58:24AM -0800, Vadim Fedorenko via Linuxptp-devel > wrote: > > In case of broken network there is a possibility of having management > > packets with proper data but absolute absence of sync packets. In suc

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

2023-02-05 Thread Richard Cochran
On Wed, Feb 01, 2023 at 10:36:33AM +0100, Miroslav Lichvar wrote: > @@ -232,6 +233,7 @@ struct config_item config_tab[] = { > PORT_ITEM_INT("boundary_clock_jbod", 0, 0, 1), > PORT_ITEM_ENU("BMCA", BMCA_PTP, bmca_enu), > GLOB_ITEM_INT("check_fup_sync", 0, 0, 1), > + GLOB_ITEM_

Re: [Linuxptp-devel] [PATCH 1/1] Add configurable VLAN tags for Ethernet

2023-01-30 Thread Richard Cochran
On Mon, Jan 30, 2023 at 04:55:26AM +, Magnus Armholt via Linuxptp-devel wrote: > Hi, > > The linux VLAN interface was a good idea and we tried it. > We are using the 1588 power profile 2011, and it states that the > device should receive untagged frames and frames with the configured VLAN ID

Re: [Linuxptp-devel] [PATCH v4 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-01-30 Thread Richard Cochran
On Mon, Jan 30, 2023 at 01:03:09PM +, Magnus Armholt wrote: > "All IEEE C37.238 messages shall be mapped into IEEE 802.1Q-tagged Ethernet > frames with configurable > priority and configurable VLAN ID. > The default priority shall be 4. The default VID shall be 0. > The full range of priori

[Linuxptp-devel] [PATCH v4 06/11] Prepare clock based storage of up to four time zones.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 19 --- tz.h| 26 ++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 tz.h diff --git a/clock.c b/clock.c index 134c7c3..767599b 100644 --- a/clock.c +++ b/clock.c @@ -42,6 +42,7

[Linuxptp-devel] [PATCH v4 09/11] Implement the ALTERNATE_TIME_OFFSET_ENABLE management message.

2023-01-28 Thread Richard Cochran
If the local PTP management client enables a time zone, append the matching TLV to outgoing Announce messages. Signed-off-by: Richard Cochran --- clock.c | 80 ++-- clock.h | 8 ++ pmc.c| 8 ++ pmc_common.c | 17

[Linuxptp-devel] [PATCH v4 10/11] pmc: Convert internal helper function into global method.

2023-01-28 Thread Richard Cochran
The function to set the alternate time offset name, a.k.a. time zone, will be used by the time zone stand alone program. Make the function into a public PMC method. Signed-off-by: Richard Cochran --- pmc_common.c | 5 ++--- pmc_common.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions

[Linuxptp-devel] [PATCH v4 04/11] Add a custom management message for power profile settings.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- pmc.c| 15 +++ pmc_common.c | 37 + port.c | 20 +++- tlv.c| 20 tlv.h| 1 + 5 files changed, 92 insertions(+), 1 deletion(-) diff --git a/pmc.c

[Linuxptp-devel] [PATCH v4 02/11] tlv: Encode and decode power profile TLVs.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 36 tlv.h | 24 2 files changed, 60 insertions(+) diff --git a/tlv.c b/tlv.c index 1c13460..29d0556 100644 --- a/tlv.c +++ b/tlv.c @@ -35,6 +35,7 @@ (tlv->length < sizeof(struc

[Linuxptp-devel] [PATCH v4 00/11] Profile support for IEEE C37.238-2011 and IEEE C37.238-2017

2023-01-28 Thread Richard Cochran
e and then sends the values to ptp4l. This method assumes that the local Linux system time and the PHC clock are synchronized. Thanks, Richard *** BLURB HERE *** Richard Cochran (11): Accept the full range for domainNumber. tlv: Encode and decode power profile TLVs. Introduce

[Linuxptp-devel] [PATCH v4 05/11] tlv: Encode and decode alternate time offset indicator TLVs.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- tlv.c | 58 ++ tlv.h | 26 ++ 2 files changed, 84 insertions(+) diff --git a/tlv.c b/tlv.c index 2e421ed..212414f 100644 --- a/tlv.c +++ b/tlv.c @@ -77,6 +77,22 @@ static uint16_t

[Linuxptp-devel] [PATCH v4 08/11] Add the ALTERNATE_TIME_OFFSET_NAME management message.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 21 +++- pmc.c| 9 + pmc_common.c | 56 +++- tlv.c| 11 +++ tlv.h| 5 + 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a

[Linuxptp-devel] [PATCH v4 11/11] Introduce a time zone helper program.

2023-01-28 Thread Richard Cochran
The ptp4l program supports up to four time zones via the ALTERNATE_TIME_OFFSET_INDICATOR TLV. Introduce a helper program that leverages the local time zone database to monitor for changes in daylight savings time and publishing them. Signed-off-by: Richard Cochran --- makefile | 7

[Linuxptp-devel] [PATCH v4 07/11] Add the ALTERNATE_TIME_OFFSET_PROPERTIES management message.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- clock.c | 70 +--- pmc.c| 17 + pmc_common.c | 24 +- tlv.c| 21 util.h | 7 ++ 5 files changed, 134 insertions(+), 5 deletions(-) diff

[Linuxptp-devel] [PATCH v4 01/11] Accept the full range for domainNumber.

2023-01-28 Thread Richard Cochran
" In addition, Table 2 of IEEE Std 1588-2019 presents an incoherent Swiss cheese of allowed ranges, depending sdoId and network transport. Avoid the standardized madness by allowing the user to simply choose any domainNumber they want. Signed-off-by: Richard Cochran --- config.c | 2 +- 1 file

[Linuxptp-devel] [PATCH v4 03/11] Introduce the power profile.

2023-01-28 Thread Richard Cochran
Signed-off-by: Richard Cochran --- config.c| 15 +- port.c | 53 + port_private.h | 3 +++ power_profile.h | 31 + tlv.h | 8 5 files changed, 109 insertions(+), 1

Re: [Linuxptp-devel] [PATCH v3 1/4] [Interface Rate TLV] function to support get interface speed via ethtool

2022-12-13 Thread Richard Cochran
On Tue, Dec 13, 2022 at 10:39:59AM +0530, Devasish Dey wrote: > > +struct sk_if_info { > > + bool valid; > It is better not to use bool in a structure, as the size is usually > int, i.e. 64 bits to hold 1 bit. Because we don't have huge arrays of these structs, the size isn't critical IMO.

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

2022-12-08 Thread Richard Cochran
On Fri, Dec 02, 2022 at 03:33:42PM -0500, vincent.cheng...@renesas.com wrote: > @@ -2015,6 +2027,8 @@ static void handle_state_decision_event(struct clock *c) > c->best = best; > c->best_id = best_id; > > + clock_update_parent_identity(c); Calling this unconditionally, regardles

Re: [Linuxptp-devel] [PATCH 0/1] Unselected master port may unintentionally continue to request announce/sync/delay_resp packets

2022-12-08 Thread Richard Cochran
On Fri, Dec 02, 2022 at 03:33:41PM -0500, vincent.cheng...@renesas.com wrote: > Problem > === > Unselected master port may unintentionally continue to request > announce/sync/delay_resp packets. > Expecting port with unselected master to only maintain announce messages. This detailed and cl

Re: [Linuxptp-devel] [PATCH v2] Don't re-arm fault clearing timer on unrelated netlink events

2022-12-07 Thread Richard Cochran
On Wed, Nov 23, 2022 at 03:50:30PM -0800, davidjm via Linuxptp-devel wrote: > Set the timer only when an event causes the port to transition to the > FAULTY state, rather than potentially re-arming the timeout when an > event occurs while the port was already FAULTY. > > Concretely this occurs whe

Re: [Linuxptp-devel] [PATCH] port: Avoid faults with vclocks and PHC from command line.

2022-12-07 Thread Richard Cochran
On Tue, Nov 22, 2022 at 05:07:16PM +0100, Miroslav Lichvar wrote: > After commit afeabf3c90ed ("ptp4l: add VLAN over bond support") the > TS_LABEL_CHANGED flag was set on link status changes when the used > PHC index was different from the PHC index of the interface. > > This caused the port to be

Re: [Linuxptp-devel] [PATCH 2/2] phc_ctl: use PTP_CLOCK_GETCAPS2 ioctl if available

2022-12-07 Thread Richard Cochran
On Thu, Nov 17, 2022 at 02:15:23PM -0800, Jacob Keller wrote: > On 11/17/2022 1:34 PM, Geva, Erez wrote: > > The problem is the fallback works only on build. > > But if the build system is newer than the running system, the fallback > > will fail, as you will use the PTP_CLOCK_GETCAPS2 which does

Re: [Linuxptp-devel] [PATCH] makefile: use conditional assignment for KBUILD_OUTPUT

2022-12-07 Thread Richard Cochran
On Wed, Nov 23, 2022 at 08:23:46AM +0800, changqing...@eng.windriver.com wrote: > From: Changqing Li > > Refer [1],from make 4.4, all variables that are marked as export will > also be passed to the shell started by the shell function. use "=" will > make KBUILD_OUTPUT always empty for shell func

Re: [Linuxptp-devel] [PATCH] remove C99 style loop variable declarations

2022-12-07 Thread Richard Cochran
On Wed, Nov 16, 2022 at 11:48:32AM -0800, Jacob Keller wrote: > When building the tlv.c file, the following warning may occur when > operating in C89 mode: Jacob, this patch doesn't apply any more. Can you rebase it please? Thanks, Richard ___ Linuxp

Re: [Linuxptp-devel] [PATCH v2] servo: stop rounding initial frequency to nearest ppb

2022-12-04 Thread Richard Cochran
On Mon, Nov 28, 2022 at 02:43:00PM -0800, Jacob Keller wrote: > The interface to the Linux kernel for adjusting clock frequencies is > specified in scaled parts per million, where the frequency field is parts > per million with a 16 bit binary fractional field. (Equivalently it is > parts per ~65 b

Re: [Linuxptp-devel] [PATCH] bmca: Correctly handle PortNumber in PortId comparison

2022-12-04 Thread Richard Cochran
On Fri, Nov 18, 2022 at 08:43:19AM +0100, Luigi Mantellini wrote: > From: Luigi Mantellini > > The PortId is defined as a couple of ClockId (an 8-bytes opaque) and the > PortNumber (UInterger16). > > The current implementation compares the entire PortId, consisting of ClockId > and PortNumber,

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

2022-12-04 Thread Richard Cochran
On Mon, Nov 14, 2022 at 01:06:11PM +0100, Miroslav Lichvar wrote: > 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

Re: [Linuxptp-devel] [PATCH] unicast: local priority for PTPv2 unicast GM

2022-12-04 Thread Richard Cochran
On Fri, Nov 11, 2022 at 07:53:46AM -0800, Vadim Fedorenko via Linuxptp-devel wrote: > The latest proposal for DC PTP Profile[1] provides logic to make load > balancing of unicast clients when running multiple GMs in active-active > mode. This patch adds this logic to ptp4l using already existing >

Re: [Linuxptp-devel] [PATCH] unciast_client: trigger BMCA upon CANCEL receive

2022-12-04 Thread Richard Cochran
On Fri, Nov 04, 2022 at 10:28:37AM -0700, Vadim Fedorenko via Linuxptp-devel wrote: > Cancel messages don't trigger BMCA leaving best GM select for the port. > In case when new Announces mesages are the same as they were before > Cancel, BMCA algorithm will select the same GM and the stae machine

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

2022-12-04 Thread Richard Cochran
On Wed, Nov 02, 2022 at 01:06:45PM -0400, izunna.otiji...@renesas.com wrote: > From: Izunna Otiji > > Signed-off-by: Izunna Otiji Applied. Thanks, Richard ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforg

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

2022-12-04 Thread Richard Cochran
On Wed, Nov 02, 2022 at 01:26:45PM -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. > > Signe

Re: [Linuxptp-devel] [PATCH] config: allow fractional freq_est_interval

2022-12-04 Thread Richard Cochran
On Thu, Oct 27, 2022 at 03:29:40AM -0700, Jacob Keller wrote: > The freq_est_interval value is documented as the time interval over which > to estimate the ratio between the local and peer clock frequencies when > operating in free_running mode. > > It is documented as a power of two in seconds, s

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

2022-12-03 Thread Richard Cochran
On Tue, Oct 18, 2022 at 05:08:27PM +0200, Maciek Machnikowski wrote: > Current implementation of generic pps source relies on the UTC-TAI offset read > from system. Some OSes don't set that offset by default and return 0. In such > case ts2phc sets PHC time to UTC timescale without notifying user.

<    1   2   3   4   5   6   7   8   9   10   >