Add a configuration file option for the sync receive timeout.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit is contained in:
		
							parent
							
								
									7eef4101c9
								
							
						
					
					
						commit
						c6e046e2a2
					
				
							
								
								
									
										6
									
								
								config.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								config.c
									
									
									
									
									
								
							| @ -95,6 +95,12 @@ static enum parser_result parse_pod_setting(const char *option, | ||||
| 			return r; | ||||
| 		pod->announceReceiptTimeout = uval; | ||||
| 
 | ||||
| 	} else if (!strcmp(option, "syncReceiptTimeout")) { | ||||
| 		r = get_ranged_uint(value, &uval, 0, UINT8_MAX); | ||||
| 		if (r != PARSED_OK) | ||||
| 			return r; | ||||
| 		pod->syncReceiptTimeout = uval; | ||||
| 
 | ||||
| 	} else if (!strcmp(option, "transportSpecific")) { | ||||
| 		r = get_ranged_uint(value, &uval, 0, 0x0F); | ||||
| 		if (r != PARSED_OK) | ||||
|  | ||||
| @ -20,6 +20,7 @@ logSyncInterval		0 | ||||
| logMinDelayReqInterval	0 | ||||
| logMinPdelayReqInterval	0 | ||||
| announceReceiptTimeout	3 | ||||
| syncReceiptTimeout	0 | ||||
| delayAsymmetry		0 | ||||
| fault_reset_interval	4 | ||||
| neighborPropDelayThresh	20000000 | ||||
|  | ||||
							
								
								
									
										1
									
								
								ds.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								ds.h
									
									
									
									
									
								
							| @ -123,6 +123,7 @@ struct port_defaults { | ||||
| 	Integer8 logMinDelayReqInterval; | ||||
| 	Integer8 logMinPdelayReqInterval; | ||||
| 	UInteger8 announceReceiptTimeout; | ||||
| 	UInteger8 syncReceiptTimeout; | ||||
| 	UInteger8 transportSpecific; | ||||
| 	int path_trace_enabled; | ||||
| 	int follow_up_info; | ||||
|  | ||||
							
								
								
									
										1
									
								
								gPTP.cfg
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								gPTP.cfg
									
									
									
									
									
								
							| @ -19,6 +19,7 @@ logAnnounceInterval	1 | ||||
| logSyncInterval		-3 | ||||
| logMinPdelayReqInterval	0 | ||||
| announceReceiptTimeout	3 | ||||
| syncReceiptTimeout	3 | ||||
| delayAsymmetry		0 | ||||
| fault_reset_interval	4 | ||||
| neighborPropDelayThresh	800 | ||||
|  | ||||
							
								
								
									
										1
									
								
								port.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								port.c
									
									
									
									
									
								
							| @ -1283,6 +1283,7 @@ static int port_initialize(struct port *p) | ||||
| 	p->peerMeanPathDelay       = 0; | ||||
| 	p->logAnnounceInterval     = p->pod.logAnnounceInterval; | ||||
| 	p->announceReceiptTimeout  = p->pod.announceReceiptTimeout; | ||||
| 	p->syncReceiptTimeout      = p->pod.syncReceiptTimeout; | ||||
| 	p->transportSpecific       = p->pod.transportSpecific; | ||||
| 	p->logSyncInterval         = p->pod.logSyncInterval; | ||||
| 	p->logMinPdelayReqInterval = p->pod.logMinPdelayReqInterval; | ||||
|  | ||||
							
								
								
									
										7
									
								
								ptp4l.8
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								ptp4l.8
									
									
									
									
									
								
							| @ -148,6 +148,13 @@ The number of missed Announce messages before the last Announce messages | ||||
| expires. | ||||
| The default is 3. | ||||
| .TP | ||||
| .B syncReceiptTimeout | ||||
| The number of sync/follow up messages that may go missing before | ||||
| triggering a Best Master Clock election. This option is used for | ||||
| running in gPTP mode according to the 802.1AS-2011 standard. Setting | ||||
| this option to zero will disable the sync message timeout. | ||||
| The default is 0 or disabled. | ||||
| .TP | ||||
| .B transportSpecific | ||||
| The transport specific field. Must be in the range 0 to 255. | ||||
| The default is 0. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user