Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1742302
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 5/8] net: dsa: add tagging ops to port |
| Date | 2017-09-29 21:30 +0200 |
| Message-ID | <uv98Z-1UI-15@gated-at.bofh.it> (permalink) |
| References | <uv8wh-1rx-5@gated-at.bofh.it> <uv8wh-1rx-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next 5/8] net: dsa: add tagging ops to port Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-09-29 20:50 +0200 Re: [PATCH net-next 5/8] net: dsa: add tagging ops to port Florian Fainelli <f.fainelli@gmail.com> - 2017-09-29 21:20 +0200 Re: [PATCH net-next 5/8] net: dsa: add tagging ops to port Florian Fainelli <f.fainelli@gmail.com> - 2017-09-29 21:30 +0200
csiph-web