[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3527f7f04f97ff21f6243e14a97b342004600c06.camel@microchip.com>
Date: Fri, 15 Jul 2022 09:23:19 +0000
From: <Arun.Ramadoss@...rochip.com>
To: <vladimir.oltean@....com>
CC: <claudiu.manoil@....com>, <UNGLinuxDriver@...rochip.com>,
<alexandre.belloni@...tlin.com>, <vivien.didelot@...il.com>,
<andrew@...n.ch>, <idosch@...dia.com>, <linux@...pel-privat.de>,
<petrm@...dia.com>, <f.fainelli@...il.com>, <hauke@...ke-m.de>,
<martin.blumenstingl@...glemail.com>, <xiaoliang.yang_1@....com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <edumazet@...gle.com>,
<netdev@...r.kernel.org>, <Woojung.Huh@...rochip.com>,
<davem@...emloft.net>
Subject: Re: [RFC PATCH net-next 3/3] net: dsa: never skip VLAN configuration
Hi Vladimir,
On Thu, 2022-07-14 at 15:12 +0000, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> Hi Arun,
>
> On Thu, Jul 14, 2022 at 10:46:02AM +0000, Arun.Ramadoss@...rochip.com
> wrote:
> > Hi Vladimir,
> > We couldn't able to setup the selftests and failed during
> > installation
> > of packages. In the mean time, We tried the following things
> >
> > Setup - Host1 --> lan1 --> lan2 --> Host2. Packet transmitted from
> > Host1 and received by Host2.
> >
> > Scenario-1: Vlan aware system and both lan1 & lan2 are in same vid
> > ip link set dev br0 type bridge vlan_filtering 1
> > bridge vlan add dev lan2 vid 10 pvid untagged
> > bridge vlan add dev lan1 vid 10 pvid untagged
> >
> > Packet transmitted from Host1 with vid 10 is received by the Host2.
> > Packet transmitted from Host1 with vid 5 is not received by the
> > Host2.
> >
> > Scenario-2: Vlan unaware system
> > ip link set dev br0 type bridge vlan_filtering 0
> >
> > Now, irrespective of the vid, the packets are received by Host2
> > Packet transmitted from Host1 with vid 10 is received by the Host2.
> > Packet transmitted from Host1 with vid 5 is received by the Host2.
> >
> > Whether the above approach is correct or do we need to test
> > anything
> > further.
> >
> > Thanks
> > Arun
>
> The above is correct to the extent that it is a valid configuration,
> but isn't what my pvid_change() selftest was intended to capture.
>
> The pvid_change() selftest from patch 1/3
>
https://patchwork.kernel.org/project/netdevbpf/patch/20220705173114.2004386-2-vladimir.oltean@nxp.com/
> checks that VLAN-unaware forwarding still takes place after this
> array
> of operations:
>
> ip link add br0 type bridge vlan_filtering 0 # notice the 0 instead
> of 1
> ip link set $swp1 master br0
> ip link set $swp2 master br0
> bridge vlan add vid 3 dev $swp1 pvid untagged # notice how VID 3 is
> absent on $swp2
>
> If you let me know if this works, I can continue and resend this
> patch
> set while you figure out the kselftest setup issues.
We tried the following test
ip link set dev br0 type bridge vlan_filtering 0
ip link set lan1 master br0
ip link set lan2 master br0
bridge vlan add vid 10 dev lan1 pvid untagged
==>
Packet transmitted from Host1 with vid 5 is not received by the Host2
Packet transmitted from Host1 with vid 10 is not received by the Host2
==>
bridge vlan add vid 10 dev lan2 pvid untagged
==>
Packet transmitted from Host1 with vid 5 is received by the Host2
Pa
cket transmitted from Host1 with vid 10 is received by the Host2
==>
bridge vlan del vid 10 dev lan2
==>
Packet transmitted from Host1 with vid 5 is not received by the Host2
Packet transmitted from Host1 with vid 10 is not received by the Host2
==>
Tried this test before and after applying this patch series. And got
the same result.
In summary, packets are dropped when pvid is added to vlan unaware
bridge. Let me know if anything need to performed on this.
Thanks
Arun
Powered by blists - more mailing lists