lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76c3f5ec-0ab2-c06d-98e8-277284bb1a8e@gmail.com>
Date:   Wed, 23 May 2018 08:28:19 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Gerhard Wiesinger <lists@...singer.com>,
        Andrew Lunn <andrew@...n.ch>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: B53 DSA switch problem on Banana Pi-R1 on Fedora 26



On 05/22/2018 09:49 PM, Gerhard Wiesinger wrote:
> On 22.05.2018 22:42, Florian Fainelli wrote:
>> On 05/22/2018 01:16 PM, Andrew Lunn wrote:
>>>> Planned network structure will be as with 4.7.x kernels:
>>>>
>>>> br0 <=> eth0.101 <=> eth0 (vlan 101 tagged) <=> lan 1-lan4 (vlan 101
>>>> untagged pvid)
>>>>
>>>> br1 <=> eth0.102 <=> eth0 (vlan 102 tagged) <=> wan (vlan 102
>>>> untagged pvid)
>>> Do you even need these vlans?
>> Yes, remember, b53 does not currently turn on Broadcom tags, so the only
>> way to segregate traffic is to have VLANs for that.
>>
>>> Are you doing this for port separation? To keep lan1-4 traffic
>>> separate from wan? DSA does that by default, no vlan needed.
>>>
>>> So you can just do
>>>
>>> ip link add name br0 type bridge
>>> ip link set dev br0 up
>>> ip link set dev lan1 master br0
>>> ip link set dev lan2 master br0
>>> ip link set dev lan3 master br0
>>> ip link set dev lan4 master br0
>>>
>>> and use interface wan directly, no bridge needed.
>> That would work once Broadcom tags are turned on which requires turning
>> on managed mode, which requires work that I have not been able to get
>> done :)
> 
> Setup with swconfig:
> 
> #!/usr/bin/bash
> 
> 
> INTERFACE=eth0
> 
> # Delete all IP addresses and get link up
> ip addr flush dev ${INTERFACE}
> ip link set ${INTERFACE} up
> 
> # Lamobo R1 aka BPi R1 Routerboard
> #
> # Speaker | LAN1 | LAN2 | LAN3 | LAN4 || LAN5 | HDMI
> # SW-Port |  P2  |  P1  |  P0  |  P4  ||  P3  |
> # VLAN    |  11  |  12  |  13  |  14  ||ALL(t)|
> #
> # Switch-Port P8 - ALL(t) boards internal CPU Port
> 
> # Setup switch
> swconfig dev ${INTERFACE} set reset 1
> swconfig dev ${INTERFACE} set enable_vlan 1
> swconfig dev ${INTERFACE} vlan 101 set ports '3 8t'
> swconfig dev ${INTERFACE} vlan 102 set ports '4 0 1 2 8t'
> swconfig dev ${INTERFACE} set apply 1
> 
> How to achieve this setup CURRENTLY with DSA?

Your first email had the right programming sequence, but you did not
answer whether you have CONFIG_BRIDGE_VLAN_FILTERING enabled or not,
which is likely your problem.

> 
> And in the future (time plan)?

If you don't care about multicast then you can use those patches:

https://github.com/ffainelli/linux/commit/de055bf5f34e9806463ab2793e0852f5dfc380df

and you have to change the part of drivers/net/dsa/b53/b53_common.c that
returns DSA_TAG_PROTO_NONE for 53125:


diff --git a/drivers/net/dsa/b53/b53_common.c
b/drivers/net/dsa/b53/b53_common.c
index 9f561fe505cb..3c64f026a8ce 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1557,7 +1557,7 @@ enum dsa_tag_protocol b53_get_tag_protocol(struct
dsa_switch *ds, int port)
         * mode to be turned on which means we need to specifically
manage ARL
         * misses on multicast addresses (TBD).
         */
-       if (is5325(dev) || is5365(dev) || is539x(dev) || is531x5(dev) ||
+       if (is5325(dev) || is5365(dev) || is539x(dev) ||
            !b53_can_enable_brcm_tags(ds, port))
                return DSA_TAG_PROTO_NONE;


That would bring Broadcom tags to the 53125 switch and you would be able
to use the configuration lines from Andrew in that case.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