CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit under 35 U.S.C. § 119(a)-(d) of United Kingdom Patent Application No. 2008745.8, filed on Jun. 9, 2020 and entitled “METHOD AND APPARATUS FOR SYNCHRONIZING DIFFERENT COMMUNICATION PORTS”. The above cited patent application is incorporated herein by reference in its entirety.

FIELD OF DISCLOSURE

The present disclosure concerns a method and a device for synchronizing different clocks associated with different network ports of a communicating computing device. It concerns more particularly systems having different ports, where at least one port is a master port synchronized with a server while at least a second port is a slave port synchronized with the master port.

BACKGROUND

The master port is connected to a communication network by a link associated to the port. The master port can communicate with a server acting as a synchronization server. In order to synchronize its clock with the clock of the synchronization server, the master clock implements a synchronization protocol, like PTP (Precision Time Protocol).

The slave port synchronizes its own clock with the clock of the master port using a synchronization process called discipline process. The discipline process is typically executed continuously in order to keep the slave clock synchronized with the master clock.

When the system is started, the master port synchronizes its clock with the synchronization server, using typically PTP. The slave port synchronizes its own clock with the clock of the master port using a discipline engine. The process takes typically a few tens of seconds to stabilize the clock in a synchronized state.

When running, the synchronization may be lost. For example, a failure may occur on the link between the master port and the network. In that case, the synchronization protocol ceases to operate and the master port loses its synchronization with the synchronization server. When the link recovers, the master port has to synchronize anew with the synchronization server, and then the slave port has to resynchronize with the master port. This process takes typically the same time as it takes at initialization. This is due, inter alia, to the fact that when the link is up, the connection implies some auto negotiation steps that affect the clock registers.

While this synchronization time might be considered acceptable at start-up, any improvement of the synchronization time after a transient synchronization loss is advantageous.

SUMMARY

The present disclosure has been devised to address one or more of the foregoing concerns. According to an aspect of the disclosure, when a synchronization loss is detected, it is determined which of the ports is desynchronized. At recovery, the desynchronized port is first synchronized with the other one, before resuming the synchronization processes. For example, if the master port suffers a link failure and loses its synchronization, the slave port continues to run freely. At recovery, the slave port is likely to be close to be still synchronized with the server, while the reconnection of the master port has introduced a perturbation of the master port clock. In this example, by introducing a first synchronization step of the master port to the slave port before resuming the synchronization of the master port with the synchronization server, the convergence time of this synchronization with the synchronization server is reduced.

According to a first aspect of the disclosure, there is provided a method of synchronization of a communication device comprising a first and second communication ports, each of the first and second communication port being associated with a respective first and second time system, the method comprising:a regular master synchronization process synchronizing regularly the first time system with an external synchronization server according to a time synchronization protocol;a regular slave synchronization process synchronizing regularly the second time system with the first-time system;detecting a loss of synchronization between the first and second time system;determining which of the first and second time system is desynchronized; and,synchronizing the desynchronized time system with the other one.

In an embodiment, the desynchronized time system is the first time system, and wherein the method further comprises afterward:resuming the regular master synchronization process.

In an embodiment, the method further comprises:suspending the regular slave synchronization process when the determined desynchronized time system is the second time system; andresuming the regular slave synchronization process after the step of synchronizing the desynchronized time system with the other one.

In an embodiment, detecting a loss of synchronization is made by detecting an offset between the first and second time system greater than a determined threshold.

In an embodiment, detecting a loss of synchronization is made by detecting a link failure on a port associated with a time system.

In an embodiment, upon detection of a link failure, the method comprises:enabling a flag to force the synchronization at link recovery; andmarking the port on which the link failure is detected as down.

In an embodiment, time protocol messages received are discarded before resuming the regular master synchronization process.

In an embodiment, time protocol messages carrying timestamps received are discarded before resuming the regular master synchronization process.

In an embodiment, the first and second time system use the same oscillator.

In an embodiment, the first and second time system use different oscillators.

According to another aspect of the disclosure, there is provided a computer program product for a programmable apparatus, the computer program product comprising a sequence of instructions for implementing a method according to the disclosure, when loaded into and executed by the programmable apparatus.

According to another aspect of the disclosure, there is provided a computer-readable storage medium storing instructions of a computer program for implementing a method according to the disclosure.

According to another aspect of the disclosure, there is provided a computer program which upon execution causes the method of the disclosure to be performed.

According to another aspect of the disclosure, there is provided a communication device comprising a first and second communication ports, each of the first and second communication port being associated with a respective first and second time system, the device comprising a processor configured for:executing a regular master synchronization process synchronizing regularly the first time system with an external synchronization server according to a time synchronization protocol;executing a regular slave synchronization process synchronizing regularly the second time system with the first-time system;detecting a loss of synchronization between the first and second time system;determining which of the first and second time system is desynchronized;andsynchronizing the desynchronized time system with the other one.

At least parts of the method according to the disclosure may be computer implemented. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit”, “module” or “system”. Furthermore, the present disclosure may take the form of a computer program product embodied in any tangible medium of expression having computer usable program code embodied in the medium.

Since the present disclosure can be implemented in software, the present disclosure can be embodied as computer-readable code for provision to a programmable apparatus on any suitable carrier medium. A tangible, non-transitory carrier medium may comprise a storage medium such as a floppy disk, a CD-ROM, a hard disk drive, a magnetic tape device or a solid-state memory device and the like. A transient carrier medium may include a signal such as an electrical signal, an electronic signal, an optical signal, an acoustic signal, a magnetic signal or an electromagnetic signal, e.g., a microwave or RF signal.

