Subject: Re: [PATCH net-next 1/2] sfc: Implement ndo_hwtstamp_(get|set)

From: "Austin, Alex (DCCG)" <[email-masked]>
Date: Mon, 4 Dec 2023 10:26:30 +0000

This seems like a good approach. I'll re-work into a v2.

Alex

On 02/12/2023 03:25, Jakub Kicinski wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Thu, 30 Nov 2023 13:58:25 +0000 Alex Austin wrote:
>> -     struct hwtstamp_config config;
>> +     struct kernel_hwtstamp_config config;
>> +     *config = efx->ptp_data->config;
> Do we have a lot of places which assign the new structure directly
> like this?
>
> There's a bit of "request state" in it:
>
> struct kernel_hwtstamp_config {
>          int flags;
>          int tx_type;
>          int rx_filter;
>          struct ifreq *ifr;             <<<
>          bool copied_to_user;           <<<
>          enum hwtstamp_source source;
> };
>
> Maybe keep the type of config as was, and use
> hwtstamp_config_to_kernel() to set the right fields?