Re: [Linuxptp-devel] [PATCH v3 4/6] Add a push notification for the CMLDS TLV.

2023-12-05 Thread Miroslav Lichvar
e as more events are added but it'd > keep syntax backwards-compatible for scripts. Good idea. The PARENT_DATA_SET notification is new too (added after 4.1) and I guess there is no reason to require even the original two notifications, so change that to "cnt < 1" wit

Re: [Linuxptp-devel] [PATCH v3 5/6] Implement the COMMON_P2P delay mechanism.

2023-12-04 Thread Miroslav Lichvar
On Mon, Dec 04, 2023 at 04:06:31PM +0100, Miroslav Lichvar wrote: > On Sat, Dec 02, 2023 at 03:38:18PM -0800, Richard Cochran wrote: > > --- a/config.c > > +++ b/config.c > > @@ -171,6 +171,7 @@ static struct config_enum delay_filter_enu[] = { > > > > static

Re: [Linuxptp-devel] [PATCH v3 5/6] Implement the COMMON_P2P delay mechanism.

2023-12-04 Thread Miroslav Lichvar
PORT_ITEM_STR("cmlds.client_address", "/var/run/cmlds_cleint"), Swapped e and i in "cleint" is not intentional, right? It's the same in the man page and the example default config. Other than that, the patchset looks ok to me. I didn't run any tests, just a quick loo

Re: [Linuxptp-devel] [PATCH v2] Add support for DELAY_REQ and SYNC packets RX filters

2023-11-29 Thread Miroslav Lichvar
On Tue, Nov 28, 2023 at 03:34:54PM -0800, Richard Cochran wrote: > On Tue, Nov 28, 2023 at 12:53:38PM +0100, Miroslav Lichvar wrote: > > However, timestamping only sync messages has an advantage with very > > large number of clients as they don't have timestamp each other's &g

Re: [Linuxptp-devel] [PATCH v2] Add support for DELAY_REQ and SYNC packets RX filters

2023-11-28 Thread Miroslav Lichvar
ent messages is very rare, ok, maybe it's not worth the trouble. However, timestamping only sync messages has an advantage with very large number of clients as they don't have timestamp each other's delay requets and timestamping of sync messages is more reliable. -- Miro

Re: [Linuxptp-devel] [PATCH] Add notification for changes in PARENT_DATA_SET.

2023-11-21 Thread Miroslav Lichvar
On Tue, Nov 21, 2023 at 08:52:30PM -0800, Richard Cochran wrote: > linuxptp-testsuite test 20-pmc now fails with > > "SUBSCRIBE_EVENTS_NP SET needs 4 values" > > Can you provide an update? Done. Thanks. -- Miroslav Lichvar _

Re: [Linuxptp-devel] [PATCH] Add support for DELAY_REQ and SYNC packets rx_filter

2023-11-20 Thread Miroslav Lichvar
the hardware supports the type-specific filters, I think ptp4l should be able to set it. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH] print: Support log level in message tag.

2023-11-14 Thread Miroslav Lichvar
If the string specified by the message_tag option contains "{level}", replace it with the log level of the message as a number. This allows users to filter printed log messages by their level. Signed-off-by: Miroslav Lichvar --- phc2sys.8 | 4 +++- prin

Re: [Linuxptp-devel] [PATCH] Add support for DELAY_REQ and SYNC packets rx_filter

2023-11-14 Thread Miroslav Lichvar
_XXX_SYNC or > HWTSTAMP_FILTER_PTP_XXX_DELAY_REQ rx filters for all transport levels. With this dynamic switching of the RX filter on port state changes is there a reason to not do it by default? Or instead of adding a new option add it as a new enum to the existing hwts_filter option? -- Miro

[Linuxptp-devel] [PATCH v2 2/4] pmc_agent: Make update interval configurable.

2023-11-14 Thread Miroslav Lichvar
to 30 second subscription duration) to avoid unnecessarily frequent renewals with the default update intervals of phc2sys and ts2phc, but still be reasonably fast in detecting missing responses. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 2 +- pmc_agent.c | 24

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

2023-11-14 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 v2 4/4] phc2sys: Stop synchronization when ptp4l stops responding.

2023-11-14 Thread Miroslav Lichvar
with ptp4l and make it evident, if the pmc subscription runs out, log an error message and stop synchronization in the domain until the pmc agent is subscribed again. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git

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

