[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <05111013-4986-b1f2-a2d1-9cab48be1ce5@ti.com>
Date: Tue, 5 Jun 2018 16:31:51 -0500
From: Grygorii Strashko <grygorii.strashko@...com>
To: Andrew Lunn <andrew@...n.ch>
CC: Ilias Apalodimas <ilias.apalodimas@...aro.org>,
Ivan Vecera <ivecera@...hat.com>,
Jiri Pirko <jiri@...nulli.us>, <netdev@...r.kernel.org>,
<ivan.khoronzhuk@...aro.org>, <nsekhar@...com>,
<francois.ozog@...aro.org>, <yogeshs@...com>, <spatton@...com>
Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode
On 06/02/2018 07:37 PM, Andrew Lunn wrote:
>> 1) boot, ping no vlan
>>
>> # ip link add name br0 type bridge
>> # echo 0 > /sys/class/net/br0/bridge/default_pvid
>> # ip link set dev eth2 master br0
>> # ip link set dev eth0 master br0
>> # ip link set dev eth1 master br0
>> # ifconfig br0 192.168.1.2
>>
>> *Note*: I've had to disable default_pvid as otherwise linux Bridge adds
>> and offloads default vlan 1, but default configuration for CPSW driver is vid 0.
>> + CPSW specific - it can't untag packets for P0.
>> Another option I've found:
>> # ip link set dev br0 type bridge vlan_filtering 1.
>> but anyway, I've found it confusing that Linux bridge adds default vlan when vlan_filtering == 0
>
> There are three different configurations here you need to worry about,
> with respect to vlans:
>
> # CONFIG_VLAN_8021Q is not set
>
> So you don't have any vlan support in the kernel.
>
> CONFIG_VLAN_8021Q=y, vlan_filtering = 0
>
> So you have vlans, but filtering is off
>
> CONFIG_VLAN_8021Q=y, vlan_filtering = 1
>
> So you have vlans, and filtering is on.
>
> Even with vlan_filtering off, the bridge still does a little with
> vlans.
>
> And you need all three to work correctly.
>
Right, thanky for the info, but still (sry, to be annoying) why default vlan is added by bridge
when vlan_filtering == 0?
--
regards,
-grygorii
Powered by blists - more mailing lists