Re: [PATCH RFC V1 net-next 3/4] net: Let the active time stamping layer be selectable.
From: Vladimir Oltean
Date: Fri Jan 21 2022 - 11:23:39 EST
On Fri, Jan 21, 2022 at 07:28:20AM -0800, Richard Cochran wrote:
> On Fri, Jan 21, 2022 at 02:50:36PM +0000, Vladimir Oltean wrote:
> > So as I mentioned earlier, the use case would be hardware performance
> > testing and diagnosing. You may consider that as not that important, but
> > this is basically what I had to do for several months, and even wrote
> > a program for that, that collects packet timestamps at all possible points.
>
> This is not possible without making a brand new CMSG to accommodate
> time stamps from all the various layers.
>
> That is completely out of scope for this series.
>
> The only practical use case of this series is to switch from PHY back to MAC.
I don't think my proposal is out of scope. It deals with the same thing
as what you propose: the kernel makes a selection by default, user space
can change it. The need for PHC identification in the cmsg arises as a
direct consequence of the fact that there are multiple PHCs in the path.
It isn't a requirement that I introduced artificially. Your solution has
a need to deal with that problem too, it's just that it omits to do so:
| When changing the value, some packets in the kernel
| networking stack may still be delivered with time
| stamps from the previous provider.