[][Add default setting of dsa unused port to support dual cpu port]
[Description]
Add default setting of dsa unused port to support dual cpu port.
The dsa unused ports are grouped into reserved vlan 2 group in default
for the case that CPU GMAC1/GMAC2 are connected to switch port6/port5.
Netsys -- GMAC1 -- port6(dsa cpu port) -- port0~3 (LAN ports)
-- GMAC2 -- port5(unused port) switch -- port4 (WAN port)
[Release-log]
When use Linux DSA framework which supports the switch with 1 CPU port
only, the bandwidth benefit of the switch with 2 CPU ports can not be
gained.
This patch can seperate switch ports into "LAN" and "WAN" group.
------------ -------------------------------------------
| --GMAC1|---|port6 [DSA] port0 ~ port3| (LAN)
|CPU | |----------------- switch ----------------|
| --GMAC2|---|port5 [DSA unused port in vlan2] port4| (WAN)
------------ -------------------------------------------
From the hardware view:
The switch cpu port6 in "LAN" group are connected to GMAC1 of CPU.
The switch cpu port5 in "WAN" group are connected to GMAC2 of CPU.
Therefore, the bandwidth benefit of 2 switch CPU ports can be gained.
From the software view:
"LAN" ports are controlled by dsa driver and dsa framewrok. The
interface names are lan0, lan1, lan2, and lan3.
"WAN" ports are included into reserved vlan 2 group by this patch
of DSA driver when they are not existed in .dts file. Linux DSA
framework treats switch ports that do not exist in .dts file as unused
ports, and does not control them. Therefore, the unused ports are
grouped as a virtual dumb switch, and the WAN port traffic can go
through the dumb switch.
Change-Id: I08736b6a9ad390d9a2a05927075a6c666f9f4755
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4688542
1 file changed