2023-11-14 Thread Miroslav Lichvar
of phc2sys to handle unresponsive ptp4l, e.g. stopped, crashed or accidentaly removed socket. The first three patches prepare the code for the actual handling implemented in the fifth patch. Miroslav Lichvar (4): pmc_agent: Add function to check if still subscribed. pmc_agent: Make update

[Linuxptp-devel] [PATCH v2 1/4] pmc_agent: Add function to check if still subscribed.

2023-11-14 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

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

2023-11-14 Thread Miroslav Lichvar
On Thu, Nov 09, 2023 at 10:54:31PM -0800, Richard Cochran wrote: > On Thu, Oct 26, 2023 at 02:40:11PM +0200, Miroslav Lichvar wrote: > > > @@ -942,8 +957,8 @@ static int auto_init_ports(struct domain *domain) > > } > > > > err = pmc_agent

[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

[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

[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

[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

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

2023-10-26 Thread Miroslav Lichvar
with ptp4l and make it evident, if the pmc subscription runs out, log an error message and stop synchronization in the domain until the pmc agent is subscribed again. Also shorten the minimum subscription interval from 180 seconds to 30 seconds to react faster. Signed-off-by: Miroslav Lichvar

Re: [Linuxptp-devel] [PATCH 1/1] port: set_tmo_log() timer interval calculation fix

2023-10-10 Thread Miroslav Lichvar
tmo.it_value.tv_nsec = ns % NS_PER_SEC; The fix looks good to me. Replacing the repeated subtraction with division also fixes a potential slowdown with large scales. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH] clock: Downgrade log message about failed uds forward.

2023-09-25 Thread Miroslav Lichvar
to disable it in the default log level. Signed-off-by: Miroslav Lichvar --- clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clock.c b/clock.c index 5a64613..74911fd 100644 --- a/clock.c +++ b/clock.c @@ -1585,7 +1585,7 @@ static void clock_forward_mgmt_msg(struc

[Linuxptp-devel] [PATCH] phc2sys: Fix -n option with -w.

2023-09-05 Thread Miroslav Lichvar
The domain number used for communication with ptp4l specified by the -n option is ignored in the non-automatic mode (-w option). Set the domain number to the last specified value. Fixes: 417de97d098b ("phc2sys: Add multi-domain synchronization.") Signed-off-by: Miroslav Lichvar ---

Re: [Linuxptp-devel] [PATCH] phc2sys: Avoid segfault with default UDS address.

2023-09-04 Thread Miroslav Lichvar
with -w. I'll submit a patch. Sorry for the bugs. Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] bug in phc2sys.c

2023-09-04 Thread Miroslav Lichvar
t;(uds_remote_cnt > 0)" to follow the coding style. Will you submit it as a git-formatted patch with subject and commit message, or would you prefer me to do it? Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.

[Linuxptp-devel] [PATCH] phc2sys: Improve logging with single domain.

2023-08-29 Thread Miroslav Lichvar
ronization to match the behavior of phc2sys before it supported multiple domains. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 2750691..313cdcf 100644 --- a/phc2sys.c +++ b/phc2sys.c

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-22 Thread Miroslav Lichvar
r driver is broken. It might need to decrease the frequency limit. The only reason your change "fixes" the problem is that it resets the frequency to a non-buggy range. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-22 Thread Miroslav Lichvar
On Mon, Aug 21, 2023 at 07:02:55PM +0200, Maciek Machnikowski wrote: > On 8/21/2023 2:04 PM, Miroslav Lichvar wrote: > > s->drift is the drift of the uncompensated clock. It's not supposed to be > > scaled by anything. > If that's the intended use - then the line 147:

Re: [Linuxptp-devel] [PATCH v1] pi: Fix drift history when entering SERVO_LOCKED state

2023-08-21 Thread Miroslav Lichvar
be to adjust the timestamps from E2E and recalculate the delay before stepping the clock. > This patch fixes the s->drift when entering the stable state to hold > the scaled drift. That looks wrong to me and in my test with a clock which has a large frequency e

Re: [Linuxptp-devel] [PATCH] PHC Index is invalid in phc2sys when ptp4l is in free_running mode.

2023-07-27 Thread Miroslav Lichvar
ts2phc instead of the slave event monitor. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH] PHC Index is invalid in phc2sys when ptp4l is in free_running mode.

2023-07-26 Thread Miroslav Lichvar
. But since ptp4l is free running mode, > pmc_agent_query_port_properties will not give the phc_index. > Ptp4l doesn’t know about PHC since it is not disciplining it. Well, to me that would seem like the right thing to do. The PHC is not synchronized, so phc2sys shouldn't be using it for synchroniz

Re: [Linuxptp-devel] [PATCH] PHC Index is invalid in phc2sys when ptp4l is in free_running mode.

2023-07-24 Thread Miroslav Lichvar
describe the use case? It's not clear to me why should be a free-running PHC adjusted or or used as a source clock. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

[Linuxptp-devel] [PATCH v1 2/4] phc2sys: Create pmc agent after processing options.

2023-07-20 Thread Miroslav Lichvar
Keep configuration settings in a separate domain and copy them to the actual domain just before creating the pmc agent. This will be needed to share the settings between multiple domains. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 43 --- 1 file

[Linuxptp-devel] [PATCH v1 4/4] phc2sys: Add multi-domain synchronization.

2023-07-20 Thread Miroslav Lichvar
modes only one domain is created for all clocks. Signed-off-by: Miroslav Lichvar --- phc2sys.8 | 12 +- phc2sys.c | 337 +- 2 files changed, 241 insertions(+), 108 deletions(-) diff --git a/phc2sys.8 b/phc2sys.8 index 6c6c7e8..9a37778 100644

[Linuxptp-devel] [PATCH v1 0/4] Add multi-domain synchronization to phc2sys

2023-07-20 Thread Miroslav Lichvar
ble a fallback on failures. The first three patches refactor the code to minimize the fourth patch adding the actual support. Miroslav Lichvar (4): phc2sys: Rename phc2sys_private to domain. phc2sys: Create pmc agent after processing options. phc2sys: Shallow do_loop(). phc2sys: Add multi-dom

[Linuxptp-devel] [PATCH v1 1/4] phc2sys: Rename phc2sys_private to domain.

2023-07-20 Thread Miroslav Lichvar
Rename the phc2sys_private structure to domain in preparation for support of multiple domains. While touching the lines of code, also rename master to source clock. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 326 +++--- 1 file changed, 163

[Linuxptp-devel] [PATCH v1 3/4] phc2sys: Shallow do_loop().

2023-07-20 Thread Miroslav Lichvar
Move the measurements and updates of clocks from do_loop() to separate function. Signed-off-by: Miroslav Lichvar --- phc2sys.c | 100 +- 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index d0f5adb

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-10 Thread Miroslav Lichvar
stats can be combined over any number of intervals as you like. If that is not acceptable for some reason, I'd prefer to add a new option to not reset the stats after printing instead of duplicating the functionality in a different place and printing the data in a different format. -- Mirosla

Re: [Linuxptp-devel] [PATCH v1] servo: Implement offset statistics

2023-07-10 Thread Miroslav Lichvar
ine servo performance. There is already the summary_interval option to print the offset statistics. Is that not sufficient? -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

[Linuxptp-devel] [PATCH] Add notification for changes in PARENT_DATA_SET.

2023-06-26 Thread Miroslav Lichvar
Add a new notification event for pmc clients to receive PARENT_DATA_SET when a change is made there. Signed-off-by: Miroslav Lichvar --- clock.c| 26 +++--- notification.h | 1 + pmc.c | 10 ++ pmc_common.c | 15 +++ 4 files changed

Re: [Linuxptp-devel] [Linuxptp-users] Quarterly release schedule

2023-06-12 Thread Miroslav Lichvar
ng new features and the rest focused on testing and stabilization? -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH] clock: Fix summary interval in free-running mode.

2023-05-18 Thread Miroslav Lichvar
In the free-running mode the stats are updated only once per the frequency estimation interval instead of once per sync message. The stats max_count calculation didn't account for that, which caused a reduced rate of printed summaries. Fix the calculation for this case. Signed-off-by: Miroslav

Re: [Linuxptp-devel] [PATCH] Fix power profile config option range to UINT32_MAX

2023-05-11 Thread Miroslav Lichvar
t value for one field, and so the test > suite would need the following change. The test is now updated. Thanks. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH] sk: Reset timestamping mode on exit, use locks

2023-05-09 Thread Miroslav Lichvar
or add a compatible mechanism in chronyd. Or again the user > would have to keep track of the shutdown order. Or make the cleanup part configurable (disabled by default)? -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-

Re: [Linuxptp-devel] [PATCH] sk: Reset timestamping mode on exit, use locks

2023-05-09 Thread Miroslav Lichvar
s using HW timestamping (e.g. chronyd). -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v3 0/6] Use precise frequency for TX SYNC messages

