From: Jiri Pirko <jiri@resnulli.us>
To: 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>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH net-next 7/9] net: dsa: define port types
Date: Thu, 26 Oct 2017 17:36:11 +0200 [thread overview]
Message-ID: <20171026153611.GG1928@nanopsycho.orion> (raw)
In-Reply-To: <20171026152259.3123-8-vivien.didelot@savoirfairelinux.com>
Thu, Oct 26, 2017 at 05:22:57PM CEST, vivien.didelot@savoirfairelinux.com wrote:
>Introduce an enumerated type for ports, which will be way more explicit
>to identify a port type instead of digging into switch port masks.
>
>A port can be of type CPU, DSA, user, or unused by default. This is a
>static parsed information that cannot be changed at runtime.
>
>Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>---
> include/net/dsa.h | 7 +++++++
> net/dsa/dsa2.c | 3 +++
> net/dsa/legacy.c | 6 ++++++
> 3 files changed, 16 insertions(+)
>
>diff --git a/include/net/dsa.h b/include/net/dsa.h
>index dc7728062396..8da20c4a6552 100644
>--- a/include/net/dsa.h
>+++ b/include/net/dsa.h
>@@ -180,6 +180,13 @@ struct dsa_port {
> struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
> struct packet_type *pt);
>
>+ enum {
>+ DSA_PORT_TYPE_UNUSED = 0,
>+ DSA_PORT_TYPE_CPU,
>+ DSA_PORT_TYPE_DSA,
>+ DSA_PORT_TYPE_USER,
Do you plan to expose this to userspace? How?
next prev parent reply other threads:[~2017-10-26 15:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-26 15:22 [PATCH net-next 0/9] net: dsa: define port types Vivien Didelot
2017-10-26 15:22 ` [PATCH net-next 1/9] net: dsa: add dsa_is_unused_port helper Vivien Didelot
2017-10-26 23:07 ` Florian Fainelli
2017-10-26 15:22 ` [PATCH net-next 2/9] net: dsa: mv88e6xxx: skip unused ports Vivien Didelot
2017-10-26 23:08 ` Florian Fainelli
2017-10-26 15:22 ` [PATCH net-next 3/9] net: dsa: fix dsa_is_normal_port helper Vivien Didelot
2017-10-26 23:08 ` Florian Fainelli
2017-10-26 15:22 ` [PATCH net-next 4/9] net: dsa: rename " Vivien Didelot
2017-10-26 23:09 ` Florian Fainelli
2017-10-26 15:22 ` [PATCH net-next 5/9] net: dsa: use dsa_is_user_port everywhere Vivien Didelot
2017-10-27 0:15 ` Florian Fainelli
2017-10-26 15:22 ` [PATCH net-next 6/9] net: dsa: introduce dsa_user_ports helper Vivien Didelot
2017-10-26 15:22 ` [PATCH net-next 7/9] net: dsa: define port types Vivien Didelot
2017-10-26 15:36 ` Jiri Pirko [this message]
2017-10-26 15:39 ` Vivien Didelot
2017-10-26 15:22 ` [PATCH net-next 8/9] net: dsa: use new port type in helpers Vivien Didelot
2017-10-26 15:22 ` [PATCH net-next 9/9] net: dsa: remove port masks Vivien Didelot
2017-10-27 15:00 ` [PATCH net-next 0/9] net: dsa: define port types 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=20171026153611.GG1928@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--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).