Hi,

Updated patch is attached. The patch is created for v3.1 tag but it is applying 
smoothly also to master branch.

Regards,
Marcin
________________________________________
From: Richard Cochran <richardcoch...@gmail.com>
Sent: 05 March 2021 3:27
To: Miklas, Marcin
Cc: linuxptp-users@lists.sourceforge.net
Subject: Re: [EXTERNAL] Re: [Linuxptp-users] Persistent gPTP Values

[EXTERNAL EMAIL]

On Fri, Feb 26, 2021 at 03:35:50PM +0000, Miklas, Marcin wrote:
> 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.

Looks good.

> Do I need to add some special check for automotive profile only?

No, it is fine as is.

Can you please post it again, including your Signed-off-by tag?

Thanks,
Richard

From 2614c9dea54ab21c111e70afcb2dd0bbd7a018a2 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

Signed-off-by: Marcin Miklas <marcin.mik...@harman.com>
---
 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