2023-04-26 Thread Miroslav Lichvar
, while with the current solution the interval can gradually increase with the load and stay within the limits under worse conditions. Instead of trying to make the interval constant I propose add extra randomness, maybe +/- 1%. This seems to be well within the spec. -- Miroslav Lichvar __

[Linuxptp-devel] [PATCH] Clear pending errors on sockets.

2023-04-26 Thread Miroslav Lichvar
e together with the descriptor index to make it easier to debug issues like this in future. Signed-off-by: Miroslav Lichvar --- clock.c | 6 -- sk.c| 14 ++ sk.h| 7 +++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/clock.c b/clock.c index 75d7c4

Re: [Linuxptp-devel] [PATCH v3 0/6] Use precise frequency for TX SYNC messages

2023-04-26 Thread Miroslav Lichvar
a test report not having a round number. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v3 0/6] Use precise frequency for TX SYNC messages

2023-04-26 Thread Miroslav Lichvar
n to collide in their transmissions times (which requires queueing and potentially impacts timestamp accuracy), this is more likely to repeat frequently. If anything, I'd expect more randomness to be added to the interval. -- Miroslav Lichvar ___ Li

Re: [Linuxptp-devel] [PATCH v2 0/1] Last (?) patch before version 4 release

2023-04-17 Thread Miroslav Lichvar
linuxptp-devel@lists.sourceforge.net/msg06420.html Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v2 0/1] Last (?) patch before version 4 release

