mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next 5/8] net: dsa: add tagging ops to port
Date: Fri, 29 Sep 2017 12:24:42 -0700	[thread overview]
Message-ID: <642468a1-2083-3b00-63ab-934e54499e4c@gmail.com> (raw)
In-Reply-To: <20170929183635.8122-6-vivien.didelot@savoirfairelinux.com>

On 09/29/2017 11:36 AM, Vivien Didelot wrote:
> The DSA tagging protocol operations are specific to each CPU port,
> thus the dsa_device_ops pointer belongs to the dsa_port structure.
> 
> From now on assign a slave's xmit copy from its CPU port tagging
> operations. This will ease the future support for multiple CPU ports.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  include/net/dsa.h  | 3 +++
>  net/dsa/dsa2.c     | 1 +
>  net/dsa/dsa_priv.h | 2 +-
>  net/dsa/legacy.c   | 1 +
>  net/dsa/slave.c    | 3 +--
>  5 files changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index 8dee216a5a9b..6cd36dcb65e1 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -189,6 +189,9 @@ struct dsa_port {
>  	 * Original copy of the master netdev ethtool_ops
>  	 */
>  	const struct ethtool_ops *orig_ethtool_ops;
> +
> +	/* CPU port tagging operations used by master or slave devices */
> +	const struct dsa_device_ops *tag_ops;

You might actually want to move this up in the dsa_port structure in
order to keep being in the first cacheline (you can use pahole -C
dsa_port vmlinux).

dsa_switch_tree is currently a 56 bytes structure, thus fitting in a 64b
cache line, but dsa_port is 80bytes, and the hot-path are in the second
cacheline, so less efficient.
-- 
Florian

  parent reply	other threads:[~2017-09-29 19:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 18:36 [PATCH net-next 0/8] net: dsa: change dsa_ptr for a dsa_port Vivien Didelot
2017-09-29 18:36 ` [PATCH net-next 1/8] net: dsa: directly fetch switch in mtk_tag_rcv Vivien Didelot
2017-09-29 19:21   ` Florian Fainelli
2017-09-29 18:36 ` [PATCH net-next 2/8] net: dsa: directly fetch switch in lan9303_rcv Vivien Didelot
2017-09-29 19:02   ` Florian Fainelli
2017-09-29 19:04     ` Vivien Didelot
2017-09-29 18:36 ` [PATCH net-next 3/8] net: dsa: use cpu_dp in master code Vivien Didelot
2017-09-29 19:10   ` Florian Fainelli
2017-09-29 18:36 ` [PATCH net-next 4/8] net: dsa: use temporary dsa_device_ops variable Vivien Didelot
2017-09-29 19:11   ` Florian Fainelli
2017-09-29 18:36 ` [PATCH net-next 5/8] net: dsa: add tagging ops to port Vivien Didelot
2017-09-29 19:12   ` Florian Fainelli
2017-09-29 19:24   ` Florian Fainelli [this message]
2017-09-29 18:36 ` [PATCH net-next 6/8] net: dsa: prepare master receive hot path Vivien Didelot
2017-09-29 19:14   ` Florian Fainelli
2017-09-29 18:36 ` [PATCH net-next 7/8] net: dsa: change dsa_ptr for a dsa_port Vivien Didelot
2017-09-29 19:20   ` Florian Fainelli
2017-09-29 18:36 ` [PATCH net-next 8/8] net: dsa: remove tag ops from the switch tree Vivien Didelot
2017-09-29 19:20   ` Florian Fainelli
2017-09-29 19:26 ` [PATCH net-next 0/8] net: dsa: change dsa_ptr for a dsa_port Florian Fainelli
2017-09-29 19:34   ` Vivien Didelot

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=642468a1-2083-3b00-63ab-934e54499e4c@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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®