From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 4/4] net: dsa: assign a master to slave ports
Date: Sat, 2 Sep 2017 09:29:06 -0700 [thread overview]
Message-ID: <153b5e2d-f904-3836-4eeb-0ef9698f7090@gmail.com> (raw)
In-Reply-To: <20170902153435.GB21003@lunn.ch>
On 09/02/2017 08:34 AM, Andrew Lunn wrote:
> 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 ?
Agreed, I would keep the helper at this point to minimize the delta, it
should really identical in terms of code generated.
--
Florian
next prev parent reply other threads:[~2017-09-02 16:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-31 18:37 [PATCH net-next 0/4] net: dsa: add master interface Vivien Didelot
2017-08-31 18:37 ` [PATCH net-next 1/4] net: dsa: introduce dsa_master Vivien Didelot
2017-08-31 18:37 ` [PATCH net-next 2/4] net: dsa: move master ethtool ops in dsa_master Vivien Didelot
2017-08-31 18:37 ` [PATCH net-next 3/4] net: dsa: change dsa_ptr for a dsa_master Vivien Didelot
2017-09-02 15:30 ` Andrew Lunn
2017-08-31 18:37 ` [PATCH net-next 4/4] net: dsa: assign a master to slave ports Vivien Didelot
2017-09-02 15:34 ` Andrew Lunn
2017-09-02 16:29 ` Florian Fainelli [this message]
2017-09-02 16:42 ` [PATCH net-next 0/4] net: dsa: add master interface Florian Fainelli
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=153b5e2d-f904-3836-4eeb-0ef9698f7090@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®