On Tue, May 09, 2023 at 02:02:05PM +0200, Andrew Zaborowski wrote:
> Per https://www.kernel.org/doc/Documentation/networking/timestamping.txt
> section 3:
> "User space is responsible to ensure that multiple processes don't interfere
> with each other and that the settings are reset."
> 
> Add locking for the interface's HW timestamping mode to ensure that in a
> setup with multiple ptp4l sessions sharing interfaces the sessions don't
> overwrite each other's timestamping mode and that there is one session
> responsible for resetting the mode on exit.

We already have a way to implement "sessions don't overwrite each
other's timestamping mode and that there is one session responsible
for resetting the mode on exit."

       hwts_filter
              Select the hardware time stamp filter  setting  mode.   Possible
              values  are normal, check, full.  Normal mode set the filters as
              needed.  Check mode only check but do not set.   Full  mode  set
              the receive filter to mark all packets with hardware time stamp,
              so all applications can get them.  The default is normal.

How do you use that?

1. Set mode globally using hwstamp_ctl
2. Start ptp4l with --hwts_filter=check
3. done.

Thanks,
Richard


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

Reply via email to