Re: [PATCH v7 net-next 00/10] Introduce ndo_hwtstamp_get() and ndo_hwtstamp_set()

From: Jacob Keller
Date: Mon Jul 17 2023 - 16:23:28 EST




On 7/17/2023 4:25 AM, Vladimir Oltean wrote:
> Hi Maxim,
>
> On Sun, Jul 16, 2023 at 07:22:23PM -0600, Max Georgiev wrote:
>> Vladimir, thank you for taking over and improving this patch stack!
>>
>> I see you dropped the netdevsim patch:
>> https://www.spinics.net/lists/netdev/msg901378.html
>> Do you believe it's not useful any more since the rest of the
>> patches in the stack were tested through other means?
>
> I just didn't consider that adding mock hardware timestamping support to
> netdevsim was necessary or useful, considering the number of other driver
> conversions that will have to be submitted. Just an extra, avoidable effort
> for me.

FWIW I think its unnecessary as well.

I read through the implementation and noticed that it also used the
.get_ts_info callback by directly reporting whatever type and filter was
set via SIOCSHWTSTAMP, rather than reporting some device capability.

Obviously as a mock device there is no real capability, and that was
likely done for testing purposes. However, it would still leave the
kernel with an implementation that does not follow the expected rules
for these ioctls.

For a mock device thats not really an issue. However, I'd prefer to
avoid such in the kernel so that its not available for copying when
someone without such knowledge comes along to write a new driver.