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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716170212.2a2cde21@kernel.org>
Date: Wed, 16 Jul 2025 17:02:12 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Raju Rangoju <Raju.Rangoju@....com>
Cc: <netdev@...r.kernel.org>, <andrew+netdev@...n.ch>,
 <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <richardcochran@...il.com>, <Shyam-sundar.S-k@....com>
Subject: Re: [PATCH net-next v2] amd-xgbe: add hardware PTP timestamping
 support

On Mon, 14 Jul 2025 12:28:11 +0530 Raju Rangoju wrote:
>  	/* For Timestamp config */
> -	int (*config_tstamp)(struct xgbe_prv_data *, unsigned int);
> -	void (*update_tstamp_addend)(struct xgbe_prv_data *, unsigned int);
> -	void (*set_tstamp_time)(struct xgbe_prv_data *, unsigned int sec,
> +	void (*init_ptp)(struct xgbe_prv_data *pdata);
> +	void (*config_tstamp)(struct xgbe_prv_data *pdata,
> +			      unsigned int mac_tscr);
> +	void (*update_tstamp_addend)(struct xgbe_prv_data *pdata,
> +				     unsigned int addend);
> +	void (*set_tstamp_time)(struct xgbe_prv_data *pdata, unsigned int sec,
>  				unsigned int nsec);
> +	void (*update_tstamp_time)(struct xgbe_prv_data *pdata,
> +				   unsigned int sec,
> +				   unsigned int nsec);
>  	u64 (*get_tstamp_time)(struct xgbe_prv_data *);
>  	u64 (*get_tx_tstamp)(struct xgbe_prv_data *);

Please start with removing this abstraction / callbacks instead of
starting to used them. They each seem to have only one function
assigned, and there isn't even a null check before calling.
They make the code harder to follow and review.

The removal should be a separate patch for ease of review.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