Re: [PATCH v3 3/5] net: Let the active time stamping layer be selectable.

Andrew Lunn
2023-03-10T15:47:37Z

On Fri, Mar 10, 2023 at 09:59:53AM -0500, Willem de Bruijn wrote:
> Köry Maincent wrote:
> > On Wed, 08 Mar 2023 10:28:51 -0500
> > Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote:
> >
> > > >
> > > > + enum timestamping_layer selected_timestamping_layer;
> > > > +
> > >
> > > can perhaps be a single bit rather than an enum
> >
> > I need at least two bits to be able to list the PTPs available.
> > Look at the ethtool_list_ptp function of the second patch.
>
> In the available bitmap, yes. Since there are only two options,
> in the selected case, a single bit would suffice.

It was a bit tongue in cheek, but in an earlier thread discussing this
problem, i listed how there could be up to 7 time stampers on the path
from the RJ45 to the network stack.

We got into this problem by assuming there could only ever be one time
stamper. Lets try to avoid potential problems of assuming there can
only every be two time stampers by assuming there can be N stampers.

Andrew