[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


[OpenWrt-Devel] the "right" rbtree lib for openwrt?

2018-10-13 Thread Dave Taht
I'm in search of the "right" rbtree library to use to solve this bug in babel

https://github.com/dtaht/babeld/issues/31

I'm leaning towards libdict at the moment, but there are dozens. any
opinions? I wouldn't mind storing the red bit in the pointer,
across 36 different platforms

-- 

Dave Täht
CTO, TekLibre, LLC
http://www.teklibre.com
Tel: 1-831-205-9740

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