From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode Date: Tue, 5 Jun 2018 16:31:51 -0500 Message-ID: <05111013-4986-b1f2-a2d1-9cab48be1ce5@ti.com> References: <1527144984-31236-1-git-send-email-ilias.apalodimas@linaro.org> <20180524080528.GD2295@nanopsycho> <20180524084831.GA2759@apalos> <20180524125431.GB24557@lunn.ch> <7437d485-1eac-9619-3827-5af9b32b939e@redhat.com> <20180524140831.GA16793@apalos> <2b3cabca-4710-0a71-69c7-cc433e2b3062@ti.com> <20180603003742.GC14515@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Ilias Apalodimas , Ivan Vecera , Jiri Pirko , , , , , , To: Andrew Lunn Return-path: Received: from fllnx210.ext.ti.com ([198.47.19.17]:9740 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbeFEVcD (ORCPT ); Tue, 5 Jun 2018 17:32:03 -0400 In-Reply-To: <20180603003742.GC14515@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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