lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <08a7931e-3374-44e7-971a-e8e2a876eb9e@intel.com>
Date: Tue, 25 Mar 2025 14:05:38 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, Tony Nguyen <anthony.l.nguyen@...el.com>
CC: <davem@...emloft.net>, <pabeni@...hat.com>, <edumazet@...gle.com>,
	<andrew+netdev@...n.ch>, <netdev@...r.kernel.org>, Milena Olech
	<milena.olech@...el.com>, <przemyslaw.kitszel@...el.com>,
	<karol.kolacinski@...el.com>, <richardcochran@...il.com>, Alexander Lobakin
	<aleksander.lobakin@...el.com>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
	Willem de Bruijn <willemb@...gle.com>, Mina Almasry <almasrymina@...gle.com>,
	Samuel Salin <Samuel.salin@...el.com>
Subject: Re: [PATCH net-next 01/10] idpf: add initial PTP support



On 3/25/2025 5:44 AM, Jakub Kicinski wrote:
> On Tue, 18 Mar 2025 09:13:16 -0700 Tony Nguyen wrote:
>> From: Milena Olech <milena.olech@...el.com>
>>
>> PTP feature is supported if the VIRTCHNL2_CAP_PTP is negotiated during the
>> capabilities recognition. Initial PTP support includes PTP initialization
>> and registration of the clock.
>>
>> Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
>> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
>> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
>> Tested-by: Mina Almasry <almasrymina@...gle.com>
>> Signed-off-by: Milena Olech <milena.olech@...el.com>
>> Tested-by: Samuel Salin <Samuel.salin@...el.com>
>> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> 
> Would be great to see a review tag from Jake on these :(
> 

I saw these go by on IWL, and did give some comments. However, I didn't
have the time to do a proper review so I didn't tag them.

I'm happy to look these over and review them before the submission next
cycle :)

>> +#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
>> +int idpf_ptp_init(struct idpf_adapter *adapter);
>> +void idpf_ptp_release(struct idpf_adapter *adapter);
>> +#else /* CONFIG_PTP_1588_CLOCK */
>> +static inline int idpf_ptp_init(struct idpf_adapter *adapter)
>> +{
>> +	return 0;
>> +}
>> +
>> +static inline void idpf_ptp_release(struct idpf_adapter *adapter) { }
>> +#endif /* CONFIG_PTP_1588_CLOCK */
>> +#endif /* _IDPF_PTP_H */
> 
> You add an unusual number of ifdefs for CONFIG_PTP_1588_CLOCK.
> Is this really necessary? What breaks if 1588 is not enabled?
> 

This style of converting the init and release to no-op is fairly common
in Intel drivers. I don't know about other places, but I think the
init/release is good since it just makes us disable the PTP
functionality when not supported.

We should make sure to try and limit these checks to the idpf_ptp.h
header file in one place, and make everything transparently disable if
the kernel lacks the PTP support :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