Hi Richard,

In the meantime I created a patch for the issue. initial_delay works now when 
automotive-slave.cfg is used.

Please check if that is OK. Do I need to add some special check for automotive 
profile only? 

We also found another small issue regarding PTP_TIMESCALE flag in PDelayReq. 
According to gPTP specification it is "Reserved as TRUE, ignored on reception". 
linuxptp sends 0 there. This is causing problems with broadcom switch which 
doesn't ignore that field. So I guess both linuxptp and broadcom swich are not 
behaving 100% correctly :)

Regards,
Marcin

________________________________________
From: Richard Cochran <richardcoch...@gmail.com>
Sent: 26 February 2021 16:15
To: Miklas, Marcin
Cc: linuxptp-users@lists.sourceforge.net
Subject: [EXTERNAL] Re: [Linuxptp-users] Persistent gPTP Values

[EXTERNAL EMAIL]

On Fri, Feb 26, 2021 at 11:32:21AM +0000, Miklas, Marcin via Linuxptp-users 
wrote:

> In ptp4l source I found that the only code path the parameter is
> used is related to BCMA algorithm which is disabled in automotive
> profile.
>
> Did I just found a bug? Or there is other way to pass the initial
> path delay to ptp4?

I didn't review the code paths, but it sure sounds like a bug.  I've
found another problem with the automotive mode, namely that server
ports don't change their attributes after you set
GRANDMASTER_SETTINGS_NP.

In any case, the initial_delay configuration obtion is indeed the
correct way to set this.  The automotive mode could use some help.

Thanks,
Richard

From b9748758e6c62c23f26b83c65fa4cdb36d7dfbbf Mon Sep 17 00:00:00 2001
From: Marcin Miklas <marcin.mik...@harman.com>
Date: Fri, 26 Feb 2021 15:10:25 +0100
Subject: [PATCH] Fix --initial_delay for automotive profile

---
 clock.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clock.c b/clock.c
index a66d189..80df7cc 100644
--- a/clock.c
+++ b/clock.c
@@ -1142,6 +1142,10 @@ struct clock *clock_create(enum clock_type type, struct config *config,
 		return NULL;
 	}
 	c->initial_delay = dbl_tmv(config_get_int(config, NULL, "initial_delay"));
+	if (!tmv_is_zero(c->initial_delay)) {
+		tsproc_set_delay(c->tsproc, c->initial_delay);
+	}
+	c->path_delay = c->initial_delay;
 	c->master_local_rr = 1.0;
 	c->nrr = 1.0;
 	c->stats_interval = config_get_int(config, NULL, "summary_interval");
-- 
2.25.1

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to