Re: [OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

2018-10-14 Thread John Crispin


On 14/10/2018 23:25, Linus Walleij wrote:

On Sun, Oct 14, 2018 at 10:47 PM Hauke Mehrtens  wrote:


There is a typo in your script, it should be
ucidef_set_interfaces_lan_wan, with an s and not
ucidef_set_interface_lan_wan.

Yeah I noticed too, thanks. I'm still experimenting with it.
Is there another DSA switched device I can look at for
inspiration?

Yours,
Linus Walleij



Hi Linus

target/linux/mediatek uses DSA

    John




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

2018-10-14 Thread Hauke Mehrtens
On 10/14/2018 11:25 PM, Linus Walleij wrote:
> On Sun, Oct 14, 2018 at 10:47 PM Hauke Mehrtens  wrote:
> 
>> There is a typo in your script, it should be
>> ucidef_set_interfaces_lan_wan, with an s and not
>> ucidef_set_interface_lan_wan.
> 
> Yeah I noticed too, thanks. I'm still experimenting with it.
> Is there another DSA switched device I can look at for
> inspiration?
> 
> Yours,
> Linus Walleij
> 

That was more or less the only change I did when I tried DSA on the
lantiq target.

The Turris Omnia uses DSA:
https://git.openwrt.org/9f3f61a0d968fbe7b93899f948f3c34612683ba6
And some other targets, I just greped for CONFIG_NET_DSA to find the
other target.

We are still missing a script to convert a swconfig configuration to a
bridge configuration for DSA.

Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

2018-10-14 Thread Linus Walleij
On Sun, Oct 14, 2018 at 10:47 PM Hauke Mehrtens  wrote:

> There is a typo in your script, it should be
> ucidef_set_interfaces_lan_wan, with an s and not
> ucidef_set_interface_lan_wan.

Yeah I noticed too, thanks. I'm still experimenting with it.
Is there another DSA switched device I can look at for
inspiration?

Yours,
Linus Walleij

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

2018-10-14 Thread Hauke Mehrtens
On 10/13/2018 08:31 PM, Linus Walleij wrote:
> Hi,
> 
> I'm having trouble figuring out how to get a proper DSA switch
> up with a 02_network script. NB: this is on a newer kernel
> v4.19+patches just using DSA for the switches, no switchdev!
> 
> These platforms (gemini) have eth0 and eth1, sometimes LAN
> is on eth1 and WAN on eth0 to complicate things.
> I used to ifconfig everything in place.
> 
> The below mostly get things right at bootstrap, so eth1 comes
> up as LAN (192.168.1.1) and eth0 as WAN.
> 
> But it does not bring the DSA child interfaces online ("lan1"
> thru "lan4" and "wan"). I can do it manually of course. But that
> is not very good for a default install :(
> 
> Any hints for how to make the DSA children go online
> automatically after eth0/eth1 (the CPU ports) come online?
> 
> #!/bin/sh
> 
> . /lib/functions/uci-defaults.sh
> 
> board_config_update
> 
> board=$(board_name)
> 
> case "$board" in
> storlink,gemini324)
>   # These are all connected to eth1 thru VSC7385
> ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
> ;;
> itian,sq201)
> # These are all connected to eth1 thru VSC7395x
> ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
> ;;
> dlink,dir-685)
> # These are all connected to eth0 thru RTL8366RB
> ucidef_set_interface_lan_wan "lan0 lan1 lan2 lan3" "wan"
> ;;
> esac
> 
> exit 0
> 
> Yours,
> Linus Walleij

There is a typo in your script, it should be
ucidef_set_interfaces_lan_wan, with an s and not
ucidef_set_interface_lan_wan.

Hauke



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Right 02_network script for DSA switched boards (v4.19)

2018-10-13 Thread Linus Walleij
Hi,

I'm having trouble figuring out how to get a proper DSA switch
up with a 02_network script. NB: this is on a newer kernel
v4.19+patches just using DSA for the switches, no switchdev!

These platforms (gemini) have eth0 and eth1, sometimes LAN
is on eth1 and WAN on eth0 to complicate things.
I used to ifconfig everything in place.

The below mostly get things right at bootstrap, so eth1 comes
up as LAN (192.168.1.1) and eth0 as WAN.

But it does not bring the DSA child interfaces online ("lan1"
thru "lan4" and "wan"). I can do it manually of course. But that
is not very good for a default install :(

Any hints for how to make the DSA children go online
automatically after eth0/eth1 (the CPU ports) come online?

#!/bin/sh

. /lib/functions/uci-defaults.sh

board_config_update

board=$(board_name)

case "$board" in
storlink,gemini324)
  # These are all connected to eth1 thru VSC7385
ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
;;
itian,sq201)
# These are all connected to eth1 thru VSC7395x
ucidef_set_interface_lan_wan "lan1 lan2 lan3 lan4" "eth0"
;;
dlink,dir-685)
# These are all connected to eth0 thru RTL8366RB
ucidef_set_interface_lan_wan "lan0 lan1 lan2 lan3" "wan"
;;
esac

exit 0

Yours,
Linus Walleij

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel