RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-10-09 Thread Hongbo Wang
Hi Vladimir, > > I asked this on the Microchip Support portal: > > -[cut here]- > > VLAN filtering only on specific TPID > > > I would like to configure a port with the following behavior: > - The VL

RE: [EXT] Re: [PATCH v6 0/3] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-09-20 Thread Hongbo Wang
> You're going to have to update every single SWITCHDEV_PORT_ADD_OBJ > handler and subsequent helpers to check the validate the protocol value. > > You also are going to have to make sure that every instantiated > switchdev_obj_port_vlan object initializes the vlan protocol field properly. > > Ba

RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Hongbo Wang
> On Wed, Sep 16, 2020 at 10:28:38AM +0000, Hongbo Wang wrote: > > Hi Vladimir, > > > > 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 &&

RE: [EXT] Re: [PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread Hongbo Wang
Hi Vladimir, > -Original Message- > From: Vladimir Oltean > Sent: 2020年9月16日 18:00 > To: Hongbo Wang > Cc: Xiaoliang Yang ; Po Liu ; > Mingkai Hu ; allan.niel...@microchip.com; Claudiu > Manoil ; Alexandru Marginean > ; Vladimir Oltean > ; Leo Li ; and...@lunn

[PATCH v6 3/3] net: dsa: ocelot: Add support for QinQ Operation

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" 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

[PATCH v6 0/3] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" 1. Overview a) 0001* is for support to set dsa slave into 802.1AD(QinQ) mode. b) 0002* is for vlan_proto support for br_switchdev_port_vlan_add and br_switchdev_port_vlan_del. c) 0003* is for setting QinQ related registers in ocelot switch driver, after applying this patch,

[PATCH v6 1/3] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Set bridge's vlan protocol: ip link set br0 type bridge vlan_protocol 802.1ad Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by:

[PATCH v6 2/3] net: switchdev: Add VLAN protocol support for switchdev port

2020-09-16 Thread hongbo . wang
From: "hongbo.wang" Add VLAN protocol support when adding or deleting VLAN for switchdev port, get current bridge's VLAN protocol and pass it to port driver. Signed-off-by: hongbo.wang --- net/bridge/br_switchdev.c | 24 1 file changed, 24 insertions(+) diff --git a/n

[PATCH v5 1/2] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-08-07 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Set bridge's vlan protocol: ip link set br0 type bridge vlan_protocol 802.1ad Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by:

[PATCH v5 0/2] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-08-07 Thread hongbo . wang
From: "hongbo.wang" 1. the patch 0001* is for setting single port into 802.1AD(QinQ) mode, before this patch, the function dsa_slave_vlan_rx_add_vid didn't pass the parameter "proto" to next port level, so switch's port can't get parameter "proto" after applying this patch, the following comma

[PATCH v5 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-07 Thread hongbo . wang
From: "hongbo.wang" 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

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-05 Thread Hongbo Wang
> On 8/3/2020 11:36 PM, Hongbo Wang wrote: > >>> + if (vlan->proto == ETH_P_8021AD) { > >>> + ocelot->enable_qinq = true; > >>> + ocelot_port->qinq_mode = true; > >>> + } > >> ... >

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-04 Thread Hongbo Wang
> Caution: EXT Email > > On 8/3/2020 11:36 PM, Hongbo Wang wrote: > >>> + if (vlan->proto == ETH_P_8021AD) { > >>> + ocelot->enable_qinq = true; > >>> + ocelot_port->qinq_mode = true; > >>

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-04 Thread Hongbo Wang
> > This featue can be test using network test tools > > mispelled: feature, can be used to test network test tools? or can be used to > exercise network test tool? when testing this feature, I need network tool to send packet with VLAN tag(pcp proto and vid), I will change it to avoid ambiguity

RE: [EXT] Re: [PATCH v4 1/2] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-08-04 Thread Hongbo Wang
> You are adding a new member to the switchdev VLAN object, so you should > make sure that all call paths creating and parsing that object get updated as > well, for now, you are doing this solely within DSA which is probably > reasonable if we assume proto is uninitialized and unused elsewhere, th

RE: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-08-03 Thread Hongbo Wang
> > + if (vlan->proto == ETH_P_8021AD) { > > + ocelot->enable_qinq = true; > > + ocelot_port->qinq_mode = true; > > + } > ... > > + if (vlan->proto == ETH_P_8021AD) { > > + ocelot->enable_qinq = false; > > + ocelot_port->qinq_mode = false

[PATCH v4 1/2] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Set bridge's vlan protocol: ip link set br0 type bridge vlan_protocol 802.1ad Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by:

[PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" This featue can be test using network test tools TX-tool -> swp0 -> swp1 -> RX-tool TX-tool simulates Customer that will send and receive packets with single VLAN tag(CTAG), RX-tool simulates Service-Provider that will send and receive packets with double VLAN ta

[PATCH v4 0/2] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-07-30 Thread hongbo . wang
From: "hongbo.wang" 1. the patch 0001* is for setting single port into 802.1AD(QinQ) mode, before this patch, the function dsa_slave_vlan_rx_add_vid didn't pass the parameter "proto" to next port level, so switch's port can't get parameter "proto" after applying this patch, the following comma

RE: [EXT] Re: [PATCH v3 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-07-22 Thread Hongbo Wang
> Instead of writing a long email, let me just say this. > I ran your commands on 2 random network cards (not ocelot/felix ports). > They don't produce the same results as you. In fact, no frame with VLAN > 111 C-TAG is forwarded (or received) at all by the bridge, not to mention that > no VLAN 100

[PATCH v3 2/2] net: dsa: ocelot: Add support for QinQ Operation

2020-07-22 Thread hongbo . wang
From: "hongbo.wang" This featue can be test using network test tools TX-tool -> swp0 -> swp1 -> RX-tool TX-tool simulates Customer that will send and receive packets with single VLAN tag(CTAG), RX-tool simulates Service-Provider that will send and receive packets with double VLA

[PATCH v3 1/2] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch and port

2020-07-22 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 when adding vlan, this patch only set protocol for user port, cpu port don't care it, so set param

[PATCH v3 0/2] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-07-22 Thread hongbo . wang
From: "hongbo.wang" 1. the patch 0001* is for setting single port into 802.1AD(QinQ) mode, before this patch, the function dsa_slave_vlan_rx_add_vid didn't pass the parameter "proto" to next port level, so switch's port can't get parameter "proto" after applying this patch, we can use the foll

RE: [EXT] Re: [PATCH] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch and port

2020-07-21 Thread Hongbo Wang
Hi Florian, Thanks for your reply! I had posted my patch for switch port driver, the email title is "net: dsa: ocelot: Add support for QinQ Operation", Best Regards! hongbo -Original Message- From: Florian Fainelli Sent: 2020年7月22日 1:55 To: Hongbo Wang ; Xiaoliang Yang ;

[PATCH] net: dsa: ocelot: Add support for QinQ Operation

2020-07-21 Thread hongbo . wang
From: "hongbo.wang" This featue can be test using network test tools TX-tool -> swp0 -> swp1 -> RX-tool TX-tool simulates Customer that will send and receive packets with single VLAN tag(CTAG), RX-tool simulates Service-Provider that will send and receive packets with double VLA

[PATCH] net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch and port

2020-07-21 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 when adding vlan, this patch only set protocol for user port, cpu port don't care it, so set param

RE: [EXT] Re: [PATCH 1/2] net: dsa: Add flag for 802.1AD when adding VLAN for dsa switch and port

2020-07-20 Thread Hongbo Wang
Thanks for your suggestion! I will change the code. thanks. -Original Message- From: Florian Fainelli Sent: 2020年7月21日 12:57 To: Hongbo Wang ; Xiaoliang Yang ; allan.niel...@microchip.com; Po Liu ; Claudiu Manoil ; Alexandru Marginean ; Vladimir Oltean ; Leo Li ; Mingkai Hu ; and

RE: [EXT] Re: [PATCH 1/2] net: dsa: Add flag for 802.1AD when adding VLAN for dsa switch and port

2020-07-20 Thread Hongbo Wang
nal Message- From: Nikolay Aleksandrov Sent: 2020年7月20日 18:45 To: Hongbo Wang ; Xiaoliang Yang ; allan.niel...@microchip.com; Po Liu ; Claudiu Manoil ; Alexandru Marginean ; Vladimir Oltean ; Leo Li ; Mingkai Hu ; and...@lunn.ch; f.faine...@gmail.com; vivien.dide...@gmail.com; da...@davemlo

[PATCH 2/2] net: dsa: Set flag for 802.1AD when deleting vlan for dsa switch and port

2020-07-20 Thread hongbo . wang
From: "hongbo.wang" the following command will be supported: Add VLAN: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Delete VLAN: ip link del link swp1 name swp1.100 Signed-off-by: hongbo.wang --- net/dsa/dsa_priv.h | 2 +- net/dsa/port.c | 3 ++- net/dsa/

[PATCH 1/2] net: dsa: Add flag for 802.1AD when adding VLAN for dsa switch and port

2020-07-20 Thread hongbo . wang
From: "hongbo.wang" the following command can be supported: ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 Signed-off-by: hongbo.wang --- include/uapi/linux/if_bridge.h | 1 + net/dsa/slave.c| 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-)