On Sat, May 14, 2022 at 12:38:31PM -0700, Richard Cochran wrote:
> On Thu, Mar 24, 2022 at 02:19:51PM +0100, Miroslav Lichvar wrote:
> > When probing support for a PTP_SYS_OFFSET ioctl, assume errors other
> > than EOPNOTSUPP and EINVAL are temporary errors (some drivers are known
> > to return with EBUSY or EIO).
> 
> If that is the case, then the code should retry only on EBUSY or EIO.

Ok. My concern was that there might be other (possibly out-of-tree)
drivers using a different error code, which would not be handled
correctly.

> > Try the ioctl up to 100 times before
> > giving up on it to make the detection more reliable.
> 
> Why 100?   Better to use time based retry method.

100 looked to me like a nice round number large enough to avoid false
negatives. I guess even 10 would be plenty, but don't really have any
data to back that up.

What interval do you suggest? 10 milliseconds? Of real time or
perhaps consumed CPU time (CLOCK_PROCESS_CPUTIME_ID)?

-- 
Miroslav Lichvar



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

Reply via email to