[PATCH v8 net-next 07/11] net: dsa: keep a copy of the tagging protocol in the DSA switch tree

2021-01-28 Thread Vladimir Oltean
tructure pointer is held only for CPU ports. But there are switches which don't have CPU ports and nonetheless still need to be configured. These would be Marvell leaf switches whose upstream port is just a DSA link. How do we inform these of their tagging protocol setup/deletion? One answer to

[PATCH v7 net-next 07/11] net: dsa: keep a copy of the tagging protocol in the DSA switch tree

2021-01-25 Thread Vladimir Oltean
these of their tagging protocol setup/deletion? One answer to the above would be: iterate through the DSA switch tree's ports once, list the CPU ports, get their tag_ops, then iterate again now that we have it, and notify everybody of that tag_ops. But what to do if conflicts appear between o

Re: [PATCH net 0/6] Fixes on Microchip KSZ8795 DSA switch driver

2021-01-13 Thread Vladimir Oltean
On Wed, Jan 13, 2021 at 01:45:16PM +0100, Gilles DOFFE wrote: > > This patchset fixes various issues. > It mainly concerns VLANs support by fixing FID table management to > allow adding more than one VLAN. > It also fixes tag/untag behavior on ingress/egress packets. As far as I understand the se

[PATCH net 0/6] Fixes on Microchip KSZ8795 DSA switch driver

2021-01-13 Thread Gilles DOFFE
This patchset fixes various issues. It mainly concerns VLANs support by fixing FID table management to allow adding more than one VLAN. It also fixes tag/untag behavior on ingress/egress packets. Gilles DOFFE (6): net: dsa: ksz: fix FID management net: dsa: ksz: move tag/untag action net:

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: [PATCH v6 0/3] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-09-18 Thread Florian Fainelli
On 9/18/2020 5:20 PM, David Miller wrote: From: hongbo.w...@nxp.com Date: Wed, 16 Sep 2020 17:48:42 +0800 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*

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

2020-09-18 Thread David Miller
From: hongbo.w...@nxp.com Date: Wed, 16 Sep 2020 17:48:42 +0800 > 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

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

2020-09-16 Thread hongbo . wang
v3: combine two patches to one post hongbo.wang (3): net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port net: switchdev: Add VLAN protocol support for switchdev port net: dsa: ocelot: Add support for QinQ Operation drive

