Re: [Linuxptp-devel] Planning release 3.2

2021-05-03 Thread Michael Walle
Hi Richard, Am 2021-03-06 22:32, schrieb Richard Cochran: Dear linuxptp developers and users, The time has come for another release. Starting today, a "code freeze" is in effect, where only bug fixes will be applied. In one week's time I'll release v3.2 of the software. did I miss

Re: [Linuxptp-devel] [PATCH] [RFC] Add CMake support

2021-04-21 Thread Michael Walle
Hi Luigi, there is no reasoning, why you need cmake in this RFC, just the diffs. Therefore, what is the additional value here compared to standard make. -michael ___ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net

Re: [Linuxptp-devel] [PATCH] ptp4l: version preparation for IEEE 1588-2019

2021-02-20 Thread Michael Walle
Am 2021-02-20 07:26, schrieb Yangbo Lu: IEEE 1588-2019 specified new UInteger4 type minorVersionPTP field in header, and minorVersionNumber data in portDS. It has the value 1 for IEEE 1588-2019, and has the value 0 for IEEE 1588-2008. This patch is to make versionNumber and minorVersionNumber

Re: [Linuxptp-devel] [PATCH] This code changes brings in the ability to program the acceptable clockClass threshold beyond which device will move to holdover/free-run. Default clockClass threshold is

2021-02-12 Thread Michael Walle
Am 2021-02-11 11:17, schrieb Karthikkumar V: Example Use-Case This is needed in the cases where T-SC/T-BC Slave might want to listen only on PRC clockCLass and anything beyond that might not be acceptible and would want to go to holdover (with SyncE backup or internal oscillator).

Re: [Linuxptp-devel] [PATCH 1/6] port: Don't assume transport from port number.

2021-01-26 Thread Michael Walle
Hi all, Am 2021-01-26 11:00, schrieb Miroslav Lichvar: In port_open(), don't assume that UDS ports always have to have a zero number. Check the transport directly to make make the code cleaner. What about creating a helper? Something like port_is_uds(struct *port)? That way the actual

Re: [Linuxptp-devel] [PATCH] improve port log messages

2021-01-05 Thread Michael Walle
Am 2021-01-05 04:17, schrieb Richard Cochran: On Tue, Jan 05, 2021 at 11:20:09AM +0900, Cliff Spradlin wrote: This sounds good to me. However, cid2str() uses static storage and there are several log messages that log information about multiple ports. You mean 2+ ports appear in the same

Re: [Linuxptp-devel] [RFC V2] Add IEEE 802.1AS-2011 time-aware bridge support

2020-03-26 Thread Michael Walle
mode? -michael Rodney -Original Message- From: Michael Walle Sent: Tuesday, March 24, 2020 3:38 AM To: Richard Cochran Cc: Rodney Cummings ; Erik Hons ; linuxptp-devel@lists.sourceforge.net Subject: [EXTERNAL] Re: [Linuxptp-devel] [RFC V2] Add IEEE 802.1AS-2011 time-aware bridge sup

Re: [Linuxptp-devel] [RFC V2] Add IEEE 802.1AS-2011 time-aware bridge support

2020-03-24 Thread Michael Walle
Am 2020-03-20 18:32, schrieb Richard Cochran: On Tue, Mar 17, 2020 at 04:41:14PM +, Rodney Cummings wrote: Recommendation: Keep to 802.1AS-2011 bridge for the upcoming patches. Okay. Recommendation: After 802.1AS-2011 bridge is in the Linuxptp master, NI runs the UNH-IOL Conformance

Re: [Linuxptp-devel] [Linuxptp-users] How do I implement Sync message receive timeout according to Automotive and 802.1 AS profiles?

2020-02-11 Thread Michael Walle
Hi all, Am 2019-09-26 16:53, schrieb Erik Hons: Hi Yangbo, > > May I have your suggestion here? To maintain gPTP time in software, > > I just copied kernel timecounter code into linuxptp for usage. > > Why? That sounds wrong. Regarding to physical clock adjustment, that's confusing. This

