public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: f.fainelli@gmail.com, andrew@lunn.ch, idosch@idosch.org,
	roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com,
	davem@davemloft.net, netdev@vger.kernel.org,
	Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH net-next 0/6] Dynamic toggling of vlan_filtering for SJA1105 DSA
Date: Tue, 20 Aug 2019 04:04:43 -0400	[thread overview]
Message-ID: <20190820040443.GB4919@t480s.localdomain> (raw)
In-Reply-To: <20190820000002.9776-1-olteanv@gmail.com>

On Tue, 20 Aug 2019 02:59:56 +0300, Vladimir Oltean <olteanv@gmail.com> wrote:
> This patchset addresses a few limitations in DSA and the bridge core
> that made it impossible for this sequence of commands to work:
> 
>   ip link add name br0 type bridge
>   ip link set dev swp2 master br0
>   echo 1 > /sys/class/net/br0/bridge/vlan_filtering
> 
> Only this sequence was previously working:
> 
>   ip link add name br0 type bridge vlan_filtering 1
>   ip link set dev swp2 master br0

This is not quite true, these sequences of commands do "work". What I see
though is that with the first sequence, the PVID 1 won't be programmed in
the hardware. But the second sequence does program the hardware.

But following bridge members will be correctly programmed with the VLAN
though. The sequence below programs the hardware with VLAN 1 for swp3 as
well as CPU and DSA ports, but not for swp2:

    ip link add name br0 type bridge
    ip link set dev swp2 master br0
    echo 1 > /sys/class/net/br0/bridge/vlan_filtering
    ip link set dev swp3 master br0

This is unfortunately also true for any 802.1Q VLANs. For example, only VID
43 is programmed with the following sequence, but not VID 1 and VID 42:

    ip link add name br0 type bridge
    ip link set dev swp2 master br0
    bridge vlan add dev swp2 vid 42
    echo 1 > /sys/class/net/br0/bridge/vlan_filtering
    bridge vlan add dev swp2 vid 43

So I understand that because VLANs are not propagated by DSA to the hardware
when VLAN filtering is disabled, a port may not be programmed with its
bridge's default PVID, and this is causing a problem for tag_8021q.

Please reword so that we understand better what is the issue being fixed here.

> 
> On SJA1105, the situation is further complicated by the fact that
> toggling vlan_filtering is causing a switch reset. However, the hardware
> state restoration logic is already there in the driver. It is a matter
> of the layers above which need a few fixups.
> 
> Also see this discussion thread:
> https://www.spinics.net/lists/netdev/msg581042.html
> 
> Patch 1/6 is not functionally related but also related to dsa_8021q
> handling of VLANs and this is a good opportunity to bring up the subject
> for discussion.

So please send 1/6 as a separate patch and bring up the discussion there.


Thanks,

	Vivien

  parent reply	other threads:[~2019-08-20  8:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 23:59 [PATCH net-next 0/6] Dynamic toggling of vlan_filtering for SJA1105 DSA Vladimir Oltean
2019-08-19 23:59 ` [PATCH net-next 1/6] net: dsa: tag_8021q: Future-proof the reserved fields in the custom VID Vladimir Oltean
2019-08-20  3:16   ` Florian Fainelli
2019-08-19 23:59 ` [PATCH net-next 2/6] net: bridge: Populate the pvid flag in br_vlan_get_info Vladimir Oltean
2019-08-20  0:12   ` Nikolay Aleksandrov
2019-08-19 23:59 ` [PATCH net-next 3/6] net: dsa: Delete the VID from the upstream port as well Vladimir Oltean
2019-08-20  5:51   ` Vivien Didelot
2019-08-20  9:54     ` Vladimir Oltean
2019-08-20 17:52       ` Vivien Didelot
2019-08-20 19:40         ` Florian Fainelli
2019-08-20 20:40           ` Vladimir Oltean
2019-08-20 20:58             ` Vivien Didelot
2019-08-20 21:02               ` Vladimir Oltean
2019-08-20 21:36                 ` Vivien Didelot
2019-08-20 22:09                   ` Vladimir Oltean
2019-08-21  3:30                     ` Vivien Didelot
2019-08-21  9:51                       ` Vladimir Oltean
2019-08-20  0:00 ` [PATCH net-next 4/6] net: dsa: Don't program the VLAN as pvid on the upstream port Vladimir Oltean
2019-08-20  3:15   ` Florian Fainelli
2019-08-20 12:09     ` Vladimir Oltean
2019-08-20 22:43       ` Florian Fainelli
2019-08-20  6:07   ` Vivien Didelot
2019-08-20 10:22     ` Vladimir Oltean
2019-08-20  0:00 ` [PATCH net-next 5/6] net: dsa: Allow proper internal use of VLANs Vladimir Oltean
2019-08-20  3:20   ` Florian Fainelli
2019-08-20  0:00 ` [PATCH net-next 6/6] net: dsa: tag_8021q: Restore bridge pvid when enabling vlan_filtering Vladimir Oltean
2019-08-20  3:32   ` Florian Fainelli
2019-08-20 10:28     ` Vladimir Oltean
2019-08-20 17:36       ` Florian Fainelli
2019-08-20 23:24   ` Florian Fainelli
2019-08-20  8:04 ` Vivien Didelot [this message]
2019-08-20 10:18   ` [PATCH net-next 0/6] Dynamic toggling of vlan_filtering for SJA1105 DSA Vladimir Oltean

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=20190820040443.GB4919@t480s.localdomain \
    --to=vivien.didelot@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=olteanv@gmail.com \
    --cc=roopa@cumulusnetworks.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