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] [day] [month] [year] [list]
Date:   Sun, 27 Feb 2022 19:12:54 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH] net: dsa: qca8k: pack driver struct and improve
 cache use



On 2/27/2022 15:48, Ansuel Smith wrote:
> Pack qca8k priv and other struct using pahole and set the first priv
> struct entry to mgmt_master and mgmt_eth_data to speedup access.
> While at it also rework pcs struct and move it qca8k_ports_config
> following other configuration set for the cpu ports.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@...il.com>
> ---
>   drivers/net/dsa/qca8k.c |  8 ++++----
>   drivers/net/dsa/qca8k.h | 33 ++++++++++++++++-----------------
>   2 files changed, 20 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
> index ee0dbf324268..83b11bb71a19 100644
> --- a/drivers/net/dsa/qca8k.c
> +++ b/drivers/net/dsa/qca8k.c
> @@ -1685,11 +1685,11 @@ qca8k_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
>   	case PHY_INTERFACE_MODE_1000BASEX:
>   		switch (port) {
>   		case 0:
> -			pcs = &priv->pcs_port_0.pcs;
> +			pcs = &priv->ports_config.qpcs[QCA8K_CPU_PORT0].pcs;
>   			break;
>   
>   		case 6:
> -			pcs = &priv->pcs_port_6.pcs;
> +			pcs = &priv->ports_config.qpcs[QCA8K_CPU_PORT6].pcs;
>   			break;
>   		}
>   		break;
> @@ -2889,8 +2889,8 @@ qca8k_setup(struct dsa_switch *ds)
>   	if (ret)
>   		return ret;
>   
> -	qca8k_setup_pcs(priv, &priv->pcs_port_0, 0);
> -	qca8k_setup_pcs(priv, &priv->pcs_port_6, 6);
> +	qca8k_setup_pcs(priv, &priv->ports_config.qpcs[QCA8K_CPU_PORT0], 0);
> +	qca8k_setup_pcs(priv, &priv->ports_config.qpcs[QCA8K_CPU_PORT0], 6);

Should this be QCA8K_CPU_PORT6?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