On Mon, Mar 09, 2020 at 11:55:05AM +0100, Jiri Benc wrote:
> On Fri,  6 Mar 2020 11:23:00 -0800, Richard Cochran wrote:
> > +int phc_number_pins(clockid_t clkid)
> > +{
> > +   struct ptp_clock_caps caps;
> > +
> > +   if (phc_get_caps(clkid, &caps)) {
> > +           return 0;
> > +   }
> > +#ifdef HAVE_PIN_SETFUNC
> > +   return caps.n_pins;

This is the issue ^^^

> It would be better to detect this at run time instead, allowing
> linuxptp to use the best interface dynamically without recompiling. It
> seems to be doable, the old kernels return -ENOTTY for unknown commands.

Yes, and I agree with your sentiment, but that requires carrying an
out-of-tree 'struct ptp_clock_caps' in missing.h.  So far we have
avoided this, and I didn't want to start now.

But maybe that wouldn't be worst thing in the world.  There is a trade
off between maintaining parallel copies of ptp_clock_caps and the
convenience of compiling the stack just once with the "future" kernel
definitions.

Thoughts?

Thanks,
Richard


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

Reply via email to