From: Vincent Cheng <[email protected]>
The original intent of the delay_response_timeout submission was to kick servo
out of LOCKED state if a valid delay response was not received within the
configurable delay response timeout duration. In case of broken network there
may be an absolute absence of delay packets. In this scenario ptp4l log
messages do not indicate anything is wrong because the delay response timer is
only activated after LOCKED servo state.
This patch expands the delay_response_timeout feature to detect the lack of
delay response in UNLOCKED servo state.
Before patch:
$ sudo ./ptp4l -mqSf foo.cfg --delay_response_timeout 3
ptp4l[651.073]: port 1 (enp0s8): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[655.085]: port 1 (enp0s8): new foreign master 080027.fffe.fd0000-1
ptp4l[656.581]: port 1 (enp0s8): LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[656.581]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[656.581]: port 1 (enp0s8): assuming the grand master role
ptp4l[659.082]: selected best master clock 080027.fffe.fd0000
ptp4l[659.083]: foreign master not using PTP timescale
ptp4l[659.083]: port 1 (enp0s8): MASTER to UNCALIBRATED on RS_SLAVE
// ptp4l is stuck, no delay response timeout message
After patch:
$ sudo ./ptp4l -mqSf foo.cfg --delay_response_timeout 3
ptp4l[609.218]: port 1 (enp0s8): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[613.230]: port 1 (enp0s8): new foreign master 080027.fffe.fd0000-1
ptp4l[615.116]: port 1 (enp0s8): LISTENING to MASTER on
ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[615.117]: selected local clock 080027.fffe.799fc5 as best master
ptp4l[615.117]: port 1 (enp0s8): assuming the grand master role
ptp4l[617.235]: selected best master clock 080027.fffe.fd0000
ptp4l[617.235]: foreign master not using PTP timescale
ptp4l[617.235]: port 1 (enp0s8): MASTER to UNCALIBRATED on RS_SLAVE
ptp4l[621.414]: port 1 (enp0s8): delay response timeout
ptp4l[621.625]: port 1 (enp0s8): delay response timeout
ptp4l[621.836]: port 1 (enp0s8): delay response timeout
ptp4l[621.984]: port 1 (enp0s8): delay response timeout
Vincent Cheng (4):
port: Expand delay_response_timeout to detect absence of delay
response packets in UNLOCKED state
unicast: Add function to query if delay response granted for best
master
port: On transition to UNCALIBRATED/SLAVE only start delay request
timer if delay_resp was granted
unicast: Start delay request timer on delay response grant
port.c | 7 +++++--
unicast_client.c | 21 +++++++++++++++++++++
unicast_client.h | 9 +++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
--
2.34.1
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel