RE: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
> > I really need to monitor the DSA discussion to better contribute to its > success. > > I just found out the DSA API set_addr was removed last month due to not > > everybody is using it. It cited the Marvell switch was the only switch > > using > that > > API and found a new way to program the MAC address. But looking at that > > driver I found it simply uses a randomized MAC address. > > > > For big switch with many ports where the main function is forwarding that > MAC > > address may not matter. For small switch with 2 ports it acts more like an > Ethernet > > controller where the switch is mainly used for daisy chaining in a ring > network the MAC > > address can be used in feature like source address filtering. > > Hi Tristram > > The MAC address set by set_addr was only used for pause > frames. Nothing else. So a random address is fine. > > The switch itself should not be sending any other frames. > Yes, generally that is the main purpose. For new protocols like High-availability Seamless Redundancy (HSR) and Device Level Ring (DLR) that operate in a ring network, the switch needs to know the MAC address of the host so that it can filter the frame it sends. There is an experimental implementation of HSR in the kernel.
Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
> I really need to monitor the DSA discussion to better contribute to its > success. > I just found out the DSA API set_addr was removed last month due to not > everybody is using it. It cited the Marvell switch was the only switch using > that > API and found a new way to program the MAC address. But looking at that > driver I found it simply uses a randomized MAC address. > > For big switch with many ports where the main function is forwarding that MAC > address may not matter. For small switch with 2 ports it acts more like an > Ethernet > controller where the switch is mainly used for daisy chaining in a ring > network the MAC > address can be used in feature like source address filtering. Hi Tristram The MAC address set by set_addr was only used for pause frames. Nothing else. So a random address is fine. The switch itself should not be sending any other frames. Andrew
RE: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
> On Thu, Nov 16, 2017 at 06:41:24PM -0800, tristram...@microchip.com > wrote: > > From: Tristram Ha> > > > This series of patches is to modify the original KSZ9477 DSA driver so > > that other KSZ switch drivers can be added and use the common code. > > Hi Tristram > > http://vger.kernel.org/~davem/net-next.html > > It is better to send an RFC patchset while netdev is closed and not > send it to David. He will shout at you otherwise. Noted. I really need to monitor the DSA discussion to better contribute to its success. I just found out the DSA API set_addr was removed last month due to not everybody is using it. It cited the Marvell switch was the only switch using that API and found a new way to program the MAC address. But looking at that driver I found it simply uses a randomized MAC address. For big switch with many ports where the main function is forwarding that MAC address may not matter. For small switch with 2 ports it acts more like an Ethernet controller where the switch is mainly used for daisy chaining in a ring network the MAC address can be used in feature like source address filtering.
Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
Hello, please resubmit all of this KSZ switch work when the net-next tree opens up again as it is currently closed. Thank you.
Re: [PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
On Thu, Nov 16, 2017 at 06:41:24PM -0800, tristram...@microchip.com wrote: > From: Tristram Ha> > This series of patches is to modify the original KSZ9477 DSA driver so > that other KSZ switch drivers can be added and use the common code. Hi Tristram http://vger.kernel.org/~davem/net-next.html It is better to send an RFC patchset while netdev is closed and not send it to David. He will shout at you otherwise. Andrew
[PATCH v1 net-next 0/7] net: dsa: microchip: Modify KSZ9477 DSA driver in preparation to add other KSZ switch drivers
From: Tristram HaThis series of patches is to modify the original KSZ9477 DSA driver so that other KSZ switch drivers can be added and use the common code. There are several steps to accomplish this achievement. First is to rename some function names with a prefix to indicate chip specific function. Second is to move common code into header that can be shared. Last is to modify tag_ksz.c so that it can handle many tail tag formats used by different KSZ switch drivers. ksz_common.c will contain the common code used by all KSZ switch drivers. ksz9477.c will contain KSZ9477 code from the original ksz_common.c. ksz9477_spi.c is renamed from ksz_spi.c. ksz9477_reg.h is renamed from ksz_9477_reg.h. ksz_common.h is added to provide common code access to KSZ switch drivers. ksz_spi.h is added to provide common SPI access functions to KSZ SPI drivers. v1 - Each patch in the set is self-contained - Use ksz9477 prefix to indicate KSZ9477 specific code Tristram Ha (7): Replace license with GPL. Clean up code according to patch check suggestions. Rename some functions with ksz9477 prefix to separate chip specific code from common code. Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add more KSZ switch drivers. Break KSZ9477 DSA driver into two files in preparation to add more KSZ switch drivers. Add common functions in ksz_common.h so that other KSZ switch drivers can access code in ksz_common.c. Add ksz_spi.h for common functions used by KSZ switch SPI drivers. Prepare PHY for proper advertisement and get link status for the port. Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product name is always KSZ. drivers/net/dsa/microchip/Kconfig | 12 +- drivers/net/dsa/microchip/Makefile |4 +- drivers/net/dsa/microchip/ksz9477.c| 1334 .../microchip/{ksz_9477_reg.h => ksz9477_reg.h}| 23 +- drivers/net/dsa/microchip/ksz9477_spi.c| 188 +++ drivers/net/dsa/microchip/ksz_common.c | 1167 +++-- drivers/net/dsa/microchip/ksz_common.h | 232 drivers/net/dsa/microchip/ksz_priv.h | 256 ++-- drivers/net/dsa/microchip/ksz_spi.c| 216 drivers/net/dsa/microchip/ksz_spi.h| 82 ++ 10 files changed, 2127 insertions(+), 1387 deletions(-) create mode 100644 drivers/net/dsa/microchip/ksz9477.c rename drivers/net/dsa/microchip/{ksz_9477_reg.h => ksz9477_reg.h} (98%) create mode 100644 drivers/net/dsa/microchip/ksz9477_spi.c create mode 100644 drivers/net/dsa/microchip/ksz_common.h delete mode 100644 drivers/net/dsa/microchip/ksz_spi.c create mode 100644 drivers/net/dsa/microchip/ksz_spi.h -- 1.9.1