Re: [Linuxptp-users] Regression - phc2sys fails with certain PHC char dev filenames
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Vladimir O. <ol...@gm...> - 2021-11-12 17:09:43
|
On Fri, Nov 12, 2021 at 10:45:53AM -0600, Ed Branch wrote:
> On 11/12/21 10:36, Vladimir Oltean wrote:
> >
> > What is your use case for the char device symlinks exactly? The
> > canonical way of finding the PTP char device corresponding to an
> > interface is to use "ethtool -T eth0 | grep 'PTP Hardware Clock'".
> >
>
> There is no network interface associated with this clock. Similar to the
> following from the stock Debian 10 entry in
> /lib/udev/rules.d/50-udev-default.rules:
>
> SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
To be honest with you, I'm a bit concerned that it still won't work as
intended even if I remove the error from posix_clock_add(). This is
because find_dst_clock() from phc2sys finds clocks by phc_index. When
you run phc2sys between this /dev/ptp_kvm and CLOCK_REALTIME, I think it
might happen for this function to find the unintended clock, since both
of them have clock->phc_index = -1.
|