Running TimeKeeper with ConnectX-4

Version 10

    This is a quick overview of TimeKeeper by FSMLabs for time synchronization of Linux server with ConnectX-4 HW timestamping and GM Clock. The below is a description of PTP, TimeKeeper and its usages.

    In this post, the setup includes a GrandMaster clock connected to GPS Antenna, and a server with ConnectX-4 supporting HW timestamping that will act only as a PTP slave. Both are connected to a Mellanox SX6036 switch.

    TimeKeeper installation instructions can be found in TimeKeeper User Manual.






    TimeKeeper Installation

    1. Follow the installation procedure in the following TimeKeeper Manual.


    2. Here is an example of /etc/timekeeper.conf configuration file assuming the interface is cx4p2.






    3. Make sure PTP support is enabled on the interface:

    #ethtool -T cx4p2

    Time stamping parameters for cx4p2:


            hardware-transmit     (SOF_TIMESTAMPING_TX_HARDWARE)

            software-transmit     (SOF_TIMESTAMPING_TX_SOFTWARE)

            hardware-receive      (SOF_TIMESTAMPING_RX_HARDWARE)

            software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)

            software-system-clock (SOF_TIMESTAMPING_SOFTWARE)

            hardware-raw-clock    (SOF_TIMESTAMPING_RAW_HARDWARE)

    PTP Hardware Clock: 0

    Hardware Transmit Timestamp Modes:

            off                   (HWTSTAMP_TX_OFF)

            on                    (HWTSTAMP_TX_ON)

    Hardware Receive Filter Modes:

            none                  (HWTSTAMP_FILTER_NONE)

            all                   (HWTSTAMP_FILTER_ALL)



    4. Start the TimeKeeper:

    # sudo /etc/init.d/timekeeper start


    5. Make sure that TimeKeeper runs correctly. Check the following log files:






    • The first column states the time passed from every update since midnight January 1st, 1970.
    • The second column is the offset from the remote server in seconds.
    • /var/log/ -  0 stands for source 0 , 1 for source 1 etc. and it refers to the number of our card PTP device that you see in ethtool -T cx4p2:  "PTP Hardware Clock: 0".


    More detailed information about each column can be found in Timekeeper manual.