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

Jo-Philipp Wich jo at mein.io
Mon Apr 20 15:57:21 EDT 2020


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).

[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: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200420/2eff3523/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