Invert the frequency ratio estimation.
In 802.1AS-2011 the ratio is defined as master/local, so we should follow suit. Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
		
							parent
							
								
									829c785414
								
							
						
					
					
						commit
						1bb8ebbdc5
					
				
							
								
								
									
										4
									
								
								clock.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								clock.c
									
									
									
									
									
								
							@ -198,8 +198,8 @@ static enum servo_state clock_no_adjust(struct clock *c)
 | 
			
		||||
	 */
 | 
			
		||||
	origin2 = tmv_add(c->t1, tmv_add(c->c1, c->c2));
 | 
			
		||||
	if (f->ingress1) {
 | 
			
		||||
		ratio = tmv_dbl(tmv_sub(c->t2, f->ingress1)) /
 | 
			
		||||
			tmv_dbl(tmv_sub(origin2, f->origin1));
 | 
			
		||||
		ratio = tmv_dbl(tmv_sub(origin2, f->origin1)) /
 | 
			
		||||
			tmv_dbl(tmv_sub(c->t2, f->ingress1));
 | 
			
		||||
		pr_info("master offset %10lld s%d ratio %.9f path delay %10lld",
 | 
			
		||||
			c->master_offset, state, ratio, c->path_delay);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user