2023-04-17 Thread Miroslav Lichvar
l": $ git grep 'header.control' msg.c:// m->header.control, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-16 Thread Miroslav Lichvar
might be accepted by the consumer. > To prevent such behavior - invalidate the SHM data when releasing the > SHM servo. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net

Re: [Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-16 Thread Miroslav Lichvar
rything is easier. If you reword the commit message, I'm ok with it. Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH v1] ntpshm: Invalidate SHM data before releasing the servo

2023-03-15 Thread Miroslav Lichvar
n of the system clock. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH] port: Don't switch to PHC with SW timestamping.

2023-03-15 Thread Miroslav Lichvar
is expected with SW timestamping and in the free-running mode. Fixes: afeabf3c90ed ("ptp4l: add VLAN over bond support") Signed-off-by: Miroslav Lichvar --- port.c | 1 + 1 file changed, 1 insertion(+) diff --git a/port.c b/port.c index 3453716..9746df8 100644 --- a/port.c +++ b/port.c

[Linuxptp-devel] [RFC PATCH] phc2sys: Add multi-domain synchronization.

2023-02-22 Thread Miroslav Lichvar
settings - split into multiple patches - ... Signed-off-by: Miroslav Lichvar --- phc2sys.c | 594 -- 1 file changed, 349 insertions(+), 245 deletions(-) diff --git a/phc2sys.c b/phc2sys.c index 19e8012..46499a2 100644 --- a/phc2sys.c +++ b

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

2023-02-21 Thread Miroslav Lichvar
On Mon, Feb 20, 2023 at 12:57:48PM -0800, Richard Cochran wrote: > ChangeLog > ~ > v6: > Add new configuration options into default.cfg and man page > Make pmc SET command ready for 2106 (Miroslav) > Use SPDX tag for new file tz.h Looks good to me. Thanks, --

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

2023-02-15 Thread Miroslav Lichvar
atop.timeOfNextJump.seconds_lsb = jump & 0x; + atop.timeOfNextJump.seconds_msb = jump >> 32; pmc_send_set_action(pmc, code, , sizeof(atop)); break; case MID_GRANDMASTER_SETTINGS_NP: The rest of the patchset looks good to me. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

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

2023-02-15 Thread Miroslav Lichvar
_MAX), > + PORT_ITEM_INT("power_profile.2011.networkTimeInaccuracy", 0, 0, > INT_MAX), > + PORT_ITEM_INT("power_profile.2017.totalTimeInaccuracy", 0x, 0, > INT_MAX), > + PORT_ITEM_INT("power_profile.grandmasterID", 0, 0, 0

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

2023-02-13 Thread Miroslav Lichvar
The lsb field of timeOfNextJump is unsigned, so it will overflow in year 2106 (in the TAI timescale). -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

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

2023-02-13 Thread Miroslav Lichvar
On Sun, Feb 12, 2023 at 07:40:36PM -0800, Richard Cochran wrote: > > > On Thu, Feb 02, 2023 at 11:52:09AM +0100, Miroslav Lichvar wrote: > > > > It would be nice to have the new options documented in the ptp4l man > > > > page. Please consider renaming tzto

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

2023-02-13 Thread Miroslav Lichvar
On Sat, Feb 11, 2023 at 07:51:27AM -0800, Richard Cochran wrote: > 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; > >

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

2023-02-07 Thread Miroslav Lichvar
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 --- unicast_client.c | 6 ++ unicast_service.c | 4 2 files changed, 10 insertions

[Linuxptp-devel] [PATCH v3 4/4] timemaster: Use refclock_sock servo with chrony.

2023-02-06 Thread Miroslav Lichvar
If chronyd is selected as the NTP program, use the SOCK refclock instead of SHM to improve security and reduce delay in receiving of samples. Signed-off-by: Miroslav Lichvar --- timemaster.8 | 10 - timemaster.c | 58 +++- 2 files changed

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

2023-02-06 Thread Miroslav Lichvar
as a more secure alternative to the NTP SHM, and updates timemaster to use it. Miroslav Lichvar (4): Remove obsolete statement in ptp4l man page. Add refclock_sock servo. timemaster: Replace shm_segment with refclock_id. timemaster: Use refclock_sock servo with chrony. config.c

[Linuxptp-devel] [PATCH v3 2/4] Add refclock_sock servo.

2023-02-06 Thread Miroslav Lichvar
with restricted access, while the shared memory segment (using a predictable key) can be created by untrusted users or applications if they can run before ptp4l/phc2sys and chronyd/ntpd, similarly to the issue with binding to an unprivileged TCP/UDP port. Signed-off-by: Miroslav Lichvar --- config.c

[Linuxptp-devel] [PATCH v3 1/4] Remove obsolete statement in ptp4l man page.

2023-02-06 Thread Miroslav Lichvar
The NTP SHM number is no longer the PTP domain number. It was made configurable and the default value is 0. Fixes: 3760f8b6537e ("Add option to set NTP SHM segment number.") Signed-off-by: Miroslav Lichvar --- ptp4l.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[Linuxptp-devel] [PATCH v3 3/4] timemaster: Replace shm_segment with refclock_id.

2023-02-06 Thread Miroslav Lichvar
Replace the shm_segment number with a more general refclock_id and shift by first_shm_index only in the SHM-specific context to allow other types of refclocks to be used. Signed-off-by: Miroslav Lichvar --- timemaster.c | 48 +++- 1 file changed, 27

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

2023-02-02 Thread Miroslav Lichvar
een with valgrind and address sanitizer. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

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

2023-02-01 Thread Miroslav Lichvar
.jumpSeconds = next->local_tai_offset - > tz->local_tai_offset; > + atop.timeOfNextJump.seconds_lsb = next->timestamp; > + } Is this intentionally not setting the _msb field, ignoring distant future? -- Miroslav Lichvar ___ Linuxptp-devel mailing list

[Linuxptp-devel] [PATCH v2 3/4] timemaster: Replace shm_segment with refclock_id.

2023-02-01 Thread Miroslav Lichvar
Replace the shm_segment number with a more general refclock_id and shift by first_shm_index only in the SHM-specific context to allow other types of refclocks to be used. Signed-off-by: Miroslav Lichvar --- timemaster.c | 48 +++- 1 file changed, 27

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

2023-02-01 Thread Miroslav Lichvar
with restricted access, while the shared memory segment (using a predictable key) can be created by untrusted users or applications if they can run before ptp4l/phc2sys and chronyd/ntpd, similarly to the issue with binding to an unprivileged TCP/UDP port. Signed-off-by: Miroslav Lichvar --- config.c

[Linuxptp-devel] [PATCHv2 0/4] Support for chrony SOCK refclock

2023-02-01 Thread Miroslav Lichvar
v2: - renamed servo to "refclock_sock" This patchset fixes a bug in man page, adds a new servo for the chrony SOCK refclock protocol as a more secure alternative to the NTP SHM, and updates timemaster to use it. Miroslav Lichvar (4): Remove obsolete statement in ptp4l man p

