カテゴリー: Broadcom

WZR-900DHPと-O3、それとSFE

WZR-900DHP (LEDE-Project master)にて、gccの-O3オプションとSFEドライバをそれぞれ使用しWAN -> LANを計測してみた結果。

S751/C (Client) — (192.168.15.0/24, WAN) — WZR-900DHP — (192.168.12.0/24, LAN) — 自作PC (Server)

Speed Log
default 385Mbps
Connecting to host 192.168.12.176, port 5201
[  4] local 192.168.15.1 port 50066 connected to 192.168.12.176 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  46.1 MBytes   386 Mbits/sec                  
[  4]   1.00-2.00   sec  46.0 MBytes   386 Mbits/sec                  
[  4]   2.00-3.00   sec  45.4 MBytes   380 Mbits/sec                  
[  4]   3.00-4.00   sec  46.1 MBytes   387 Mbits/sec                  
[  4]   4.00-5.00   sec  45.9 MBytes   385 Mbits/sec                  
[  4]   5.00-6.00   sec  46.0 MBytes   387 Mbits/sec                  
[  4]   6.00-7.00   sec  46.0 MBytes   386 Mbits/sec                  
[  4]   7.00-8.00   sec  46.1 MBytes   386 Mbits/sec                  
[  4]   8.00-9.00   sec  45.9 MBytes   386 Mbits/sec                  
[  4]   9.00-10.00  sec  46.0 MBytes   386 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   460 MBytes   385 Mbits/sec                  sender
[  4]   0.00-10.00  sec   460 MBytes   385 Mbits/sec                  receiver

iperf Done.
        
-O3, gcc-7.x 382Mbps
Connecting to host 192.168.12.176, port 5201
[  4] local 192.168.15.1 port 50136 connected to 192.168.12.176 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  43.5 MBytes   364 Mbits/sec                  
[  4]   1.00-2.00   sec  46.0 MBytes   385 Mbits/sec                  
[  4]   2.00-3.00   sec  46.9 MBytes   394 Mbits/sec                  
[  4]   3.00-4.00   sec  46.8 MBytes   392 Mbits/sec                  
[  4]   4.00-5.00   sec  45.5 MBytes   382 Mbits/sec                  
[  4]   5.00-6.00   sec  41.6 MBytes   349 Mbits/sec                  
[  4]   6.00-7.00   sec  46.8 MBytes   393 Mbits/sec                  
[  4]   7.00-8.00   sec  47.0 MBytes   393 Mbits/sec                  
[  4]   8.00-9.00   sec  46.9 MBytes   394 Mbits/sec                  
[  4]   9.00-10.01  sec  45.5 MBytes   378 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.01  sec   456 MBytes   382 Mbits/sec                  sender
[  4]   0.00-10.01  sec   456 MBytes   382 Mbits/sec                  receiver

iperf Done.
        
SFE(#1269) 446Mbps
Connecting to host 192.168.12.176, port 5201
[  4] local 192.168.15.1 port 50198 connected to 192.168.12.176 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  53.5 MBytes   449 Mbits/sec                  
[  4]   1.00-2.00   sec  53.8 MBytes   450 Mbits/sec                  
[  4]   2.00-3.00   sec  52.2 MBytes   439 Mbits/sec                  
[  4]   3.00-4.00   sec  53.0 MBytes   445 Mbits/sec                  
[  4]   4.00-5.00   sec  52.9 MBytes   444 Mbits/sec                  
[  4]   5.00-6.00   sec  53.4 MBytes   446 Mbits/sec                  
[  4]   6.00-7.00   sec  53.1 MBytes   447 Mbits/sec                  
[  4]   7.00-8.00   sec  53.1 MBytes   446 Mbits/sec                  
[  4]   8.00-9.00   sec  53.2 MBytes   446 Mbits/sec                  
[  4]   9.00-10.00  sec  53.5 MBytes   448 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   532 MBytes   446 Mbits/sec                  sender
[  4]   0.00-10.00  sec   532 MBytes   446 Mbits/sec                  receiver

iperf Done.
        

gccのオプションを変更したファームでは、最大値こそ大きいものの頻繁に速度が落ちる現象が発生しており、最終値はデフォルト設定のファームをわずかに下回った。
SFEドライバを含むファームは、”劇的に” という程まではいかないものの、相変わらずしっかりと伸ばしてくれた。

WZR-900DHPにメーカーファームを書き込む(with シリアル)

OpenWrt/LEDE-Projectのファームウェアを書き込んだWZR-900DHPを、メーカー純正ファームに戻す。ただし、WZR-900DHPのファームはbuffaloencでデコードできないため、OpenWrt/LEDE-Project化する前にmtdブロックのバックアップが必要。書き戻しの際必要なのは、mtd2, mtd4 辺りで、たぶんどちらか片方でも問題ない(はず)。
シリアル無しの環境での戻し方については、2chのOpenWrt 13スレ 430レス辺りに詳しく書いている方がいます。

状態の確認

WZR-900DHPに電源を投入して起動、すぐに

Bootloader version v0.05 boot_version v0.05
Project name : WG9116H33
Press CTRL+C to cancel startup...
Device eth0:  hwaddr B0-C7-45-56-58-63, ipaddr 192.168.1.1, mask 255.255.255.0
        gateway not set, nameserver not set

と表示されるので、このタイミングで Ctrl+C でブートを中断しCFE ブートローダのコンソールに入る。
一度念のため

nvram get bootpartition

で、起動するパーティションが “0” になっているかを確認。

以下は必要性は不明なものの、個人的に実行している手順。

flash -erase nflash1.trx
flash -erase nflash1.trx2

nflash1.trx, nflash1.trx2 内の削除。

WZR-900DHP”2″ファームを放り込む

最初から900DHPファームを放り込むと上手くいかないため、先にWZR-900DHP2のメーカーファームをbuffaloencでデコードしたものを放り込む。

flash -noheader 192.168.1.2:wzr-900dhp2_jp-218.dec nflash1.trx

完了したら、reboot を実行して再起動し、ブートはキャンセルせずそのままカーネルのブートまで続けさせる。途中、一度再起動が掛かるので、この際再び Ctrl+C でキャンセルする。

WZR-900DHPのmtdを放り込む

バックアップ済みのmtdブロックを投入する。

flash -noheader 192.168.1.2:wzr-900dhp_mtdblk2.bin nflash1.trx

書き込みが完了したら再起動する。途中キャンセルはせず、自動的な再起動が何度か行われる。

ファームの更新

コンソールに流れるログが落ち着いたら、バックアップしてあったmtdブロックのファームはバージョンが古いことがあるため、ルータの更新画面などから更新を行っておく。