mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Ansuel Smith <ansuelsmth@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH] net: dsa: qca8k: pack driver struct and improve cache use
Date: Sun, 27 Feb 2022 19:12:54 -0800	[thread overview]
Message-ID: <ec4ff2dd-9a13-ac11-8ad5-a76ab98cdf42@gmail.com> (raw)
In-Reply-To: <20220227234804.8838-1-ansuelsmth@gmail.com>



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@gmail.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

      reply	other threads:[~2022-02-28  3:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-27 23:48 Ansuel Smith
2022-02-28  3:12 ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec4ff2dd-9a13-ac11-8ad5-a76ab98cdf42@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®