Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725514
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports |
| Date | 2017-09-02 17:40 +0200 |
| Message-ID | <uliGC-4E4-3@gated-at.bofh.it> (permalink) |
| References | <ukCHo-Qu-5@gated-at.bofh.it> <ukCHo-Qu-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 31, 2017 at 02:37:46PM -0400, Vivien Didelot wrote:
> Because each DSA slave port may use a different DSA master port, add a
> pointer to a master in the slave structure. This is a preparatory patch
> for multiple CPU ports.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> net/dsa/dsa_priv.h | 7 ++-----
> net/dsa/slave.c | 33 ++++++++++++++++++---------------
> 2 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
> index 59f155cbbe87..a8cd6cbe4061 100644
> --- a/net/dsa/dsa_priv.h
> +++ b/net/dsa/dsa_priv.h
> @@ -66,6 +66,8 @@ struct dsa_notifier_vlan_info {
> };
>
> struct dsa_slave_priv {
> + struct dsa_master *master;
> +
> /* Copy of the master xmit tagging op for faster access in hot path */
> struct sk_buff * (*xmit)(struct sk_buff *skb,
> struct net_device *dev);
> @@ -179,9 +181,4 @@ extern const struct dsa_device_ops qca_netdev_ops;
> /* tag_trailer.c */
> extern const struct dsa_device_ops trailer_netdev_ops;
>
> -static inline struct net_device *dsa_master_netdev(struct dsa_slave_priv *p)
> -{
> - return p->dp->ds->dst->master->netdev;
> -}
> -
Hi Vivien
Why remove this helper, when it could become p->master->netdev ?
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 0/4] net: dsa: add master interface Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-31 20:50 +0200
[PATCH net-next 2/4] net: dsa: move master ethtool ops in dsa_master Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-31 20:50 +0200
[PATCH net-next 4/4] net: dsa: assign a master to slave ports Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-31 20:50 +0200
Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports Andrew Lunn <andrew@lunn.ch> - 2017-09-02 17:40 +0200
Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports Florian Fainelli <f.fainelli@gmail.com> - 2017-09-02 18:30 +0200
[PATCH net-next 1/4] net: dsa: introduce dsa_master Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-31 20:50 +0200
[PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-31 20:50 +0200
Re: [PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master Andrew Lunn <andrew@lunn.ch> - 2017-09-02 17:40 +0200
Re: [PATCH net-next 0/4] net: dsa: add master interface Florian Fainelli <f.fainelli@gmail.com> - 2017-09-02 18:50 +0200
csiph-web