Re: [RFC PATCH net-next] net: dsa: microchip: implement multi-bridge support

From: Oleksij Rempel
Date: Tue Nov 16 2021 - 08:17:07 EST


On Tue, Nov 16, 2021 at 02:47:23PM +0200, Vladimir Oltean wrote:
> On Tue, Nov 16, 2021 at 09:39:03AM +0100, Oleksij Rempel wrote:
> > On Tue, Nov 16, 2021 at 01:45:46AM +0200, Vladimir Oltean wrote:
> >
> > .....

> > Probably I need to signal it some how from dsa driver, to let linux
> > bridge make proper decision and reduce logging noise.
>
> What logging noise?

I get this with current ksz driver:
[ 40.185928] br0: port 2(lan2) entered blocking state
[ 40.190924] br0: port 2(lan2) entered listening state
[ 41.043186] br0: port 2(lan2) entered blocking state
[ 55.512832] br0: port 1(lan1) entered learning state
[ 61.272802] br0: port 2(lan2) neighbor 8000.ae:1b:91:58:77:8b lost
[ 61.279192] br0: port 2(lan2) entered listening state
[ 63.113236] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 63.123314] br0: port 2(lan2) entered blocking state
[ 68.953098] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 70.872840] br0: port 1(lan1) entered forwarding state
[ 70.878183] br0: topology change detected, propagating
[ 70.883820] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 83.672804] br0: port 2(lan2) neighbor 8000.ae:1b:91:58:77:8b lost
[ 83.679181] br0: port 2(lan2) entered listening state
[ 85.113244] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 85.123313] br0: port 2(lan2) entered blocking state
[ 97.753160] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 103.513076] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 105.432801] br0: port 2(lan2) neighbor 8000.ae:1b:91:58:77:8b lost
[ 105.439221] br0: port 2(lan2) entered listening state
[ 107.113238] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 107.123326] br0: port 2(lan2) entered blocking state
[ 127.192807] br0: port 2(lan2) neighbor 8000.ae:1b:91:58:77:8b lost
[ 127.199220] br0: port 2(lan2) entered listening state
[ 129.113249] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 129.123378] br0: port 2(lan2) entered blocking state
[ 149.592804] br0: port 2(lan2) neighbor 8000.ae:1b:91:58:77:8b lost
[ 149.600308] br0: port 2(lan2) entered listening state
[ 151.113276] br0: received packet on lan1 with own address as source address (addr:00:0e:cd:00:cd:be, vlan:0)
[ 151.125213] br0: port 2(lan2) entered blocking state

Probably I have wrong expectation...

> > And since STP state is not directly configurable on this switch, it
> > probably means receive/transmit enable state of the port. So, packets
> > with matching MAC should be forwarded even if port is in the receive
> > disabled state. Correct?
>
> In the context we've been discussing so far, "forwarding" has a pretty
> specific meaning, which is autonomously redirecting from one front port
> to another. For link-local packets, what you want is "trapping", i.e.
> send to the CPU and to the CPU only.

Ok. Thank you!

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |