From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH 0/4] RFC CPSW switchdev mode Date: Sun, 3 Jun 2018 02:37:42 +0200 Message-ID: <20180603003742.GC14515@lunn.ch> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ilias Apalodimas , Ivan Vecera , Jiri Pirko , netdev@vger.kernel.org, ivan.khoronzhuk@linaro.org, nsekhar@ti.com, francois.ozog@linaro.org, yogeshs@ti.com, spatton@ti.com To: Grygorii Strashko Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:52670 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750831AbeFCAhq (ORCPT ); Sat, 2 Jun 2018 20:37:46 -0400 Content-Disposition: inline In-Reply-To: <2b3cabca-4710-0a71-69c7-cc433e2b3062@ti.com> Sender: netdev-owner@vger.kernel.org List-ID: > 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. Andrew