BPI-R4: Not getting full 10GBps speed on WAN

No. If you are routing between WAN and LAN interfaces then you don’t need bridger. Only if eth1 (or eth2) would also be members of lanbr0, then bridger would be needed for traffic between eth0 (DSA switch), eth1 and eth2 to bypass the CPU.

Yes, for that you will need it. That was the original motivation for that tool actually.

I’m wondering, would bridger help to get the PPEs involved when accessing files on the NVME drive?

No. For to accelerate that we need RSS/LRO in the Ethernet driver. And also note that the R4 only got a single PCIe lane for the slot intended for NVMe – so that limits the speed anyway already to 8 GT/s.

i build from source and usually i update every week or so. i have hardware flow offloading enabled in luci (checked first sw offloading, then hw offloading).

i dont know if i have a bridge between my ISPs ONT and my interface. Can i somehow figure that out? I have a symmetric 10gbit ftth connection from init7.ch

as soon as the patches are accepted, i will re-build and install and test - thanks! :slight_smile:

This being init7, I assume you connect the fiber patch cable directly from the SFP in the R4 to the OTO, right?

So no bridge in between.

FWIW, my R4 (iperf3 running on the R4) maxes out the 10g when uploading but sees a lot of retries and only about 4G downstream (very similar to yours). Not sure what is happening yet, presumably it does not keep up with ACKs?

To be able to terminate 10GBit/s on the device itself we will need to include RSS/LRO feature in the Ethernet driver.

Forwarding 10GBit/s is a different thing and already possible right now in either direction using the offloading engine, but not simultaneously. For bidirectional 10GBit/s forwarding we need @Dale’s patch for multiple PPE.

2 Likes

Thanks that’s super helpful to know - I really ought to get a proper 10G host to test.

Actually, we almost get there with speedtest:

root@bpir4:~# speedtest --test-server speedtest.init7.net:8080
Server #19:  speedtest.init7.net:8080 by  (0 km from you): 0 ms
Ping: 0 ms 
Jitter: 0 ms.

server selected profile detected: profile selected from server configuration

Download: 8611.52 Mbit/s                                    
Upload: 9436.23 Mbit/s

@oli: try that as few times?

1 Like

the results are a bit “special”:

root@OpenWrt:~# speedtest --test-server speedtest.init7.net:8080
Ping: 0 ms.
Jitter: 0 ms.

server selected profile detected: profile selected from server configuration

Download: 11045.35 Mbit/s                                    
Upload: 10217.85 Mbit/s

but i also got some of 6gbit up/down

@dangowrt does irqbalance help? Or is it not needed at all. from router use case, if they are offloaded by ppe there isn’t really any significant irq to balance right?

So we would need bridger only for hw-offloading beteen lan0/1/2/3/4 and wlan0/1? So the hw-offloading between wan and wlan0/1 (while being slaves of brlan0) would not need bridger? Is that correct?

Does it work on official image?

can it be summarized as you need bridger for hw-offload if it’s L2 traffic crossing ethX/ethY

don’t understand what you are saying.

I am working on a mainline kernel alternative… It works ok, but I am still working on upstreaming it.

Anyway, the flowtables solution of mine, does involve IP (L3) traffic over a bridge, as it depends on conntrack.

2 Likes

maybe this is what you are looking for

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/0edb7e3d2d7854cb390c7fc688cf2ed9b992a9db

1 Like

Some firewall or antivirus settings can slow speeds. Try disabling them temporarily to test.

@frank-w i compiled and installed kernel 6.14-rsslro2 from your repo and now there are no ethernet interfaces, like eth0, eth1, etc. If i manually load the wirelesss card module, mt7921e, it also doesn’t show up in ip a.

Am i missing something?

Procedure for installing new kernel:

###  Compilation machine
scp debian/bananapi-r4-image-6.14-rsslro2_6.14.0-1_arm64.deb  192.168.0.1:/root
scp /root/build/bpi-r4.itb   192.168.0.1:/boot


###  On gateway
dpkg -i bananapi-r4-image-6.14-rsslro2_6.14.0-1_arm64.deb

cp /boot/bananapi/bpi-r4/linux/dtb/bpi-r4-6.14.0-rsslro2.dtb /boot/bpi-r4.dtb
cp /boot/bananapi/bpi-r4/linux/uImage_6.14.0-rsslro2_nodt  /boot/uImage_nodt
cp /boot/bananapi/bpi-r4/linux/uEnv.txt         /boot/uEnv.txt

vim   /boot/uEnv.txt    # delete old kernel

reboot

Also, do you have 6.14.3 in the repo already? On another branch maybe?

Try reverting the latest change in ethernet driver which switches from rss to lro for mt7986 and some other changes. Imho it should work for r4,bit not tested after this change

I do not update the non-lts kernels normally to see changes i did there

Ah,i see you use the deb package…you should boot the itb file…not sure it is in the actual deb. And you miss the modules when only copy kernel itself

1 Like

Well, even if the ethernet drivers were not ok, wireless should work, no? Yet, it didn’t.

Anyway, I was just trying to check if the ethernet speed had increased. I installed 6-14-main, all fine now.

So, you’re paying more attention to 6.12? Ok, i’ll try that one to check latest mediatek drivers. The mt7922 card here, sometimes goes kind of slow.

And now, the .deb package does not have the itb file, have to copy it manually as displayed on the procedure above. The package does have all the modules listed in the .config file.

For wifi you need the modules for current kernel installed.