From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Petr Machata <petrm@mellanox.com>
Cc: devel@driverdev.osuosl.org, f.fainelli@gmail.com, andrew@lunn.ch,
nikolay@cumulusnetworks.com, netdev@vger.kernel.org,
bridge@lists.linux-foundation.org, idosch@mellanox.com,
jiri@mellanox.com, razvan.stefanescu@nxp.com,
gregkh@linuxfoundation.org, vivien.didelot@savoirfairelinux.com,
davem@davemloft.net
Subject: Re: [PATCH net-next v2 3/7] rocker: rocker_main: Ignore bridge VLAN events
Date: Tue, 29 May 2018 17:44:58 +0300 [thread overview]
Message-ID: <20180529144458.GA27555@apalos> (raw)
In-Reply-To: <wihvab6eded.fsf@dev-r-vrt-156.mtr.labs.mlnx>
On Tue, May 29, 2018 at 05:37:30PM +0300, Petr Machata wrote:
> Ilias Apalodimas <ilias.apalodimas@linaro.org> writes:
>
> >> diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
> >> index e73e4fe..aeafdb9 100644
> >> --- a/drivers/net/ethernet/rocker/rocker_main.c
> >> +++ b/drivers/net/ethernet/rocker/rocker_main.c
> >> @@ -1632,6 +1632,9 @@ rocker_world_port_obj_vlan_add(struct rocker_port *rocker_port,
> >> {
> >> struct rocker_world_ops *wops = rocker_port->rocker->wops;
> >>
> >> + if (netif_is_bridge_master(vlan->obj.orig_dev))
> >> + return -EOPNOTSUPP;
> >> +
> > What will happen to the "bridge vlan add dev br0 vid X pvid untagged self" when
> > the lower level (the driver) returns -EOPNOTSUPP? Will it avoid adding a vlan on
> > the bridge ?
>
> No, it will still do it. The reasons are:
>
> - that's what currently happens anyway: none of the drivers has any
> support, yet the bridge logic is done
>
> - -EOPNOTSUPP is what switchdev_port_obj_*() return if switchdev is not
> compiled in
>
> In order to suppress the setting, return e.g. -EINVAL:
>
> # bridge vlan add dev br vid 111 self
> RTNETLINK answers: Invalid argument
> # bridge vlan show dev br
> port vlan ids
> br 1 PVID Egress Untagged
>
> Thanks,
> Petr
Ok that's perfect then. As i mentioned it's really useful for a use case i am
doing on a switch that needs it's cpu port configured individually.
Thanks,
Ilias
next prev parent reply other threads:[~2018-05-29 14:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 10:49 [PATCH net-next v2 0/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-28 10:49 ` [PATCH net-next v2 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*() Petr Machata
2018-05-28 13:39 ` Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 3/7] rocker: rocker_main: " Petr Machata
2018-05-29 10:25 ` Ilias Apalodimas
2018-05-29 14:37 ` Petr Machata
2018-05-29 14:44 ` Ilias Apalodimas [this message]
2018-05-28 10:50 ` [PATCH net-next v2 4/7] dsa: port: " Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 5/7] staging: fsl-dpaa2: ethsw: " Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 6/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare Petr Machata
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=20180529144458.GA27555@apalos \
--to=ilias.apalodimas@linaro.org \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=idosch@mellanox.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=petrm@mellanox.com \
--cc=razvan.stefanescu@nxp.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).