]> git.ipfire.org Git - thirdparty/openwrt.git/commit
ath79: untag to cpu ports on 2-cpu-port devices by default 19444/head
authorEdward Chow <equu@openmail.cc>
Thu, 17 Jul 2025 11:29:10 +0000 (19:29 +0800)
committerRobert Marko <robimarko@gmail.com>
Thu, 19 Mar 2026 16:49:27 +0000 (17:49 +0100)
commitd35d92a54123c64dfe5dd89f64c2b41cbf5dc7c6
treeb1202457cc556ca57f9bfe53abb6250d03f40e07
parent49715596f9c821a86698928383b61c9da59f7249
ath79: untag to cpu ports on 2-cpu-port devices by default

Currently, devices having two cpu ports to the switch managed by swconfig,
especally those with qca955x, line tplink archer c7 v2 and linksys ea4500 v3,
use vlan on different cpu port to separate networks by default. (e.g. eth1.1
for lan, eth0.2 for wan)

However, untagging to these vlans cpu ports, and limiting vlans in the switch
on these devices could effectively offload the expense to process vlan tag from
cpu to the switch, and increase the throughput of lan <-> wan ipoe routing.

Tested on my tplink tl-wdr4900 v2, where ucidef_add_switch "switch0"
"0u@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6u@eth0" "1:wan" finally generates
on /etc/config/network:

config device
option name 'br-lan'
option type 'bridge'
list ports 'eth1'

config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.1.1/24'
option ip6assign '60'

config interface 'wan'
option device 'eth0'
option proto 'dhcp'

config interface 'wan6'
option device 'eth0'
option proto 'dhcpv6'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '2 3 4 5 0'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '1 6'

and the throughput of lan <-> wan ipoe routing with software flow offload
increases from around
[850 Mbps](https://openwrt.org/toh/tp-link/archer-c5-c7-wdr7500#nat_performance)
to 900 Mbps.

Signed-off-by: Edward Chow <equu@openmail.cc>
Link: https://github.com/openwrt/openwrt/pull/19444
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ath79/generic/base-files/etc/board.d/02_network
target/linux/ath79/nand/base-files/etc/board.d/02_network