* } else if (p->phc_index >= 0 && * * p->phc_index != interface_phc_index(interface)) {* * if (rtnl_iface_has_vclock(interface_name(interface),* * p->phc_index)) {* * pr_info("%s: /dev/ptp%d is virtual clock",* * p->log_name, p->phc_index);* * interface_set_vclock(interface, p->phc_index);* * } else if (p->jbod) {* * pr_warning("%s: just a bunch of devices", p->log_name);* * p->phc_index = interface_phc_index(interface);* * } else if (phc_device) {* * pr_warning("%s: taking %s from the command line, "* * "not the attached ptp%d", p->log_name,* * phc_device, interface_phc_index(interface));* * p->phc_index = phc_index;* * p->phc_from_cmdline = 1; * * } else {* * pr_err("%s: PHC device mismatch", p->log_name);* * pr_err("%s: /dev/ptp%d requested, ptp%d attached",* * p->log_name, phc_index,* * interface_phc_index(interface));* * goto err_transport;* * } * * } *
This part of the code checks if VPHC is present using NetLink messages, it seems like we are not getting the expected response, hence failing to detect the VPHC. *On Wed, Nov 23, 2022 at 5:22 PM Amar B S <amarnagendr...@gmail.com <amarnagendr...@gmail.com>> wrote:* > > > > > *Hi Miroslav,I checked your patch and tried it, but in my setup, it's > failing well before the part of the code you have changed.The function > "rtnl_iface_has_vclock" determines whether the given clock is VPHC which is > failing and hence it exits during the Initialization phase itself. * > > > > > > > > > > > > > > *[root@supermicrodu1 ~]# ./ptp4l -f /etc/sysconfig/config_ptp.conf -m 2 -H > -l 6 -s -i sriov2 option slaveOnly is deprecated, please use clientOnly > insteadptp4l[175.953]: selected /dev/ptp8 as PTP clockptp4l[175.953]: port > 1 (sriov2): PHC device mismatchptp4l[175.953]: port 1 (sriov2): /dev/ptp8 > requested, ptp2 attachedptp4l[175.953]: failed to open port sriov2failed to > create a clockThanks,Amar B S* > > > *On Wed, Nov 23, 2022 at 1:25 PM Miroslav Lichvar <mlich...@redhat.com > <mlich...@redhat.com>> wrote:* > >> >> >> >> >> >> >> *On Wed, Nov 23, 2022 at 01:04:42PM +0530, Amar B S wrote: > Hi Miroslav, >> > > May I know on which kernel version, this was working fine? It turned >> out to be a linuxptp issue. See my patch on -devel.* > > > > >> >> >> * -- Miroslav Lichvar* >> >
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users