[Linuxptp-devel] [PATCH v2 4/4] timemaster: Use refclock_sock servo with chrony.

2023-02-01 Thread Miroslav Lichvar
If chronyd is selected as the NTP program, use the SOCK refclock instead of SHM to improve security and reduce delay in receiving of samples. Signed-off-by: Miroslav Lichvar --- timemaster.8 | 10 - timemaster.c | 58 +++- 2 files changed

[Linuxptp-devel] [PATCH v2 1/4] Remove obsolete statement in ptp4l man page.

2023-02-01 Thread Miroslav Lichvar
The NTP SHM number is no longer the PTP domain number. It was made configurable and the default value is 0. Fixes: 3760f8b6537e ("Add option to set NTP SHM segment number.") Signed-off-by: Miroslav Lichvar --- ptp4l.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

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

2023-01-30 Thread Miroslav Lichvar
me(clkid, ) < 0) > + if (clock_adjtime(clkid, ) < 0) { > pr_err("failed to adjust the clock: %m"); > + return -1; > + } Why not follow clockadj_get_freq() and simply exit here instead of trying to recover? What PHC/driver is expected

Re: [Linuxptp-devel] [PATCH] port: do not apply TS_LABEL_CHANGED when phc_from_cmdline is true

2022-11-24 Thread Miroslav Lichvar
ULT_DETECTED. There was a patch submitted for this issue and a similar issue with vclocks earlier: "port: Avoid faults with vclocks and PHC from command line." -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists

Re: [Linuxptp-devel] [PATCH] Don't re-arm fault clearing timer

2022-11-23 Thread Miroslav Lichvar
with the recovery. I completely missed that. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Re: [Linuxptp-devel] [PATCH] Don't re-arm fault clearing timer

2022-11-22 Thread Miroslav Lichvar
es) cause it to > repeatedly re-arm itself, potentially never clearing. Do you please provide an example where this makes a difference? -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/li

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

2022-11-22 Thread Miroslav Lichvar
VLAN over bond support") Signed-off-by: Miroslav Lichvar --- port.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/port.c b/port.c index 756ff3a..c88f1be 100644 --- a/port.c +++ b/port.c @@ -2685,10 +2685,13 @@ static void port_chang

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

2022-11-16 Thread Miroslav Lichvar
e. Thanks for submitting the patch. I think this patch conflicts with the clockcheck patchset. I'll update it and resend if this one is accepted earlier. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.

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

2022-11-14 Thread Miroslav Lichvar
o make an incompatible change, we can change the magic number. -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

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

2022-11-14 Thread Miroslav Lichvar
snprintf(buf, sizeof(buf), "%s.%s", section, name); | ^~~~~~ Signed-off-by: Miroslav Lichvar --- config.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index e454c91..e21cde7

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

2022-11-14 Thread Miroslav Lichvar
er issues with the patches, I can resend. > The implementation seems fine but its using an interface that was defined by > chrony. I suppose another application could implement the same interface > though.. ntpsec might be interested in implementing it. We'll see. --

[Linuxptp-devel] [PATCH 3/4] timemaster: Replace shm_segment with refclock_id.

2022-11-10 Thread Miroslav Lichvar
Replace the shm_segment number with a more general refclock_id and shift by first_shm_index only in the SHM-specific context to allow other types of refclocks to be used. Signed-off-by: Miroslav Lichvar --- timemaster.c | 48 +++- 1 file changed, 27

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

2022-11-10 Thread Miroslav Lichvar
This patchset fixes a bug in man page, adds a new servo for the chrony SOCK refclock protocol as a more secure alternative to the NTP SHM (the commit message describes the issue), and updates timemaster to use it. Miroslav Lichvar (4): Remove obsolete statement in ptp4l man page. Add sock

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

2022-11-10 Thread Miroslav Lichvar
if it doesn't exist yet, possibly under a non-root owner, there is no authentication of messages, and the protocol cannot be restarted if one side decides to remove and recreate the segment. Signed-off-by: Miroslav Lichvar --- chronysock.c| 163

[Linuxptp-devel] [PATCH 1/4] Remove obsolete statement in ptp4l man page.