Re: [Linuxptp-devel] [PATCH] clock: Remove subscriber if an error occured.

2018-09-06 Thread Michael Walle
Am 2018-09-03 13:58, schrieb Richard Cochran: On Mon, Sep 03, 2018 at 01:44:19PM +0200, Michael Walle wrote: Sending event messages to sockets which are already disconnected, eg. a client connecting over UDS, subscribing to an event and disconnects. At the moment, the subscriber is only

Re: [Linuxptp-devel] Does the P2P TC work with gPTP end-station?

2018-09-06 Thread Michael Walle
Am 2018-09-05 13:27, schrieb Richard Cochran: On Wed, Sep 05, 2018 at 08:44:18AM +, Y.b. Lu wrote: Currently linuxptp supports 802.1AS end-station, but not supports time-aware bridge. We will have switch devices supporting PHC APIs and SO_TIMESTAMPING. Could I just run P2P TC config

Re: [Linuxptp-devel] event hooks implementation

2018-09-03 Thread Michael Walle
Am 2018-08-18 16:04, schrieb Richard Cochran: On Mon, Aug 06, 2018 at 05:29:09PM +0200, Michael Walle wrote: Would an implemention (like execute some shell scripts on specific events) inside linuxptp be accepted at all? No. Even though it seems like the easy way, in the end it will prove

Re: [Linuxptp-devel] [PATCH] clock: Remove subscriber if an error occured.

2018-09-03 Thread Michael Walle
Am 2018-08-18 15:50, schrieb Richard Cochran: On Tue, Jul 31, 2018 at 10:46:50AM +0200, Michael Walle wrote: If the uds transport returns an error, the subscriber is automatically removed. Can you please explain: a) the problem, and Sending event messages to sockets which are already

Re: [Linuxptp-devel] [PATCH] Add reverse sync measurement method.

2018-08-17 Thread Michael Walle
Am 17. August 2018 18:07:30 MESZ schrieb Richard Cochran : >On Tue, Aug 14, 2018 at 02:56:44PM +0200, Michael Walle wrote: >> AVnu specifies a measurement method to remotely measure the clock >> quality. Basically, this method sends Sync and/or Follow-up messages >on >> a

[Linuxptp-devel] [PATCH] Add reverse sync measurement method.

2018-08-14 Thread Michael Walle
-Quality-Measurement-1.0_Approved-for-Public-Release.pdf Signed-off-by: Michael Walle --- config.c | 3 +++ fd.h | 3 ++- p2p_tc.c | 4 port.c | 71 +++--- port.h | 17 ++ port_private.h

Re: [Linuxptp-devel] event hooks implementation

2018-08-06 Thread Michael Walle
[please keep my mail address on CC] Am 2018-08-06 16:53, schrieb Richard Cochran: On Mon, Aug 06, 2018 at 09:27:18AM +0200, Stephan Gatzka wrote: Hi! > I came up with the following solutions to this problem: >  (1) Poll the state using the unix domain socket and PTP messages >  (2) Extend

[Linuxptp-devel] event hooks implementation

2018-08-03 Thread Michael Walle
Hi, There is the need to inform an external program about the current state of PTP. Like for example in 802.1Qbv, if PTP looses sync, we need to switch to an emergency state (eg. unconditionally open all gates), or if we regain sync, the Qbv scheduler might be reloaded. I came up with the

[Linuxptp-devel] [PATCH] msg: Make timestamp_{post_recv, pre_send}() symmetric

2018-07-31 Thread Michael Walle
While the pre_send() converts the timestamp inside the packet, the post_recv() just copies (and converts) it into a special field inside the message structure. But it doesn't convert the timestamp inside the packet. Fix this. Signed-off-by: Michael Walle --- msg.c | 10 ++ 1 file

