1
0
Fork 0
forked from mirror/openwrt
openwrt/target/linux/ath79
Edward Chow d35d92a541 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>
2026-03-19 17:49:27 +01:00
..
base-files/etc/hotplug.d/ieee80211 ath79: migrate Archer C5 5GHz radio device paths 2022-03-31 18:07:29 +02:00
dts ath79: replace gpio-cascade on Buffalo WZR-HP-G300NH 2026-03-06 11:33:05 +01:00
files treewide: remove of_platform.h include 2026-02-04 00:50:06 +01:00
generic ath79: untag to cpu ports on 2-cpu-port devices by default 2026-03-19 17:49:27 +01:00
image ath79: tiny: increment compat version for RE355/RE450 2026-03-06 12:04:23 +01:00
mikrotik ath79: fix platform check image mikrotik nor 2025-12-05 10:26:59 +01:00
nand ath79: untag to cpu ports on 2-cpu-port devices by default 2026-03-19 17:49:27 +01:00
patches-6.12 kernel: refresh patches 2026-03-06 11:33:05 +01:00
tiny ath79: tiny: increment compat version for RE355/RE450 2026-03-06 12:04:23 +01:00
config-6.12 kernel: disable non layout u-boot,env 2025-11-28 01:20:33 +01:00
Makefile ath79: switch default kernel to 6.12 2025-08-20 23:30:49 +02:00
modules.mk