2022-11-10 Thread Miroslav Lichvar
The NTP SHM number is no longer the PTP domain number. It was made configurable and the default value is 0. Fixes: 3760f8b6537e ("Add option to set NTP SHM segment number.") Signed-off-by: Miroslav Lichvar --- ptp4l.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[Linuxptp-devel] [PATCH 4/4] timemaster: Use sock servo with chrony.

2022-11-10 Thread Miroslav Lichvar
If chronyd is selected as the NTP program, use the SOCK refclock instead of SHM to improve security and reduce delay in receiving of samples. Signed-off-by: Miroslav Lichvar --- timemaster.8 | 10 - timemaster.c | 57 +++- 2 files changed

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

2022-10-27 Thread Miroslav Lichvar
ation. Nice feature. In a quick test, it printed the state correctly after setting it with "testptp -L". Do you plan to add also pin_set? -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists

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

2022-10-27 Thread Miroslav Lichvar
, 1, UINT8_MAX), > PORT_ITEM_INT("G.8275.portDS.localPriority", 128, 1, UINT8_MAX), > GLOB_ITEM_INT("gmCapable", 1, 0, 1), Looks good to me. Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH v3 3/4] Don't accept errors in clockadj_get_freq().

2022-10-24 Thread Miroslav Lichvar
Exit if an error is returned from the clock_adjtime() call in clockadj_get_freq(). No recoverable errors are expected. Signed-off-by: Miroslav Lichvar --- clockadj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clockadj.c b/clockadj.c index 957dc57..4c920b9 100644 --- a/clockadj.c

[Linuxptp-devel] [PATCH v3 4/4] Extend clockcheck to check for changes in frequency.

2022-10-24 Thread Miroslav Lichvar
step the clock. Signed-off-by: Miroslav Lichvar --- clock.c | 3 +++ clockcheck.c | 10 ++ clockcheck.h | 8 phc2sys.c| 3 +++ ptp4l.8 | 6 -- 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/clock.c b/clock.c index 46ac9c2..8177e77 100644

[Linuxptp-devel] [PATCH v3 0/4] Bug fix and improved clockcheck

2022-10-24 Thread Miroslav Lichvar
to consider the last frequency set by ptp4l/phc2sys in order to detect cases where multiple processes are trying to control the same clock due to a misconfiguration or bug. Miroslav Lichvar (4): phc2sys: Add clocks after processing configuration. Drop support for old kernels returning zero

[Linuxptp-devel] [PATCH v3 1/4] phc2sys: Add clocks after processing configuration.

2022-10-24 Thread Miroslav Lichvar
from command line and add them only after the configuration is complete. This also fixes the automatic mode to not add CLOCK_REALTIME twice. Fixes: 33ac7d25cd92 ("phc2sys: Allow multiple sink clocks") Signed-off-by: Miroslav Lichvar --- phc2sys.8 | 2 +- phc2

[Linuxptp-devel] [PATCH v3 2/4] Drop support for old kernels returning zero frequency.

2022-10-24 Thread Miroslav Lichvar
Kernels before 3.10 had a bug in reading of the system clock frequency, which was worked around by commit da347d7a36f2 ("ptp4l: Set clock frequency on start"). Drop this workaround and support for the old kernels to make clockadj_get_freq() useful. Signed-off-by: Miroslav Lichvar --

Re: [Linuxptp-devel] [PATCH v2 4/4] Extend clockcheck to check for changes in frequency.

2022-10-24 Thread Miroslav Lichvar
sanity check is disabled. The default is 2 (20%). If not, what would you suggest? Thanks, -- Miroslav Lichvar ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

[Linuxptp-devel] [PATCH v2 3/4] Don't accept errors in clockadj_get_freq().

2022-10-20 Thread Miroslav Lichvar
Exit if an error is returned from the clock_adjtime() call in clockadj_get_freq(). No recoverable errors are expected. Signed-off-by: Miroslav Lichvar --- clockadj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clockadj.c b/clockadj.c index 957dc57..4c920b9 100644 --- a/clockadj.c

[Linuxptp-devel] [PATCH v2 0/4] Bug fix and improved clockcheck

2022-10-20 Thread Miroslav Lichvar
set by ptp4l/phc2sys in order to detect cases where multiple processes are trying to control the same clock due to a misconfiguration or bug. Miroslav Lichvar (4): phc2sys: Add clocks after processing configuration. Drop support for old kernels returning zero frequency. Don't accept errors

  1   2   3   4   5   6   >