From: Andrew Lunn <andrew@lunn.ch>
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>,
Guenter Roeck <linux@roeck-us.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Scott Feldman <sfeldma@gmail.com>, Jiri Pirko <jiri@resnulli.us>,
Chris Healy <cphealy@gmail.com>
Subject: Re: [PATCH net-next 1/7] net: dsa: add support for switchdev VLAN objects
Date: Fri, 14 Aug 2015 02:55:23 +0200 [thread overview]
Message-ID: <20150814005523.GA5596@lunn.ch> (raw)
In-Reply-To: <20150813210156.GA21039@ketchup.touchtunes.com>
On Thu, Aug 13, 2015 at 05:01:57PM -0400, Vivien Didelot wrote:
> Hi Andrew,
>
> On 15-08-13 22:16:08, Andrew Lunn wrote:
> > On Thu, Aug 13, 2015 at 12:52:17PM -0400, Vivien Didelot wrote:
> > > Add new functions in DSA drivers to access hardware VLAN entries through
> > > SWITCHDEV_OBJ_PORT_VLAN objects:
> > >
> > > - port_pvid_get() and vlan_getnext() to dump a VLAN
> > > - port_vlan_del() to exclude a port from a VLAN
> > > - port_pvid_set() and port_vlan_add() to join a port to a VLAN
> > >
> > > The DSA infrastructure will ensure that each VLAN of the given range
> > > does not already belong to another bridge. If it does, it will fallback
> > > to software VLAN and won't program the hardware.
> > >
> > > Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> > > ---
> > > include/net/dsa.h | 11 ++++
> > > net/dsa/slave.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 169 insertions(+)
> > >
> > > diff --git a/include/net/dsa.h b/include/net/dsa.h
> > > index 6356f43..bd9b765 100644
> > > --- a/include/net/dsa.h
> > > +++ b/include/net/dsa.h
> > > @@ -298,6 +298,17 @@ struct dsa_switch_driver {
> > > u8 state);
> > >
> > > /*
> > > + * VLAN support
> > > + */
> > > + int (*port_pvid_get)(struct dsa_switch *ds, int port, u16 *pvid);
> > > + int (*port_pvid_set)(struct dsa_switch *ds, int port, u16 pvid);
> > > + int (*port_vlan_add)(struct dsa_switch *ds, int port, u16 vid,
> > > + bool untagged);
> > > + int (*port_vlan_del)(struct dsa_switch *ds, int port, u16 vid);
> > > @@ -794,6 +949,9 @@ static const struct net_device_ops dsa_slave_netdev_ops = {
> > > .ndo_netpoll_cleanup = dsa_slave_netpoll_cleanup,
> > > .ndo_poll_controller = dsa_slave_poll_controller,
> > > #endif
> > > + .ndo_bridge_getlink = switchdev_port_bridge_getlink,
> > > + .ndo_bridge_setlink = switchdev_port_bridge_setlink,
> > > + .ndo_bridge_dellink = switchdev_port_bridge_dellink,
> > > };
> >
> > Do these changes belong here?
>
> Yes, these are used by switchdev to access bridge requests and exchange
> SWITCHDEV_OBJ_PORT_VLAN objects with DSA, through the its switchdev_ops.
O.K, so if a v2 is needed, please mention this in the change log. It
was not obvious to me.
Thanks
Andrew
next prev parent reply other threads:[~2015-08-14 0:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 16:52 [PATCH net-next 0/7] net: dsa: mv88e6xxx: add hardware VLAN support Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 1/7] net: dsa: add support for switchdev VLAN objects Vivien Didelot
2015-08-13 20:16 ` Andrew Lunn
2015-08-13 21:01 ` Vivien Didelot
2015-08-14 0:55 ` Andrew Lunn [this message]
2015-08-13 16:52 ` [PATCH net-next 2/7] net: dsa: mv88e6xxx: flush VTU and STU entries Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 3/7] net: dsa: mv88e6xxx: add VLAN Get Next support Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 4/7] net: dsa: mv88e6xxx: add VLAN support to FDB dump Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 5/7] net: dsa: mv88e6xxx: add VLAN Purge support Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 6/7] net: dsa: mv88e6xxx: add VLAN Load support Vivien Didelot
2015-08-13 16:52 ` [PATCH net-next 7/7] net: dsa: mv88e6xxx: use port 802.1Q mode Secure Vivien Didelot
2015-08-14 4:32 ` [PATCH net-next 0/7] net: dsa: mv88e6xxx: add hardware VLAN support 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=20150814005523.GA5596@lunn.ch \
--to=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jiri@resnulli.us \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--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).