[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:

Re: [PATCH v3 0/4] ksz9477 dsa switch driver improvements

2020-09-10 Thread Paul Barker
On Wed, 9 Sep 2020 at 19:26, David Miller wrote: > > From: Paul Barker > Date: Wed, 9 Sep 2020 11:04:13 +0100 > > > These changes were made while debugging the ksz9477 driver for use on a > > custom board which uses the ksz9893 switch supported by this driver. The > > patches have been runtime t

Re: [PATCH v3 0/4] ksz9477 dsa switch driver improvements

2020-09-09 Thread David Miller
From: Paul Barker Date: Wed, 9 Sep 2020 11:04:13 +0100 > These changes were made while debugging the ksz9477 driver for use on a > custom board which uses the ksz9893 switch supported by this driver. The > patches have been runtime tested on top of Linux 5.8.4, I couldn't > runtime test them on

[PATCH v3 0/4] ksz9477 dsa switch driver improvements

2020-09-09 Thread Paul Barker
These changes were made while debugging the ksz9477 driver for use on a custom board which uses the ksz9893 switch supported by this driver. The patches have been runtime tested on top of Linux 5.8.4, I couldn't runtime test them on top of 5.9-rc3 due to unrelated issues. They have been build teste

[PATCH v2 0/4] ksz9477 dsa switch driver improvements

2020-09-07 Thread Paul Barker
These changes were made while debugging the ksz9477 driver for use on a custom board which uses the ksz9893 switch supported by this driver. The patches have been runtime tested on top of Linux 5.8.4, I couldn't runtime test them on top of 5.9-rc3 due to unrelated issues. They have been build teste

Re: [PATCH 0/4] ksz9477 dsa switch driver improvements

2020-09-05 Thread Paul Barker
On Sat, 5 Sep 2020 at 16:34, Andrew Lunn wrote: > > On Sat, Sep 05, 2020 at 03:03:21PM +0100, Paul Barker wrote: > > These changes were made while debugging the ksz9477 driver for use on a > > custom board which uses the ksz9893 switch supported by this driver. The > > patches have been runtime te

Re: [PATCH 0/4] ksz9477 dsa switch driver improvements

2020-09-05 Thread Andrew Lunn
On Sat, Sep 05, 2020 at 03:03:21PM +0100, Paul Barker wrote: > These changes were made while debugging the ksz9477 driver for use on a > custom board which uses the ksz9893 switch supported by this driver. The > patches have been runtime tested on top of Linux 5.8.4, I couldn't > runtime test them

[PATCH 0/4] ksz9477 dsa switch driver improvements

2020-09-05 Thread Paul Barker
These changes were made while debugging the ksz9477 driver for use on a custom board which uses the ksz9893 switch supported by this driver. The patches have been runtime tested on top of Linux 5.8.4, I couldn't runtime test them on top of 5.9-rc3 due to unrelated issues. They have been build teste

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

2020-08-07 Thread David Miller
From: hongbo.w...@nxp.com Date: Fri, 7 Aug 2020 19:13:47 +0800 > 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 c

Re: [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 Nikolay Aleksandrov
On 07/08/2020 14:13, hongbo.w...@nxp.com wrote: > 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 > Del

[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
ver v4: a. modify slave.c to support "ip set br0 type bridge vlan_protocol 802.1ad" b. modify ocelot.c, if enable QinQ, set VLAN_AWARE_ENA and VLAN_POP_CNT per port when vlan_filter=1 v3: combine two patches to one post hongbo.wang (2): net: dsa: Add protocol support for 802.1AD when adding or

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
he add_vid path, it might make > sense to extract this to a helper function eventually. I will extract the code to helper function. > > slave_dev->features = master->vlan_features | NETIF_F_HW_TC; > > if (ds->ops->port_vlan_add && ds->ops->port_vlan_del) &g

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

2020-08-03 Thread Florian Fainelli
return dsa_port_vid_del(dp, vid, vlan_proto); > } > > struct dsa_hw_port { > @@ -1744,7 +1758,8 @@ int dsa_slave_create(struct dsa_port *port) > > slave_dev->features = master->vlan_features | NETIF_F_HW_TC; > if (ds->ops->port_vlan_add && ds->ops->

[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 0/2] Add 802.1AD protocol support for dsa switch and ocelot driver

2020-07-30 Thread hongbo . wang
tches to one post hongbo.wang (2): net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch port net: dsa: ocelot: Add support for QinQ Operation drivers/net/dsa/ocelot/felix.c | 12 +++ drivers/net/ethernet/mscc/ocelot.c | 53 +-

[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
driver, after applying this patch, the switch(VSC99599)'s port can enable or disable QinQ mode. hongbo.wang (2): net: dsa: Add protocol support for 802.1AD when adding or deleting vlan for dsa switch and port net: dsa: ocelot: Add support for QinQ Operation drivers/net/dsa/ocelot/felix.c

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
ks.com; ro...@cumulusnetworks.com; netdev@vger.kernel.org; linux-ker...@vger.kernel.org; horatiu.vul...@microchip.com; alexandre.bell...@bootlin.com; unglinuxdri...@microchip.com; linux-de...@linux.nxdi.nxp.com Subject: [EXT] Re: [PATCH] net: dsa: Add protocol support for 802.1AD when adding or deleting vl

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

2020-07-21 Thread Florian Fainelli
On 7/21/20 4:02 AM, hongbo.w...@nxp.com wrote: > 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

[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
...@bootlin.com; unglinuxdri...@microchip.com; linux-de...@linux.nxdi.nxp.com Subject: [EXT] Re: [PATCH 1/2] net: dsa: Add flag for 802.1AD when adding VLAN for dsa switch and port Caution: EXT Email On 7/20/2020 3:41 AM, hongbo.w...@nxp.com wrote: > From: "hongbo.wang" > > th

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

2020-07-20 Thread Florian Fainelli
On 7/20/2020 3:41 AM, hongbo.w...@nxp.com wrote: > From: "hongbo.wang" > > the following command can be supported: > ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100 You should probably include the switch driver that is going to be benefiting from doing these changes in t

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
[EXT] Re: [PATCH 1/2] net: dsa: Add flag for 802.1AD when adding VLAN for dsa switch and port Caution: EXT Email On 20/07/2020 13:41, hongbo.w...@nxp.com wrote: > From: "hongbo.wang" > > the following command can be supported: > ip link add link swp1 name swp1.100

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

2020-07-20 Thread Nikolay Aleksandrov
On 20/07/2020 13:41, hongbo.w...@nxp.com wrote: > 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

[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(-)

[PATCH v4 net-next 11/11] docs: devicetree: add bindings for Seville DSA switch inside Felix driver

2020-07-13 Thread Vladimir Oltean
From: Vladimir Oltean There are no non-standard bindings being used. However Felix is a PCI device and Seville is a platform device. So give an example of device tree for this switch and document its compatible string. Signed-off-by: Vladimir Oltean --- Changes in v4: Patch is new (split from 1

Re: 88E6176 dsa switch on ls1021a (GIANFAR)

2020-07-13 Thread Maxim Kochetkov
Sorry that was my mistake. That was my own custom patch for bridge (for some old board). Thank you very much! 13.07.2020 14:20, Vladimir Oltean wrote: This call path is interesting. How does br_fdb_update() end up calling dsa_legacy_fdb_add(), which is only accessible through .ndo_fdb_add? The

Re: 88E6176 dsa switch on ls1021a (GIANFAR)

2020-07-13 Thread Vladimir Oltean
Hi Maxim! On Mon, Jul 13, 2020 at 12:54:58PM +0300, Maxim Kochetkov wrote: > I connected 88E6176 switch to ls1021a based board. > DSA works fine. > But I found a problem. > 1) Set IP on lan0 (switch port 0). > 2) Create bridge br0. > 3) Add lan3 (switch port3) to br0. > 4) Set lan3 up. > 5) Set IP

88E6176 dsa switch on ls1021a (GIANFAR)

2020-07-13 Thread Maxim Kochetkov
I connected 88E6176 switch to ls1021a based board. DSA works fine. But I found a problem. 1) Set IP on lan0 (switch port 0). 2) Create bridge br0. 3) Add lan3 (switch port3) to br0. 4) Set lan3 up. 5) Set IP on br0. [ 1530.97

Re: [PATCH v3 net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-07 Thread David Miller
From: Vladimir Oltean Date: Tue, 5 May 2020 22:20:51 +0300 > From: Vladimir Oltean > > Expose the TTEthernet hardware features of the switch using standard > tc-flower actions: trap, drop, redirect and gate. > > v1 was submitted at: > https://patchwork.ozlabs.org/project/netdev/cover/20200503

[PATCH v3 net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-05 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. v1 was submitted at: https://patchwork.ozlabs.org/project/netdev/cover/20200503211035.19363-1-olte...@gmail.com/ v2 was submitted at: https://patchwork.oz

[PATCH v2 net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. v1 was submitted at: https://patchwork.ozlabs.org/project/netdev/cover/20200503211035.19363-1-olte...@gmail.com/ Changes in v2: Using a newly introduced d

[PATCH net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-04 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. Vladimir Oltean (6): net: dsa: introduce a dsa_port_from_netdev public helper net: dsa: sja1105: add static tables for virtual links net: dsa: sja110

[PATCH net-next 0/6] tc-gate offload for SJA1105 DSA switch

2020-05-03 Thread Vladimir Oltean
From: Vladimir Oltean Expose the TTEthernet hardware features of the switch using standard tc-flower actions: trap, drop, redirect and gate. Vladimir Oltean (6): net: dsa: export dsa_slave_dev_check and dsa_slave_to_port net: dsa: sja1105: add static tables for virtual links net: dsa: sja1

Re: [PATCH v3 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-05 Thread Florian Fainelli
On 7/5/2019 2:57 AM, Benedikt Spranger wrote: > Document DSA tagged and VLAN based switch configuration by showcases. > > Signed-off-by: Benedikt Spranger > Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

[PATCH v3 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-05 Thread Benedikt Spranger
@@ -0,0 +1,292 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=== +DSA switch configuration from userspace +=== + +The DSA switch configuration is not integrated into the main userspace +network configuration suites by now and has to

Re: [RFC PATCH v2 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-01 Thread Andrew Lunn
4 > index ..55d6dce6500d > --- /dev/null > +++ b/Documentation/networking/dsa/configuration.rst > @@ -0,0 +1,292 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +=== > +DSA switch configuration from userspace > +===

[RFC PATCH v2 1/2] Documentation: net: dsa: Describe DSA switch configuration

2019-07-01 Thread Benedikt Spranger
-License-Identifier: GPL-2.0 + +=== +DSA switch configuration from userspace +=== + +The DSA switch configuration is not integrated into the main userspace +network configuration suites by now and has to be performed manualy

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-28 Thread Andrew Lunn
> FYI, changing the code in question to return 0 instead of -EOPNOTSUPP in > the missing brport_flags_support flag case allows systemd-networkd to > initialize the port successfully. We have some other issues in our > hardware setup that prevent me from testing that fully at the moment, > but I wil

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-27 Thread Robert Hancock
On 2018-12-23 2:57 p.m., Andrew Lunn wrote: > On Sun, Dec 23, 2018 at 01:29:42PM -0600, Robert Hancock wrote: >> On 2018-12-23 5:23 a.m., Andrew Lunn wrote: >>> On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: I have a device using a KSZ9897 switch (CONFIG_MICROCHIP_KSZ_SPI

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Andrew Lunn
On Sun, Dec 23, 2018 at 01:29:42PM -0600, Robert Hancock wrote: > On 2018-12-23 5:23 a.m., Andrew Lunn wrote: > >On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: > >>I have a device using a KSZ9897 switch > >>(CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am > >>t

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Robert Hancock
On 2018-12-23 5:23 a.m., Andrew Lunn wrote: On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: I have a device using a KSZ9897 switch (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am trying to enable a bridge on some of the ports using systemd-networkd. Hi Rob

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-23 Thread Andrew Lunn
On Sat, Dec 22, 2018 at 08:29:08PM -0600, Robert Hancock wrote: > I have a device using a KSZ9897 switch > (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am > trying to enable a bridge on some of the ports using systemd-networkd. Hi Robert I don't think many of use use such a

Re: Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-22 Thread Robert Hancock
On 2018-12-22 8:29 p.m., Robert Hancock wrote: I have a device using a KSZ9897 switch (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am trying to enable a bridge on some of the ports using systemd-networkd. However, it seems to be getting an error when it tries to configure th

Errors enabling bridge with KSZ9897 DSA switch driver

2018-12-22 Thread Robert Hancock
I have a device using a KSZ9897 switch (CONFIG_MICROCHIP_KSZ_SPI_DRIVER=y) using a 4.19.9 kernel, where I am trying to enable a bridge on some of the ports using systemd-networkd. However, it seems to be getting an error when it tries to configure the ports to be part of the bridge. systemd-network

Re: DSA switch

2018-05-04 Thread Andrew Lunn
> I also see that there is no bridge function in /drivers/net/dsa files > in our kernel (2.6.37) Sorry, i cannot really help you with an ancient kernel like that. Andrew

Re: DSA switch

2018-05-04 Thread Ran Shalit
>> > > It seems that the bridge functions OK, > so I rather keep on working with it, instead of doing too many > dramatically changes in the custom kernel of TI's which works with our > chip (dm8148). > > Yet, I would like to ask about the bridge: > Can a bridge al

Re: DSA switch

2018-05-04 Thread Ran Shalit
changes in the custom kernel of TI's which works with our chip (dm8148). Yet, I would like to ask about the bridge: Can a bridge also be used with dsa switch when ports are connected to different subnets ? Regards, Ran

Re: DSA switch

2018-05-03 Thread Andrew Lunn
> I am using kernel 2.6.37, but I think it is not kernel issue, but more > bad patches done on kernel. > It is based on TI's kernel, but with some custom modifications on > driver's switch, to make it work with TI's cpsw switch. > Seems like someone made some bad patch, I'll continue investigating

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 11:41 PM, Andrew Lunn wrote: > On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: >> On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >> > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> >> Hello, >> >> >> >> Is it possible to use switch just like

Re: DSA switch

2018-05-03 Thread Andrew Lunn
On Thu, May 03, 2018 at 11:35:08PM +0300, Ran Shalit wrote: > On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: > >> Hello, > >> > >> Is it possible to use switch just like external real switch, > >> connecting all ports to the same

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> Hello, >> >> Is it possible to use switch just like external real switch, >> connecting all ports to the same subnet ? > > Yes. Just bridge all ports/interfaces together and put you

Re: DSA switch

2018-05-03 Thread Andrew Lunn
> It seems that although the bridge command functions, it takes several > seconds (~6-7 seconds !) from the time it resturns to shell till a > real communication works (ping between 2 PCs connected to switch). > Does it usually takes so much time ? PHY link up can take a second or two. Less if you

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko wrote: > Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: Hello, Is it possible to use switch just like

Re: DSA switch

2018-05-03 Thread Ran Shalit
On Thu, May 3, 2018 at 10:11 AM, Jiri Pirko wrote: > Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >>On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >>> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: Hello, Is it possible to use switch just like

Re: DSA switch

2018-05-03 Thread Jiri Pirko
Thu, May 03, 2018 at 08:50:52AM CEST, ransha...@gmail.com wrote: >On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: >> On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >>> Hello, >>> >>> Is it possible to use switch just like external real switch, >>> connecting all ports to the same

Re: DSA switch

2018-05-02 Thread Ran Shalit
On Wed, May 2, 2018 at 11:56 PM, Andrew Lunn wrote: > On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: >> Hello, >> >> Is it possible to use switch just like external real switch, >> connecting all ports to the same subnet ? > > Yes. Just bridge all ports/interfaces together and put you

Re: DSA switch

2018-05-02 Thread Andrew Lunn
On Wed, May 02, 2018 at 11:20:05PM +0300, Ran Shalit wrote: > Hello, > > Is it possible to use switch just like external real switch, > connecting all ports to the same subnet ? Yes. Just bridge all ports/interfaces together and put your host IP address on the bridge. Andrew

DSA switch

2018-05-02 Thread Ran Shalit
Hello, Is it possible to use switch just like external real switch, connecting all ports to the same subnet ? In our architecture, we prefer that all IPs connected to board shall be in the same subnet. Yet, I am not sure if it is possible with dsa switch, because in dsa the ports are seen in

[PATCH v4 net-next 6/6] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-09 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- v4: Fix unrelated white space change --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.

Re: [PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-07 Thread Sergei Shtylyov
Hello! On 11/7/2017 2:26 AM, Andrew Lunn wrote: Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH v3 net-next 5/5] net: dsa: switch: Don't add CPU port to an mdb by default

2017-11-06 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c index e6c06aa349a6

[PATCH v2 rfc 6/8] net: dsa: switch: Don't add CPU port to an mdb by default

2017-09-05 Thread Andrew Lunn
Now that the host indicates when a multicast group should be forwarded from the switch to the host, don't do it by default. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 326680039c52..

[PATCH v2 rfc 5/8] net: dsa: switch: handle host mdb add/remove

2017-09-05 Thread Andrew Lunn
When receiving notifications of the host mdb add/remove, add/remove an mdb to the CPU port, so that traffic flows from a port to the CPU port and hence to the host. Signed-off-by: Andrew Lunn --- net/dsa/switch.c | 72 ++-- 1 file changed, 60 i

[PATCH net-next v3 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-08-06 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Florian Fainelli Rev

[PATCH net-next v2 03/13] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-19 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Florian Fainelli Rev

[PATCH net-next 03/11] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-18 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky Reviewed-by: Florian Fainelli Rev

Re: [PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-06 Thread Vivien Didelot
Arkadi Sharshevsky writes: > Currently, the switchdev objects are embedded inside the DSA notifier > info. This patch removes this dependency. This is done as a preparation > stage before adding support for learning FDB through the switchdev > notification chain. > > Signed-off-by: Arkadi Sharshe

Re: [PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-05 Thread Florian Fainelli
On 07/05/2017 08:36 AM, Arkadi Sharshevsky wrote: > Currently, the switchdev objects are embedded inside the DSA notifier > info. This patch removes this dependency. This is done as a preparation > stage before adding support for learning FDB through the switchdev > notification chain. > > Signed-

[PATCH net-next RFC 03/12] net: dsa: Remove switchdev dependency from DSA switch notifier chain

2017-07-05 Thread Arkadi Sharshevsky
Currently, the switchdev objects are embedded inside the DSA notifier info. This patch removes this dependency. This is done as a preparation stage before adding support for learning FDB through the switchdev notification chain. Signed-off-by: Arkadi Sharshevsky --- net/dsa/dsa_priv.h | 11 +

Re: [PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-31 Thread Andrew Lunn
ces that can be configured as SGMII, RGMII, MII > or RMII. Either of these may connect directly to a host processor or > to an external PHY. The SGMII port may interface to a fiber optic transceiver. > > This driver currently supports vlan, fdb, mdb & mirror dsa switch operat

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-31 Thread Woojung.Huh
host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- drivers/net/dsa/Kconfig |

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Reviewed-by: Florian Fainelli Signed-off-by: Woojung Huh --- drivers/net/dsa/Kconfig |

RE: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
Hi Andrew, > > +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > > + const struct switchdev_obj_port_mdb *mdb) > > +{ > > + struct ksz_device *dev = ds->priv; > > + u32 static_table[4]; > > + u32 data; > > + int index; > > + int ret = 0; > > + u32 mac

Re: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Andrew Lunn
> +static int ksz_port_mdb_del(struct dsa_switch *ds, int port, > + const struct switchdev_obj_port_mdb *mdb) > +{ > + struct ksz_device *dev = ds->priv; > + u32 static_table[4]; > + u32 data; > + int index; > + int ret = 0; > + u32 mac_hi, mac_lo; >

[PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh Reviewed-by: Florian Fainelli --- drivers/net/dsa/Kconfig |

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
> > > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 > *vlan_table) > > > > +{ > > > > + struct ksz_device *dev = ds->priv; > > > > + u8 data; > > > > + int timeout = 1000; > > > > + > > > > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & > > > VLAN_IN

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Mon, May 22, 2017 at 09:21:28PM +, woojung@microchip.com wrote: > Hi Andres, > > > > +static struct { > > > + int index; > > > + char string[ETH_GSTRING_LEN]; > > > > Hi Woojung > > > > Since you need to respin for the skb_put_padto(), please make this > > const. > OK. > > > > +stati

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
Hi Andres, > > +static struct { > > + int index; > > + char string[ETH_GSTRING_LEN]; > > Hi Woojung > > Since you need to respin for the skb_put_padto(), please make this > const. OK. > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table) > > +{ > > + struct ksz_d

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Andrew Lunn
On Fri, May 19, 2017 at 10:57:12PM +, woojung@microchip.com wrote: > +static struct { > + int index; > + char string[ETH_GSTRING_LEN]; Hi Woojung Since you need to respin for the skb_put_padto(), please make this const. > +static int get_vlan_table(struct dsa_switch *ds, u16 vid

Re: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-19 Thread Florian Fainelli
e configured as SGMII, RGMII, MII > or RMII. Either of these may connect directly to a host processor or > to an external PHY. The SGMII port may interface to a fiber optic transceiver. > > This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. > > Sig

[PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-19 Thread Woojung.Huh
host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh --- drivers/net/dsa/Kconfig |2 + drivers/net/dsa/Make

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Florian Fainelli
On 05/15/2017 02:01 PM, woojung@microchip.com wrote: >>> +static const struct ksz_chip_data ksz_switch_chips[] = { >>> + { >>> + .chip_id = 0x00947700, >>> + .dev_name = "KSZ9477", >>> + .num_vlans = 4096, >>> + .num_alus = 4096, >>> + .num_st

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> > +static const struct ksz_chip_data ksz_switch_chips[] = { > > + { > > + .chip_id = 0x00947700, > > + .dev_name = "KSZ9477", > > + .num_vlans = 4096, > > + .num_alus = 4096, > > + .num_statics = 16, > > + .enabled_ports = 0x1F, /* po

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> >> + dev->vlan_cache = devm_kmalloc_array(dev->dev, > >> + sizeof(struct vlan_table), > >> + dev->num_vlans, GFP_KERNEL); > > > > You should check, but i think devm_kmalloc_array sets the allocated > > memory to 0. > >

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-14 Thread Sergei Shtylyov
Hello! On 5/13/2017 5:56 PM, Andrew Lunn wrote: [...] +static int ksz_reset_switch(struct dsa_switch *ds) +{ + struct ksz_device *dev = ds->priv; + u8 data8; + u16 data16; + u32 data32; + ... + + memset(dev->vlan_cache, 0, sizeof(*dev->vlan_cache) * dev->num_v

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-13 Thread Andrew Lunn
> +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table) > +{ > + struct ksz_device *dev = ds->priv; > + u8 data; > + int timeout = 1000; > + > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid & VLAN_INDEX_M); > + ksz_write8(dev, REG_SW_VLAN_CTRL, VLAN_REA

Re: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-13 Thread Andrew Lunn
On Fri, May 12, 2017 at 08:07:58PM +, woojung@microchip.com wrote: > +static void ksz_config_cpu_port(struct dsa_switch *ds) > +{ > + struct ksz_device *dev = ds->priv; > + int i; > + > + ds->num_ports = dev->port_cnt; > + > + for (i = 0; i < ds->num_ports; i++) { > +

[PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-12 Thread Woojung.Huh
host processor or to an external PHY. The SGMII port may interface to a fiber optic transceiver. This driver currently supports vlan, fdb, mdb & mirror dsa switch operations. Signed-off-by: Woojung Huh --- drivers/net/dsa/Kconfig |2 + drivers/net/dsa/Make

RE: [PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-08 Thread Woojung.Huh
t; Either of these may connect directly to a host processor or to > > an external PHY. The SGMII port may interface to a fiber optic transceiver. > > > > This driver currently supports vlan, fdb, mdb & mirror dsa switch > > operations. > > > > Signed-off-b

  1   2   >