[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB56775FD490351CCA04DAF3D7E1210@VI1PR04MB5677.eurprd04.prod.outlook.com>
Date: Wed, 16 Sep 2020 10:28:38 +0000
From: Hongbo Wang <hongbo.wang@....com>
To: Vladimir Oltean <olteanv@...il.com>
CC: Xiaoliang Yang <xiaoliang.yang_1@....com>, Po Liu <po.liu@....com>,
Mingkai Hu <mingkai.hu@....com>,
"allan.nielsen@...rochip.com" <allan.nielsen@...rochip.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandru Marginean <alexandru.marginean@....com>,
Vladimir Oltean <vladimir.oltean@....com>,
Leo Li <leoyang.li@....com>, "andrew@...n.ch" <andrew@...n.ch>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"vivien.didelot@...il.com" <vivien.didelot@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"idosch@...sch.org" <idosch@...sch.org>,
"kuba@...nel.org" <kuba@...nel.org>,
"vinicius.gomes@...el.com" <vinicius.gomes@...el.com>,
"nikolay@...ulusnetworks.com" <nikolay@...ulusnetworks.com>,
"roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"horatiu.vultur@...rochip.com" <horatiu.vultur@...rochip.com>,
"alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
"ivecera@...hat.com" <ivecera@...hat.com>
Subject: RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ
Operation
Hi Vladimir,
> -----Original Message-----
> From: Vladimir Oltean <olteanv@...il.com>
> Sent: 2020年9月16日 18:00
> To: Hongbo Wang <hongbo.wang@....com>
> Cc: Xiaoliang Yang <xiaoliang.yang_1@....com>; Po Liu <po.liu@....com>;
> Mingkai Hu <mingkai.hu@....com>; allan.nielsen@...rochip.com; Claudiu
> Manoil <claudiu.manoil@....com>; Alexandru Marginean
> <alexandru.marginean@....com>; Vladimir Oltean
> <vladimir.oltean@....com>; Leo Li <leoyang.li@....com>; andrew@...n.ch;
> f.fainelli@...il.com; vivien.didelot@...il.com; davem@...emloft.net;
> jiri@...nulli.us; idosch@...sch.org; kuba@...nel.org;
> vinicius.gomes@...el.com; nikolay@...ulusnetworks.com;
> roopa@...ulusnetworks.com; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; horatiu.vultur@...rochip.com;
> alexandre.belloni@...tlin.com; UNGLinuxDriver@...rochip.com;
> ivecera@...hat.com
> Subject: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ
> Operation
>
> Caution: EXT Email
>
> Hi Hongbo,
>
> On Wed, Sep 16, 2020 at 05:48:45PM +0800, hongbo.wang@....com wrote:
> > From: "hongbo.wang" <hongbo.wang@....com>
> >
> > This feature can be test in the following case:
> > Customer <-----> swp0 <-----> swp1 <-----> ISP
> >
> > Customer will send and receive packets with single VLAN tag(CTAG), ISP
> > will send and receive packets with double VLAN tag(STAG and CTAG).
> > This refers to "4.3.3 Provider Bridges and Q-in-Q Operation" in
> > VSC99599_1_00_TS.pdf.
> >
> > The related test commands:
> > 1.
> > devlink dev param set pci/0000:00:00.5 name qinq_port_bitmap \ value 2
> > cmode runtime 2.
> > ip link add dev br0 type bridge vlan_protocol 802.1ad ip link set dev
> > swp0 master br0 ip link set dev swp1 master br0 ip link set dev br0
> > type bridge vlan_filtering 1 3.
> > bridge vlan del dev swp0 vid 1 pvid
> > bridge vlan add dev swp0 vid 100 pvid untagged bridge vlan add dev
> > swp1 vid 100
> > Result:
> > Customer(tpid:8100 vid:111) -> swp0 -> swp1 -> ISP(STAG \
> > tpid:88A8 vid:100, CTAG tpid:8100 vid:111)
> > ISP(tpid:88A8 vid:100 tpid:8100 vid:222) -> swp1 -> swp0 ->\
> > Customer(tpid:8100 vid:222)
> >
> > Signed-off-by: hongbo.wang <hongbo.wang@....com>
> > ---
>
> Can you please explain what is the purpose of the devlink parameter command?
> As far as I understand, the commands from step 2 and 3 should behave like
> that, even without running the command at step 1.
if swp0 connects with customer, and swp1 connects with ISP, According to the VSC99599_1_00_TS.pdf,
swp0 and swp1 will have different VLAN_POP_CNT && VLAN_AWARE_ENA,
swp0 should set VLAN_CFG.VLAN_POP_CNT=0 && VLAN_CFG.VLAN_AWARE_ENA=0
swp1 should set VLAN_CFG.VLAN_POP_CNT=1 && VLAN_CFG.VLAN_AWARE_ENA=1
but when set vlan_filter=1, current code will set same value for both swp0 and swp1,
for compatibility with existing code(802.1Q mode), so add devlink to set swp0 and swp1 into different modes.
Thanks,
hongbo
Powered by blists - more mailing lists