Dear fellow Engineers,

I have a server with 1 x Intel 1G NIC and 3 x Mellanox 100G NICs
The NICs are named as follows
eno1, eno2    (Intel NIC)             ( /dev/ptp0 and /dev/ptp1 resp.)
mlnx1. mlnx2 ( Mellanox NIC1)  ( /dev/ptp8 and /dev/ptp9 resp.)
mlnx3, mlnx4 ( Mellanox NIC2)  ( /dev/ptp2 and /dev/ptp3 resp.)
mlnx5, mlnx6 ( Mellanox NIC3)  ( /dev/ptp5 and /dev/ptp6 resp.)

My goal is to have PTP running on any one of the NIC ports and sync other
NICs to have the same hardware clock (All NICs support Hardware
timestamping)
This is my current solution :
1. Run ptp4l on Intel NIC card (eno2) (Can be any NIC port does not matter,
but at least one port must be connected to the GMC somehow) and sync the
system clock to the ptp hardware clock of that NIC port.
    $ ptp4l -f config_file -i eno2
    $ phc2sys -w -s eno2 -O 0 -n 127
2. Sync other NIC ports with the system clock using multiple instances of
phc2sys
    $ phc2sys -s CLOCK_REALTIME -c mlnx1 -O 0
    $ phc2sys -s CLOCK_REALTIME -c mlnx3 -O 0
    $ phc2sys -s CLOCK_REALTIME -c mlnx5 -O 0

There is a caveat here : I assume both the ports on the same NIC (mlnx1 and
mlnx2 for example) have the same hardware clock source even though under
/dev/ they are mapped to different ptp files i.e /dev/ptp8 and /dev/ptp9
respectively.

Is there another/better approach to solve my problem ?

INFO: I measure the time between two clocks, using
clock_gettime(phcClock1ID, &ts1) and clock_gettime(phcClock2ID, &ts2) and
print the difference ts2 - ts1 every second. The measurement thread is
running on an isolated core with FIFO 90 priority.
There are some jitters / unexpected outliers which I attribute to
measurement uncertainties / syscall jitter.
Does anyone have experience with this api and how much jitter in
nanoseconds is expected ?

-- 
Cheers
Prankur
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to