[Linuxptp-devel] [PATCH] clock: Remove subscriber if an error occured.

2018-07-31 Thread Michael Walle
If the uds transport returns an error, the subscriber is automatically removed. Signed-off-by: Michael Walle --- clock.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/clock.c b/clock.c index faf2dea..feda257 100644 --- a/clock.c +++ b/clock.c @@ -237,9 +237,9

Re: [Linuxptp-devel] tsproc misbehaviour

2018-07-17 Thread Michael Walle
Am 2018-07-17 17:32, schrieb Richard Cochran: On Tue, Jul 17, 2018 at 11:26:14AM +0200, Michael Walle wrote: ping? Sorry, I couldn't understand what you are trying to say. Should I propose a fix? Ie. there have to be two versions ot t1 and t2. One for the offset and one for the delay

Re: [Linuxptp-devel] tsproc misbehaviour

2018-07-17 Thread Michael Walle
Am 2018-07-09 17:29, schrieb Michael Walle: Hi, at least in case of a free-running P2P TC (I don't know if this is valid for the BC case), the tsproc mixes different measurements of the SYNC and the PDELAY packets: (1) tsproc_down_ts() in clock_synchronize() passes the timestamps of the SYNC

Re: [Linuxptp-devel] [PATCH] msg: inline net2host64() and host2net64()

2018-07-10 Thread Michael Walle
Am 2018-07-10 16:49, schrieb Richard Cochran: On Tue, Jul 10, 2018 at 11:55:44AM +0200, Michael Walle wrote: These functions are just wrappers. Make it possible for the compiler to optimize the calls when compiled with optimization. Are you sure? Compiled with -O? I've looked

[Linuxptp-devel] [PATCH] msg: inline net2host64() and host2net64()

2018-07-10 Thread Michael Walle
These functions are just wrappers. Make it possible for the compiler to optimize the calls when compiled with optimization. Signed-off-by: Michael Walle --- msg.c | 12 msg.h | 11 +-- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/msg.c b/msg.c index

[Linuxptp-devel] [PATCH v2 1/2] msg: Make msg_pre_send() and msg_post_recv() symmetrical

2018-07-10 Thread Michael Walle
the tlv_list and tlv_count. Signed-off-by: Michael Walle --- msg.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/msg.c b/msg.c index 6c20c97..d5b651f 100644 --- a/msg.c +++ b/msg.c @@ -174,6 +174,16 @@ static struct tlv_extra *msg_tlv_prepare(struct

[Linuxptp-devel] [PATCH v2 2/2] msg: Drop msg->tlv_count.

2018-07-10 Thread Michael Walle
The field is redundant with the length tlv_list. Replace it with a function msg_tlv_count() instead. This iterates over the tlv_list. The computational overhead should be small, because the lists are very short and the tlv_count is only used in management paths (yet). Signed-off-by: Michael Walle

Re: [Linuxptp-devel] [PATCH 1/2] msg: Make msg_pre_send() and msg_post_recv() symmetrical

2018-07-10 Thread Michael Walle
[forgot to reply all] Am 2018-07-10 06:38, schrieb Richard Cochran: On Thu, Jul 05, 2018 at 09:46:26AM +0200, Michael Walle wrote: @@ -193,6 +193,8 @@ static int suffix_post_recv(struct ptp_message *msg, int len) if (!ptr) return 0; + msg_tlv_recycle(msg

[Linuxptp-devel] tsproc misbehaviour

2018-07-09 Thread Michael Walle
Hi, at least in case of a free-running P2P TC (I don't know if this is valid for the BC case), the tsproc mixes different measurements of the SYNC and the PDELAY packets: (1) tsproc_down_ts() in clock_synchronize() passes the timestamps of the SYNC packet; i guess this is to calculate

[Linuxptp-devel] [PATCH 2/2] msg: Drop msg->tlv_count.

2018-07-05 Thread Michael Walle
The field is redundant with the length tlv_list. Replace it with a function msg_tlv_count() instead. This iterates over the tlv_list. The computational overhead should be small, because the lists are very short and the tlv_count is only used in management paths (yet). Signed-off-by: Michael Walle

[Linuxptp-devel] [PATCH 1/2] msg: Make msg_pre_send() and msg_post_recv() symmetrical

2018-07-05 Thread Michael Walle
the tlv_list and tlv_count. Signed-off-by: Michael Walle --- msg.c | 21 +++-- msg.h | 7 +++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/msg.c b/msg.c index 6c20c97..e408ea4 100644 --- a/msg.c +++ b/msg.c @@ -193,6 +193,8 @@ static int suffix_post_recv

Re: [Linuxptp-devel] [PATCH variant-1] Drop all TLVs in clock_forward_mgmt_msg()

2018-07-03 Thread Michael Walle
Am 2018-07-03 07:21, schrieb Richard Cochran: On Mon, Jun 25, 2018 at 05:06:49PM +0200, Michael Walle wrote: Since commit 7fe69e7ba0c3bdce88d3a89d5ed43d0b382ef022 management messages are dropped in some cases because the tlv_count isn't 1. Further analysis shows that this is the case when

Re: [Linuxptp-devel] [PATCH variant-1] Drop all TLVs in clock_forward_mgmt_msg()

2018-07-03 Thread Michael Walle
Am 2018-07-03 07:51, schrieb Richard Cochran: On Tue, Jul 03, 2018 at 07:45:04AM +0200, Michael Walle wrote: Ok. I'll look into that later. But still, don't you think its a better idea to duplicate the message instead of encode/decode it? I don't know. Is that what you have done in 'variant

Re: [Linuxptp-devel] [PATCH variant-1] Drop all TLVs in clock_forward_mgmt_msg()

2018-07-02 Thread Michael Walle
Am 3. Juli 2018 07:21:37 MESZ schrieb Richard Cochran : >On Mon, Jun 25, 2018 at 05:06:49PM +0200, Michael Walle wrote: >> Since commit 7fe69e7ba0c3bdce88d3a89d5ed43d0b382ef022 management >> messages are dropped in some cases because the tlv_count isn't 1. >> F

[Linuxptp-devel] [PATCH] clock: Fix memleak in clock_management_fill_response()

2018-06-26 Thread Michael Walle
If the message is ignored, the tlv_extra isn't freed. Fix this. Signed-off-by: Michael Walle --- clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clock.c b/clock.c index 7bbb848..79ef917 100644 --- a/clock.c +++ b/clock.c @@ -440,6 +440,7 @@ static int clock_management_fill_response

[Linuxptp-devel] [PATCH variant-2] Copy forwarded message in clock_forward_mgmt_msg()

2018-06-25 Thread Michael Walle
and - in the forwarding case - there is already one TLV in the list, which results in tlv_count being 2 and thus dropped in subsequent code. This patch fixes this behaviour by copying the message to avoid the network byte order to host byte order cycle. Signed-off-by: Michael Walle --- This is the second

[Linuxptp-devel] [PATCH variant-1] Drop all TLVs in clock_forward_mgmt_msg()

2018-06-25 Thread Michael Walle
recreate in msg_post_recv(). Signed-off-by: Michael Walle --- This is the first (not preferred) variant to fix this. It isn't that invasive as the second one. clock.c | 1 + msg.c | 18 -- msg.h | 7 +++ 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/clock.c

[Linuxptp-devel] [PATCH] Replace memcmp() with pid_eq() and cid_eq()

2018-06-21 Thread Michael Walle
Consistenly use the pid_eq() and cid_eq() helper functions. Move the functions into utils.h (making them inline functions) because they are used in multiple source files. Signed-off-by: Michael Walle --- clock.c| 13 - phc2sys.c | 5 ++--- port.c | 18