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: <4f81c6d3-b74f-4f61-9862-83ee84258880@gmail.com>
Date: Mon, 29 Jan 2024 08:10:34 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Luiz Angelo Daros de Luca <luizluca@...il.com>, netdev@...r.kernel.org
Cc: linus.walleij@...aro.org, alsi@...g-olufsen.dk, andrew@...n.ch,
 olteanv@...il.com, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, arinc.unal@...nc9.com,
 ansuelsmth@...il.com
Subject: Re: [PATCH net-next v4 04/11] net: dsa: realtek: keep variant
 reference in realtek_priv



On 1/23/2024 1:55 PM, Luiz Angelo Daros de Luca wrote:
> Instead of copying values from the variant, we can keep a reference in
> realtek_priv.
> 
> This is a preliminary change for sharing code betwen interfaces. It will
> allow to move most of the probe into a common module while still allow
> code specific to each interface to read variant fields.
> 
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
> ---

[snip]

> diff --git a/drivers/net/dsa/realtek/realtek.h b/drivers/net/dsa/realtek/realtek.h
> index e9ee778665b2..0c51b5132c61 100644
> --- a/drivers/net/dsa/realtek/realtek.h
> +++ b/drivers/net/dsa/realtek/realtek.h
> @@ -58,9 +58,6 @@ struct realtek_priv {
>   	struct mii_bus		*bus;
>   	int			mdio_addr;
>   
> -	unsigned int		clk_delay;
> -	u8			cmd_read;
> -	u8			cmd_write;
>   	spinlock_t		lock; /* Locks around command writes */
>   	struct dsa_switch	*ds;
>   	struct irq_domain	*irqdomain;
> @@ -79,6 +76,8 @@ struct realtek_priv {
>   	int			vlan_enabled;
>   	int			vlan4k_enabled;
>   
> +	const struct realtek_variant *variant;

This is not probably performance sensitive but should the variant 
pointer be moved where clk_delay was such that we preserve a somewhat 
similar cacheline alignment?

Regardless of that:

Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