[OpenWrt-Devel] Port labels for DSA targets/devices

mail at adrianschmutzler.de mail at adrianschmutzler.de
Mon Apr 20 16:06:37 EDT 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Jo-Philipp Wich
> Sent: Montag, 20. April 2020 21:57
> To: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] Port labels for DSA targets/devices
> 
> Hi,
> 
> I'd also prefer approach #2 to eventually allow for some generic configuration
> and port layout discovery mechanism without the need for shipping
> mappings for each device.
> 
> 
> In case we cannot go this route and need to stick to whatever mixture
> upstream or the vendors are using, I propose to retain a syntax similar to the
> old "ucidef_add_switch" in the network scripts to keep a known mapping of
> DSA port names to their intended role and order - e.g.:
> 
>   ucidef_add_dsa "eth0:wan" \
>     "eth1:lan:4" "eth2:lan:3" "eth3:lan:2" "eth4:lan:1"
> 
> to configure "eth0" as wan port and "eth1" to "eth4" as br-lan bridge with
> sort order override in case the internal naming does not match the case
> labels (not relevant for CLI but will be used by e.g. LuCI).

Note that DSA devices might have additional separate devices labelled ethX as well, additional to the switch ports.
E.g. ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6" "eth0 eth2"

So, this might become confusing quite quickly if we start to rename to ethY here.

Just FYI at this point, haven't thought this one through yet.

Best

Adrian

> 
> [Not sure if we need the order override at all or if DT is consistently
> guaranteeing properly named devices in all cases...]
> 
> This will be a precondition to provide a more or less seamless UCI integration
> for DSA configuration at a later stage.
> 
> ~ Jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200420/d0c02a79/attachment.sig>
-------------- next part --------------
_______________________________________________
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