Closed JunAnnLaiIntel closed 5 days ago
While this fixes the problem with logSyncInterval settings <= 0 and without the sleep() calls in the sample application, a client using the Clock Management API might also want to sleep for longer than one second between the jcl_status_wait
calls and would then immediately receive timeouts even though the proxy is still alive.
As an example, you could use the following settings:
logSyncInterval
: 2 in both ptp4l configurations (GM and slave)-i 2
(2 seconds of idle time)This leads to an immediate timeout ([jclklib][430847.137] Terminating: lost connection to jclklib Proxy
) after waking up from the sleep()
call.
Is this the expected behaviour or are there plans to allow arbitrary intervals between jcl_status_wait
API calls in a generic way?
While this fixes the problem with logSyncInterval settings <= 0 and without the sleep() calls in the sample application, a client using the Clock Management API might also want to sleep for longer than one second between the
jcl_status_wait
calls and would then immediately receive timeouts even though the proxy is still alive.As an example, you could use the following settings:
logSyncInterval
: 2 in both ptp4l configurations (GM and slave)- start the sample application with
-i 2
(2 seconds of idle time)This leads to an immediate timeout (
[jclklib][430847.137] Terminating: lost connection to jclklib Proxy
) after waking up from thesleep()
call.Is this the expected behaviour or are there plans to allow arbitrary intervals between
jcl_status_wait
API calls in a generic way?
Thank you for your feedback. Your concern is valid. We overlooked the possibility that users might set the clock synchronization interval to a very low value. We will discuss this and come up with a better design.
Steps to generate high load condition
add summary_interval -7 and logSyncInterval -7 in config file to make the ptp4l send more offset value in every second![image](https://github.com/intel-staging/libptpmgmt_iaclocklib/assets/49394711/a087095b-142a-449c-b45d-3a4a5ce177a0)
remove sleep(idle_time) in sample/jclk_test.cpp to remove the wait time for the sample application![image](https://github.com/intel-staging/libptpmgmt_iaclocklib/assets/49394711/72972cc7-6e23-4181-821c-c710dd90c8b6)
Tested with this patch and no client terminate issue observed under high load condition for long time.![image](https://github.com/intel-staging/libptpmgmt_iaclocklib/assets/49394711/50cef3c1-8db5-4614-893d-3e3baee5ac59)