From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, davem@davemloft.net,
idosch@mellanox.com, jiri@mellanox.com,
ilias.apalodimas@linaro.org, ivan.khoronzhuk@linaro.org,
roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com
Subject: Re: [PATCH net-next 03/14] net: dsa: b53: Properly account for VLAN filtering
Date: Thu, 17 Jan 2019 11:06:54 -0800 [thread overview]
Message-ID: <4d2fbe46-0675-a0b3-0cdb-c34e8bc9147a@gmail.com> (raw)
In-Reply-To: <20190117134755.GJ13242@t480s.localdomain>
On 1/17/19 10:47 AM, Vivien Didelot wrote:
> On Thu, 17 Jan 2019 09:48:53 -0800, Florian Fainelli <f.fainelli@gmail.com> wrote:
>> On 1/17/19 8:36 AM, Vivien Didelot wrote:
>>> Hi Florian,
>>>
>>> On Wed, 16 Jan 2019 12:00:51 -0800, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>
>>>> + /* Handle the case were multiple bridges span the same switch device
>>>> + * and one of them has a different setting than what is being requested
>>>> + * which would be breaking filtering semantics for any of the other
>>>> + * bridge devices.
>>>> + */
>>>> + b53_for_each_port(dev, i) {
>>>> + bridge_dev = dsa_to_port(ds, i)->bridge_dev;
>>>> + if (bridge_dev &&
>>>> + bridge_dev != dsa_to_port(ds, port)->bridge_dev &&
>>>> + br_vlan_enabled(bridge_dev) != vlan_filtering) {
>>>> + netdev_err(bridge_dev,
>>>> + "VLAN filtering is global to the switch!\n");
>>>> + return -EINVAL;
>>>> + }
>>>> + }
>>>
>>> Unbridged ports must act as standard NICs and thus forward taggued frames.
>>> What happens to them if there's a bridge with VLAN filtering enabled spawned
>>> on other ports of your switch? Will the unbridged ports filter VLAN?
>> Because VLAN filtering a global setting to the switch, unbridged network
>> ports will effectively have VLAN filtering enabled, which is why the
>> ndo_vlan_rx_{add,kill}_vid functions to permit that use case.
>
> But then vlan_filtering must simply not be allowed on your switch if you
> have unbridged ports, no?
VLAN filtering is an attribute that applies to the bridge, not the
non-bridged network ports.
>
> I might be mixing things up here but I don't understand yet how you can
> have bridged and unbridged ports working correctly on your switch when it
> has global VLAN filtering turned on. I understand that the switch will drop
> the tagged frames on ingress.
With ndo_vlan_rx_{add,kill}_vid(), you get proper VLAN entries
programmed into the switch for non-bridged ports, therefore your switch
can allow VLAN tagged traffic (which these interfaces only support) just
fine, even when a bridge has VLAN filtering turned on on a bridge device
that has other switch ports enslaved.
--
Florian
next prev parent reply other threads:[~2019-01-17 19:07 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 20:00 [PATCH net-next 00/14] net: dsa: management mode for bcm_sf2 Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 01/14] net: bridge: multicast: Propagate br_mc_disabled_update() return Florian Fainelli
2019-01-17 13:47 ` Ido Schimmel
2019-01-17 19:27 ` Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 02/14] net: dsa: b53: Fix default VLAN ID Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 03/14] net: dsa: b53: Properly account for VLAN filtering Florian Fainelli
2019-01-17 16:36 ` Vivien Didelot
2019-01-17 17:48 ` Florian Fainelli
2019-01-17 18:47 ` Vivien Didelot
2019-01-17 19:06 ` Florian Fainelli [this message]
2019-01-16 20:00 ` [PATCH net-next 04/14] net: systemport: Fix reception of BPDUs Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 05/14] net: dsa: b53: Define registers for IGMP snooping Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 06/14] net: dsa: b53: Add support for MDB Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 07/14] net: dsa: Add ability to program multicast filter for CPU port Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 08/14] net: dsa: Add ndo_vlan_rx_{add,kill}_vid implementation Florian Fainelli
2019-01-16 20:00 ` [PATCH net-next 09/14] net: bridge: Propagate MC addresses with VID through switchdev Florian Fainelli
2019-01-17 14:05 ` Ido Schimmel
2019-01-17 19:17 ` Florian Fainelli
2019-01-18 10:43 ` Ido Schimmel
2019-01-18 11:41 ` Ido Schimmel
2019-01-18 21:48 ` Florian Fainelli
2019-01-19 13:55 ` Ido Schimmel
2019-01-20 3:22 ` Florian Fainelli
2019-01-21 8:41 ` Ido Schimmel
2019-01-21 8:46 ` Jiri Pirko
2019-01-16 20:00 ` [PATCH net-next 10/14] net: vlan: " Florian Fainelli
2019-01-17 14:49 ` Ido Schimmel
2019-01-17 19:12 ` Florian Fainelli
2019-01-21 9:13 ` Ido Schimmel
2019-01-21 9:17 ` Ilias Apalodimas
2019-01-22 11:30 ` Ivan Khoronzhuk
2019-01-22 11:39 ` Ivan Khoronzhuk
2019-01-16 20:00 ` [PATCH net-next 11/14] net: dsa: Make VLAN filtering use DSA notifiers Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 12/14] net: dsa: Wire up multicast IGMP snooping attribute notification Florian Fainelli
2019-01-17 18:36 ` Vivien Didelot
2019-01-17 19:07 ` Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 13/14] net: dsa: b53: Add support for toggling IGMP snooping Florian Fainelli
2019-01-16 20:01 ` [PATCH net-next 14/14] net: dsa: bcm_sf2: Enable management mode 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=4d2fbe46-0675-a0b3-0cdb-c34e8bc9147a@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=idosch@mellanox.com \
--cc=ilias.apalodimas@linaro.org \
--cc=ivan.khoronzhuk@linaro.org \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
--cc=vivien.didelot@gmail.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).