Adding OpenWrt support for Xiaomi AX3600 (Part 1)

strange that a kernel update would do all this mess
can we test if old firmware still works?

about pppoe previously it worked or it's the first time you test this?

Hm, I just tested on AX9000 and NAT offload works for sure.
I get full gigabit with 0 retries and like 1% CPU load on my notebook.

BTW Upstream was really quick to add the QUP6 I2C controller.
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=abe66bb7a2f6

Its weird as I have IPQ8074 DTS patches that are month old and this was sent like couple of days ago.

1 Like

First time testing it.

I didn't test with ECM until today because I forgot about it lol.

Yeah, PPoE kernel module is crashing for whatever reason.
It was working before for sure.

you got lucky with the reviewer

1 Like

I find that MSM list is like that, its either Bjorn stumbles upon that patch and just merges it or I need to send it like 3 times

1 Like

there must be some specific time when they are free and check the new patch... if it does fall in the backlog have it will probably get ignored.

Sure looks like it.

BTW, without the ECM PPoE kmod PPoE works fine.
Honestly, no idea why it broke.

1 Like

no kernel panic?

No, I just see that it insmods the PPPoE module silently again in the logread.
I wish it panicked.

Thank you all for creating support for such cheap and powerful router.

@robimarko I noticed there is mistype in AX6 commit message
https://github.com/robimarko/openwrt/commit/f4395aecc4e1036f89eb45c9820e5d7ebbe16441

nvram set flag_boor_rootfs=1
nvram set flag_boor_rootfs=0

I am using AX3600-5.10-restart branch build for AX6 with nss and ecm modules enabled (except pppoe) for 2 days and everything is working.
Offloading definitely is working. NAT generates no CPU load and stats/ipv4 is not 0 for rx ant tx.
LAN-LAN performance 944 Mbits/sec
LAN-WLAN performance is 536 Mbits/sec (Intel AX200 80MHz 1.2Gbps) but looks like limited by CPU

CPU:   0% usr   0% sys   0% nic  70% idle   0% io   0% irq  29% sirq
Load average: 1.25 1.16 1.07 4/85 13580
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
   10     2 root     RW       0   0%  24% [ksoftirqd/0]

With stock firmware I was getting 800 Mbits/sec LAN-WLAN with same configuration.
Maybe that's why some users see performance drop.

For the memory leak, I haven't noticed any problems. Free memory is hovering between 80-120 MB

That's on me. Hope it didn't cause problems.

Right now there's no offloading for WiFi

It's hard to compare wireless performance with other users, because the medium conditions (i.e., channel noise, neighbors, etc) may not be comparable. Nevertheless, my AX3600 running the latest OpenWRT build from @robimarko's AX3600-5.10-restart branch can get much better wireless speeds (for that radio configuration) provided that ECM is disabled. The throughput falls to your values as soon as I enable ECM. Also, the values would get slightly better (i.e., more consistent) if reg data was ok and I could enable the 160Mhz channel.

image

(EDIT: I can see you already check the TX stats)

I ran command "rmmod ecm"
Now qca-nss-drv/stats/ipv4 value for ipv4_tx_* stopped increasing, but ipv4_rx_* is still increasing.
LAN-WLAN speed increased to 756 Mbits/sec (iperf3) with exact same CPU usage as before.

LAN-LAN speed is almost the same (930 Mbits/sec) but with a lot higher CPU usage

CPU:   0% usr   0% sys   0% nic  70% idle   0% io   0% irq  28% sirq
Load average: 0.04 0.01 0.07 4/83 14763
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
   16     2 root     RW       0   0%   3% [ksoftirqd/1]

Just a guess, but could it be when LAN is offloaded, but WLAN is not it causes additional CPU usage and as result lower performance, compared to when both done in software.

1 Like

Thank you for your time, those are nice findings.
In my current setup the LAN is wired in external switches, so I never had the chance to properly test LAN-LAN (i.e., it would require removing one of the AX3600s and test it outside the usual environment).

I'm planning to stick with 100mbps fiber for as long as possible and use Cake SQM.
I wonder if we don't use the NSS's fq_codel, will openwrt's processing speed be stuck in the slower cpu core of 1.0ghz/1.4ghz?
If hardware offloading is disabled in order to use SQM then would R7500 (usb port advantage) and R7800 be considered better for running openwrt than AX3600/AX6?

There won't be much difference if it's 100mbps

The difference between 1.4ghz and 1.7ghz would only be noticeable in gaming usage though

Even in its present state, the CPU isn't the real problem to shape 100mbps; my very early and far too incomplete testing yielded something closer to <400mbps (using CAKE). However, I must stress that it's hard to say what are the real limits because these are very early days, and we have all sorts of inefficiencies and CPU overheads that may get sorted later on.

The real issue may be the memory leak. When I tried shaping my 500mbps connection, the router eventually crashed. I was refraining from commenting on this because I don't have serial access to gather proper debugging information, and there are quite a few higher priority things to solve first (i.e., CAKE is nice to have but only after all basic support is working fine).

It's still quite early in the game, but things are looking promising.
I am daily driving this build without too many issues.