Bug#855834: linuxptp: default startup argument "-i eth0" should be removed

Lange Norbert norbert.lange at andritz.com
Wed Feb 22 13:44:43 UTC 2017


Hello,

ptp4l can find the fitting ptp device (without eth tool), this doesnt seem to be a problem.

The only time where you don`t have to specify a ethernet device might be if you have only one (cant test this now).
I can attest that it will complain if you have a single one that would be PTP capable, but have multiple others as well.

Kind regards, Norbert

 >-----Original Message-----
 >From: Tino Mettler [mailto:tino.mettler at tikei.de]
 >Sent: Mittwoch, 22. Februar 2017 14:32
 >To: Felipe Sateler; 855834 at bugs.debian.org
 >Cc: Lange Norbert
 >Subject: classified SPAM:Re: Bug#855834: linuxptp: default startup argument "-i
 >eth0" should be removed
 >
 >EXTERNAL EMAIL, please exercise caution
 >
 >
 >On Wed, Feb 22, 2017 at 09:51:25 -0300, Felipe Sateler wrote:
 >
 >[...]
 >
 >> The readme suggests ptp4l can detect appropiate devices by itself. If
 >> that is true, then there is no problem to be solved :).
 >
 >Hi,
 >
 >do you mean this?
 >
 >---------------------------------------------------------------------
 >   If the ethtool ioctl is available, then the ptp4l program will use
 >   it in order to discover the proper PHC device.
 >---------------------------------------------------------------------
 >
 >This means that ptp4l can find the proper PHC device (/dev/ptpX) that
 >belongs to a certain ethernet interface (like eth0).  Before that, the
 >user had to specify both the ethernet interface (-i) and the PHC device
 >(-p) to use.
 >
 >The ethernet interface still has to be specified either on the command
 >line (-i option) or in the config file.
 >
 >From the manual page:
 >
 >--------------------------------------------------------------------
 >       -i interface
 >              Specify  a PTP port, it may be used multiple times. At
 >              least one port must be specified by this option or in
 >              the configuration file.
 >--------------------------------------------------------------------
 >
 >
 >>
 >> If that is not true, I suggest the following:
 >>
 >> 1. Convert ptp4l into a template unit, ptp4l at .service
 >> 2. Change the device to be the instance:
 >> ExecStart=ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp/ptp4l.conf -i %i
 >> 3. Do not enable the unit.
 >> 4. Add a udev rule that starts the (properly instanced) service when
 >> it is detected.
 >>
 >> You can see the ifupdown package for a similar approach: there is
 >> ifup at .service, a udev rule, and a helper program (ifupdown-hotplug)
 >> that determines if an instance should be started for the given device.
 >
 >Thanks. I don't fully understand 4. What exactly should be detected,
 >and how?
 >
 >> While I looked at the service files, I noticed you order them after
 >> chrony, ntpdate and other time services. Systemd defines a standard
 >> place for that, so you can replace all those alternatives with
 >> `time-sync.target`.
 >
 >Thanks for the suggestions. Currently, I just look how Fedora sets up
 >the services and do the same, so I'm always open for suggestions how to
 >improve them.
 >
 >Regards,
 >Tino


#####################################################################################

This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.

Thank You.

#####################################################################################



More information about the pkg-multimedia-maintainers mailing list