Skip to content

Commit d35d92a

Browse files
InsaneKnightrobimarko
authored andcommitted
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: openwrt/openwrt#19444 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent 4971559 commit d35d92a

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

target/linux/ath79/generic/base-files/etc/board.d/02_network

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ ath79_setup_interfaces()
136136
;;
137137
airtight,c-75)
138138
ucidef_add_switch "switch0" \
139-
"0@eth0" "2:wan" "3:lan" "6@eth1"
139+
"0u@eth0" "2:wan" "3:lan" "6u@eth1"
140140
;;
141141
alfa-network,ap121fe)
142142
ucidef_set_interface_lan "eth0 usb0"
@@ -200,7 +200,7 @@ ath79_setup_interfaces()
200200
tplink,tl-wdr4900-v2|\
201201
tplink,tl-wdr7500-v3)
202202
ucidef_add_switch "switch0" \
203-
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
203+
"0u@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6u@eth0" "1:wan"
204204
;;
205205
buffalo,bhr-4grv|\
206206
buffalo,wzr-hp-g450h)
@@ -210,11 +210,11 @@ ath79_setup_interfaces()
210210
buffalo,bhr-4grv2|\
211211
trendnet,tew-823dru)
212212
ucidef_add_switch "switch0" \
213-
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
213+
"0u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth0"
214214
;;
215215
buffalo,wzr-450hp2)
216216
ucidef_add_switch "switch0" \
217-
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
217+
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0u@eth0"
218218
;;
219219
buffalo,wzr-600dhp|\
220220
buffalo,wzr-hp-ag300h|\
@@ -287,7 +287,7 @@ ath79_setup_interfaces()
287287
comfast,cf-wr650ac-v2|\
288288
zyxel,nbg6616)
289289
ucidef_add_switch "switch0" \
290-
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
290+
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth1"
291291
;;
292292
compex,wpj344-16m|\
293293
compex,wpj563)
@@ -301,7 +301,7 @@ ath79_setup_interfaces()
301301
dell,apl26-0ae|\
302302
dell,apl27-0b1)
303303
ucidef_add_switch "switch0" \
304-
"0@eth0" "2:lan:1" "3:lan:2" "6@eth1"
304+
"0u@eth0" "2:lan:1" "3:lan:2" "6u@eth1"
305305
;;
306306
devolo,dlan-pro-1200plus-ac|\
307307
devolo,magic-2-wifi)
@@ -318,11 +318,11 @@ ath79_setup_interfaces()
318318
;;
319319
dlink,dap-2695-a1)
320320
ucidef_add_switch "switch0" \
321-
"0@eth0" "2:lan" "3:wan" "6@eth1"
321+
"0u@eth0" "2:lan" "3:wan" "6u@eth1"
322322
;;
323323
dlink,dap-3662-a1)
324324
ucidef_add_switch "switch0" \
325-
"0@eth0" "1:lan:2" "2:lan:1" "6@eth1"
325+
"0u@eth0" "1:lan:2" "2:lan:1" "6u@eth1"
326326
;;
327327
dlink,dch-g020-a1)
328328
ucidef_add_switch "switch0" \
@@ -393,7 +393,7 @@ ath79_setup_interfaces()
393393
;;
394394
jjplus,jwap230)
395395
ucidef_add_switch "switch0" \
396-
"0@eth0" "5:wan:1" "1:lan:2" "6@eth1"
396+
"0u@eth0" "5:wan:1" "1:lan:2" "6u@eth1"
397397
;;
398398
joyit,jt-or750i)
399399
ucidef_set_interface_wan "eth1"
@@ -416,7 +416,7 @@ ath79_setup_interfaces()
416416
;;
417417
librerouter,librerouter-v1)
418418
ucidef_add_switch "switch0" \
419-
"0@eth0" "5:wan" "6@eth1" "4:lan"
419+
"0u@eth0" "5:wan" "6u@eth1" "4:lan"
420420
;;
421421
longdata,aps256)
422422
ucidef_set_interface_wan "eth1"
@@ -512,7 +512,7 @@ ath79_setup_interfaces()
512512
;;
513513
ruckus,r500)
514514
ucidef_add_switch "switch0" \
515-
"6u@eth0" "5:lan:1" "3:lan:2" "0@eth1"
515+
"6u@eth0" "5:lan:1" "3:lan:2" "0u@eth1"
516516
;;
517517
teltonika,rut955|\
518518
teltonika,rut955-h7v3c0)
@@ -527,7 +527,7 @@ ath79_setup_interfaces()
527527
tplink,archer-d7-v1|\
528528
tplink,archer-d7b-v1)
529529
ucidef_add_switch "switch0" \
530-
"0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
530+
"0u@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6u@eth0" "2:wan:4" "1:wan:5"
531531
;;
532532
tplink,deco-m4r-v1|\
533533
tplink,deco-s4-v2)
@@ -567,7 +567,7 @@ ath79_setup_interfaces()
567567
tplink,tl-wr1043nd-v3|\
568568
tplink,tl-wr1045nd-v2)
569569
ucidef_add_switch "switch0" \
570-
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
570+
"0u@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6u@eth0"
571571
;;
572572
tplink,tl-wr2543-v1)
573573
ucidef_add_switch "switch0" \

target/linux/ath79/nand/base-files/etc/board.d/02_network

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ath79_setup_interfaces()
1313
;;
1414
domywifi,dw33d)
1515
ucidef_add_switch "switch0" \
16-
"0@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth1"
16+
"0u@eth0" "1:wan" "2:lan" "3:lan" "4:lan" "5:lan" "6u@eth1"
1717
;;
1818
dongwon,dw02-412h-64m|\
1919
dongwon,dw02-412h-128m)
@@ -42,7 +42,7 @@ ath79_setup_interfaces()
4242
;;
4343
linksys,ea4500-v3)
4444
ucidef_add_switch "switch0" \
45-
"6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0"
45+
"6u@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0u@eth0"
4646
;;
4747
netgear,pgzng1)
4848
ucidef_set_interfaces_lan_wan "eth1" "eth0"
@@ -81,7 +81,7 @@ ath79_setup_interfaces()
8181
zyxel,emg2926-q10a|\
8282
zyxel,nbg6716)
8383
ucidef_add_switch "switch0" \
84-
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
84+
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6u@eth1"
8585
;;
8686
*)
8787
ucidef_set_interfaces_lan_wan "eth0" "eth1"

0 commit comments

Comments
 (0)