Hi Richard, Thanks for your reply. Sorry for the log.
If you have observed, when clock is "free_running" the clock servo state always remains in "SERVO_UNLOCKED" this causes the port to always remain in "UNCALIBRATED" state. So when unicast master was changed the port was in "UNCALIBRATED" state. As the previous and new port state is same, "port_state_update()" never trigger "unicast_client_state_changed()". Is "free_running" clock meant to be "SERVO_UNLOCKED" always? What is major difference between "free_running" and clock servo " nullf"? Thanks & Regards, PavanKumar Lakote IP Department Loop Telecommunication International, Inc. Tel: +886-3-5787696 ext. 5104 -----Original Message----- From: Richard Cochran [mailto:richardcoch...@gmail.com] Sent: Tuesday, November 10, 2020 1:19 AM To: pavan-lakote Cc: linuxptp-users@lists.sourceforge.net Subject: Re: [Linuxptp-users] switchover fails when having multiple unicast master On Wed, Nov 04, 2020 at 10:25:12AM +0800, pavan-lakote wrote: > Below is the ptp4l configuration, > > [global] > > domainNumber 4 > > dscp_event 5 > > dscp_general 5 Your mailer is double spacing. That makes your logs hard to read. > ptp4l[4516445.706]: selected best master clock 000000.0000.000001 > <-1. initial selected best clock (1) okay... > ptp4l[4516445.706]: running in a temporal vortex > ptp4l[4516445.706]: updating UTC offset to 35 > ptp4l[4516445.706]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE > ptp4l[4516445.925]: port 1: unicast SYNC granted for 60 sec > <- 2. unicast syn request granted ... > ptp4l[4516445.925]: PI servo: sync interval 0.500 kp 0.862 ki 0.227357 > ptp4l[4516445.925]: port 1: unicast DELAY_RESP granted for 60 sec > <- 3. unicast delay-resp granted ... > ptp4l[4516449.375]: selected best master clock 000000.0000.000002-2 > <- 4. switch from previous selected clock(1)->(2) ... Hm, what made it switch? At this point, the port should transition from SLAVE to UNCALIBRATED, but it didn't. The change in port state in port_state_update() should trigger a call to unicast_client_state_changed(). > Below are the three issues I'm facing: > > 1. When switchover happens from master 1 to master 2, active services > like Sync and Delay-Resp should be cancelled from master 1 before sending > new service request to master 2. No need to cancel. Better to keep the subscription in case it switches back. > 2. Sometimes when switchover happens from Master 1 to Master 2 ptp4l > fails to send service request (Sync and Delay-Resp)to Master 2. Due to this > Sync from master 2 is never received and delay requests are never > responded. > > Above log shows this issue. Not sure why the port state did not change. > 3. After terminating the process I see that ptp4l never cancels active > service requests from all the masters. Yeah, that is true, but they time out anyhow. It isn't a big deal in practice. Thanks, Richard Loop Telecommunication International Loop-V4150 DS0 Cross Connect Multiplexer supports up to 504E1/672T1 worth of DS0 non-blocking cross connect matrix. The V4150 DS0 Cross Connect System can provide users with the high-density capacity up to 504 E1/T1, 24 T3MX3, or 8 STM-1 (OC-3). All interfaces are fully compliant for use with the relevant ETSI standards and ITU recommendations. In addition, Loop-V4150 with E1/T1 cards, through the protection relay shelf, is able to perform 1+1, 1:N and 1:1 redundancy switching to ensure the high-availability circuit system. For further arrangement and more information, please contact Loop Telecom. _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users