Hi Paul and Richard,

  We are in a similar boat where we have multiple Mellanox Connect X5/6 cards on a Dell server that will allocated to VMs as PCI passthru. The control NIC on the host which is also a Mellanox CX5 receives PTP signals from a PTP master clock. The PCI pass thru cards have no incoming PTP signals from the network. So Here's our approach

1. Use ptp4l to sync the Host's control NIC using PTP

2. Use phc2sys in automode on the host to sync the systemclock

3. The VMs launched on this hosts are KVMs. Linux kernel has a device module called ptp_kvm that emulates a PTP clock device inside the VM.4. So depending on the number of Connect X5/6 NICs sent via PCI passthu to this NIC, we launch multiple phc2sys daemons inside the VM. Each daemon would take the /dev/ptp_kvm device as source signal and the /dev/ptpN (or the NIC name) as the sink.

For this to work in the ubuntu VMS we just made copies of the systemd startup script for phc2sys (one for each NIC and appropriately renamed the script). Then in each script edited it to remove its dependency on ptp4l since that is not needed inside the VM

The logs suggested that the delay path was off by +/- 4ns which was acceptable for us.

Richard: Does this sound like a workable solution.. ?

--
cheers,

Hussam
(Hussamuddin Nasir)

Netlab & GENI Operations Team

-------------------------------------------------------------------
Laboratory for Adv. Networking  Phone  : (859)218-0059
James F Hardymon Building       Fax    : (859)323-3740
301 Rose Street, Rm 237         E-mail : na...@netlab.uky.edu
Lexington, KY 40506-0495        Web    : http://www.netlab.uky.edu

                        University of Kentucky
                        **********************
-------------------------------------------------------------------

On 11/12/20 12:55 PM, Richard Cochran wrote:
On Thu, Nov 12, 2020 at 10:01:57AM -0500, Paul Thomas wrote:

My first question is: does this seem like a reasonable setup?
Seems okay to me.  Bear in mind that routing the time signal through
phc2sys (and thus the Linux system time) introduces error at each step.

My
second question is around phc2sys, as can be seen above each host
needs to have phc2sys for each interface. Is there a way to configure
one instance of phc2sys for this? Or do I need to run two instances?
You need two instances.  If you were running ptp4l on both ports, then
you could use one phc2sys in "automatic" mode, but I'm afraid we have
no automatic mode for such a unique setup as yours.

If it's the latter does this mean I need to create another systemd
service file? I should say this is on Debian, where it comes with
/lib/systemd/system/phc2sys.service by default.
Yes, you need two unit files.

HTH,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to