port_nrate_calculate() sampling the first ingress1 before slave clock
jumping, if the offset of master and slave is too large, this may
results in an extremly small nrate_ratio value, and cause the nagative
delay issue.
This patch delay the first ingress1 sampling until clock jump.
---
port.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/port.c b/port.c
index 3453716..6b9a118 100644
--- a/port.c
+++ b/port.c
@@ -1210,7 +1210,7 @@ static void port_nrate_calculate(struct port *p, tmv_t
origin, tmv_t ingress)
*/
p->pdr_missing = 0;
- if (tmv_is_zero(n->ingress1)) {
+ if (tmv_is_zero(n->ingress1) && (clock_servo_state(p->clock) ==
SERVO_JUMP)) {
n->ingress1 = ingress;
n->origin1 = origin;
return;
--
2.17.1
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel