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 v2 12/17] net: dsa: add dsa_is_normal_port helper
Date: Sat, 11 Mar 2017 18:17:58 -0800 [thread overview]
Message-ID: <e2553201-b071-b0e5-30c2-13cf81ea6101@gmail.com> (raw)
In-Reply-To: <20170311211303.24560-13-vivien.didelot@savoirfairelinux.com>
Le 03/11/17 à 13:12, Vivien Didelot a écrit :
> Introduce a dsa_is_normal_port helper to check if a given port is a
> normal user port as opposed to a CPU port or DSA link.
net/dsa/dsa2.c uses the "user" terminology should we use something like
that here?
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> include/net/dsa.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index 4e13e695f025..bf0e42c2a6f7 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -248,6 +248,11 @@ static inline bool dsa_is_dsa_port(struct dsa_switch *ds, int p)
> return !!((ds->dsa_port_mask) & (1 << p));
> }
>
> +static inline bool dsa_is_normal_port(struct dsa_switch *ds, int p)
> +{
> + return !dsa_is_cpu_port(ds, p) && !dsa_is_dsa_port(ds, p);
> +}
> +
> static inline bool dsa_is_port_initialized(struct dsa_switch *ds, int p)
> {
> return ds->enabled_port_mask & (1 << p) && ds->ports[p].netdev;
>
--
Florian
next prev parent reply other threads:[~2017-03-12 2:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 21:12 [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 01/17] net: dsa: mv88e6xxx: add port mask helper Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 02/17] net: dsa: mv88e6xxx: move ATU ageing time setter Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 03/17] net: dsa: mv88e6xxx: add ATU setup helper Vivien Didelot
2017-03-11 23:51 ` Andrew Lunn
2017-03-11 21:12 ` [PATCH net-next v2 04/17] net: dsa: mv88e6xxx: setup message ports Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 05/17] net: dsa: mv88e6xxx: enable ATU Learn2All Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 06/17] net: dsa: mv88e6xxx: rework ATU Load/Purge Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 07/17] net: dsa: mv88e6xxx: rework ATU GetNext Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 08/17] net: dsa: mv88e6xxx: rework ATU Flush Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 09/17] net: dsa: mv88e6xxx: rework ATU Remove Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 10/17] net: dsa: mv88e6xxx: rename new FID helper Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 11/17] net: dsa: mv88e6xxx: rename the port vector member Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper Vivien Didelot
2017-03-11 23:49 ` Andrew Lunn
2017-03-12 2:17 ` Florian Fainelli [this message]
2017-03-13 14:54 ` Vivien Didelot
2017-03-11 21:12 ` [PATCH net-next v2 13/17] net: dsa: mv88e6xxx: rework port mode setup Vivien Didelot
2017-03-11 21:13 ` [PATCH net-next v2 14/17] net: dsa: mv88e6xxx: fix port egress flooding mode Vivien Didelot
2017-03-11 21:13 ` [PATCH net-next v2 15/17] net: dsa: mv88e6xxx: add port ATU learn limit op Vivien Didelot
2017-03-11 21:13 ` [PATCH net-next v2 16/17] net: dsa: mv88e6xxx: add port priority override op Vivien Didelot
2017-03-11 21:13 ` [PATCH net-next v2 17/17] etherdevice: remove unused eth_addr_greater Vivien Didelot
2017-03-11 23:49 ` Andrew Lunn
2017-03-12 2:27 ` [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support Florian Fainelli
2017-03-13 14:52 ` Vivien Didelot
2017-03-13 6:54 ` David Miller
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=e2553201-b071-b0e5-30c2-13cf81ea6101@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;
as well as URLs for NNTP newsgroup(s).