[OpenWrt-Devel] [PATCH] gemini: Bring up DSA switches

Linus Walleij linus.walleij at linaro.org
Sat Jul 13 07:04:14 EDT 2019


On Fri, Jul 12, 2019 at 8:57 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
> On 7/12/19 8:07 AM, Linus Walleij wrote:

> > +     # These are all connected to eth1 thru VSC7385
> > +     ucidef_set_interfaces_lan_wan "eth1 lan1 lan2 lan3 lan4" "eth0"
>
> This will create a bridge over eth1, lan1, lan2, lan3 and lan4, but I
> think you do not have to put eth1 into this bridge, it should be
> sufficient to have all the lanX in it.

It is really puzzling to me too :(

What I notice is that if I do this everything works fine and if eth1
is not included it doesn't.

This sequence also works fine:
ifconfig eth1 169.254.1.2 netmask 255.255.255.0 up
ifconfig lan1 up
ifconfig lan2 up
ifconfig lan3 up
ifconfig lan4 up

I think the reason is that the IP address is not assigned to
eth1 (the CPU port towards the switch/DSA).

Maybe other DSA switches are better with this? My dmesg
looks like this with eth1 included in the lan-facing interfaces:

[   52.704396] gemini-ethernet-port 6000c000.ethernet-port eth1: link
flow control: both
[   53.046012] br-lan: port 1(eth1) entered blocking state
[   53.170160] br-lan: port 1(eth1) entered disabled state
[   53.253455] device eth1 entered promiscuous mode
[   53.299150] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   53.388545] vsc73xx spi0.0: enable port 0
[   53.446029] vsc73xx spi0.0 lan1: configuring for phy/gmii link mode
[   53.526483] br-lan: port 2(lan1) entered blocking state
[   53.594789] br-lan: port 2(lan1) entered disabled state
[   53.665816] device lan1 entered promiscuous mode
[   53.728728] br-lan: port 1(eth1) entered blocking state
[   53.760176] br-lan: port 1(eth1) entered forwarding state
[   53.874449] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   54.000353] vsc73xx spi0.0: enable port 1
[   54.056099] vsc73xx spi0.0 lan2: configuring for phy/gmii link mode
[   54.142223] br-lan: port 3(lan2) entered blocking state
[   54.214679] br-lan: port 3(lan2) entered disabled state
[   54.266496] device lan2 entered promiscuous mode
[   54.308593] vsc73xx spi0.0: enable port 2
[   54.335298] vsc73xx spi0.0 lan3: configuring for phy/gmii link mode
[   54.377279] br-lan: port 4(lan3) entered blocking state
[   54.444497] br-lan: port 4(lan3) entered disabled state
[   54.515791] device lan3 entered promiscuous mode
[   54.588687] vsc73xx spi0.0: enable port 3
[   54.646048] vsc73xx spi0.0 lan4: configuring for phy/gmii link mode
[   54.726991] br-lan: port 5(lan4) entered blocking state
[   54.785910] vsc73xx spi0.0 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   54.844478] br-lan: port 5(lan4) entered disabled state
[   54.915911] device lan4 entered promiscuous mode
[   54.976533] br-lan: port 2(lan1) entered blocking state
[   55.007954] br-lan: port 2(lan1) entered forwarding state

After this I can ping the host:
# ping 169.254.1.1
PING 169.254.1.1 (169.254.1.1): 56 data bytes
64 bytes from 169.254.1.1: seq=0 ttl=64 time=2.049 ms
64 bytes from 169.254.1.1: seq=6 ttl=64 time=0.913 ms
64 bytes from 169.254.1.1: seq=25 ttl=64 time=1.268 ms
And the host can ping the device:
$ ping 169.254.1.2
PING 169.254.1.2 (169.254.1.2) 56(84) bytes of data.
64 bytes from 169.254.1.2: icmp_seq=1 ttl=64 time=1.12 ms
64 bytes from 169.254.1.2: icmp_seq=2 ttl=64 time=0.582 ms
64 bytes from 169.254.1.2: icmp_seq=3 ttl=64 time=0.576 ms
64 bytes from 169.254.1.2: icmp_seq=4 ttl=64 time=0.654 ms

But if I remove eth1 from the LAN facing interfaces it looks like
this:

[   52.433253] gemini-ethernet-port 6000c000.ethernet-port eth1: link
flow control: both
[   52.769503] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   52.925178] device eth1 entered promiscuous mode
[   52.987672] vsc73xx spi0.0: enable port 0
[   53.014460] vsc73xx spi0.0 lan1: configuring for phy/gmii link mode
[   53.054754] br-lan: port 1(lan1) entered blocking state
[   53.086323] br-lan: port 1(lan1) entered disabled state
[   53.119857] device lan1 entered promiscuous mode
[   53.160541] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   53.250938] vsc73xx spi0.0: enable port 1
[   53.309220] vsc73xx spi0.0 lan2: configuring for phy/gmii link mode
[   53.394269] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   53.476271] br-lan: port 2(lan2) entered blocking state
[   53.543459] br-lan: port 2(lan2) entered disabled state
[   53.604655] device lan2 entered promiscuous mode
[   53.686932] vsc73xx spi0.0: enable port 2
[   53.744974] vsc73xx spi0.0 lan3: configuring for phy/gmii link mode
[   53.820229] br-lan: port 3(lan3) entered blocking state
[   53.893505] br-lan: port 3(lan3) entered disabled state
[   53.964682] device lan3 entered promiscuous mode
[   54.047383] vsc73xx spi0.0: enable port 3
[   54.087228] vsc73xx spi0.0 lan4: configuring for phy/gmii link mode
[   54.128009] br-lan: port 4(lan4) entered blocking state
[   54.160537] br-lan: port 4(lan4) entered disabled state
[   54.194726] device lan4 entered promiscuous mode
[   54.284743] vsc73xx spi0.0 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   54.453740] br-lan: port 1(lan1) entered blocking state
[   54.485220] br-lan: port 1(lan1) entered forwarding state
[   54.883281] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

This kind of "should work".

But now I can't ping anything. As you can see what is missing,
since the eth1 is no longer part of the bridge, is this:
[   53.046012] br-lan: port 1(eth1) entered blocking state
[   53.170160] br-lan: port 1(eth1) entered disabled state

I wonder if it is some bug in my DSA driver or some basic assumption that
the network tools are making about the default state or so :/

I guess I keep digging around in it

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list