Adding OpenWrt support for Xiaomi AX3600 (Part 1)

This is actually interesting. It seems not so much – one core on 90+%, other two 70% and 60%, one some low number. But sometimes, it is equally distributed.



But sometimes, it is quite equally distributed on all cores at around 60-70%. Once I got 97% on core 0 and really low load on all others. The router looks quite moody :smiley:

The irqbalance seems quite bad actually – puts load on just one core and takes down the speed. I would have to manually assign the jobs to the cores, which I don't want to play with.

Anyway, I don't need any crazy speeds. I am happy to be on OpenWRT again and not on the stock Xiaomi firmware where I have no idea what information they collect and with its limited options. I would also test the speed just within the network, not through wan out as now, but I don't have any gadgets for it here now.

Thank you for your time. You guys are really amazing here on this forum! :+1:

1 Like

Try to add this to your local startup file:

#assign 4 rx interrupts to each cores
echo 8 > /proc/irq/50/smp_affinity
echo 4 > /proc/irq/51/smp_affinity
echo 2 > /proc/irq/52/smp_affinity
echo 1 > /proc/irq/53/smp_affinity

#assign 3 tcl completions to 3 CPUs
echo 4 > /proc/irq/73/smp_affinity
echo 2 > /proc/irq/74/smp_affinity
echo 1 > /proc/irq/75/smp_affinity

SW offload still needs to be enabled as well as packet steering, irqbalance has to be turned off.

The first core high load is normal on PPPoE, only way to make that lower is if Ansuel or Robi wants to dive into the NSS accel crap. Non the less with the above I am able to get near gigabit speeds on wire (920-940Mbits DL).

5 Likes

In your 160Mhz example, you can select any channel from 100, 104, 108, 112, 116, 120, 124 to 128 to have 160Mhz from 100 to 128.

But I wonder what is the functional difference of selecting any one of those ?
If (in your example) your neighbor has already selected chan 100 @160Mhz, would it be better to select any of the others, but not 100 ?
I notice Wifi analyzers/scanners will know what chan was selected.

There are more speed/cpu load tests in the thread, I did some here:
https://forum.openwrt.org/t/adding-openwrt-support-for-xiaomi-ax3600/55049/7036

1 Like

I seem to have an issue after installing the lastest OpenWRT build for this device. I tried to set it one of the radios to 5GHz 160MHz wide and I keep getting a "Wireless is not associated" error. How do I fix that?

I had the same problem, install the 2022-05-30 build to get the WiFi working, it seems that due to a failing build of hostpad or new patches (I'm not totally sure) the latest build has problems with WiFi in some cases

2 Likes

In the current state, safe is not. But I have been looking for information and several boards have double uboot, such as

This model has everything in duplicate. What I don't know is how to choose the second uboot. If we knew how to force the second uboot to load, we could keep the original uboot and test the secondary one, without the need for Jtag. Looking for other bootlogs on the internet, there are other models with only two uboot, and the rest of the partitions like ours, others with two uboot and two uboot_env, etc... I think the double uboot mechanism exists, if we find out how it works, it will could try.
uboot is referenced like appsbl and the second uboot is appsbl_1
Do you think this information is correct?

Just reporting, after flashing latest @robimarko build r0-c803843 from today, these wireless options are still missing from luci:

  • 802.11r Fast Transition
  • Enable WPS pushbutton, requires WPA(2)-PSK/WPA3-SAE
  • Also any encryption with EAP or SAE still appears in red, as @McGiverGim reported before.

It will be good to know if it only happens to ax3600 or any other device using master. Someone has a device to test it? To open or not a bug in the official openwrt GitHub.

Problem is from master, like Ansuel said.
I followed your idea and flashed today snapshoot in my tplink archer c7 v2 and it has the same problem.
I'm guessing it's only a matter of time.
(I don't have an account, so I didn't open a new issue report.)

3 Likes

this worked very well @dchard thank you

Alongside what I have done was to compile / build with -mtune=cortex-a53 -march=armv8.5-a+crypto ; I also have mwan3 using eth0/1
using a oneplus9 I get the following

and very good latency results

using an ax201 the results are not as good with about 800mbps avg and bufferbload latency at about +47ms (grade b)

iwinfo rate over the 1Gbps which I presume is acomplished via mwan3 (?)

no issues with memory either (although i drop vm caches regularly via crontab)

1 Like

Try without it.

In general (not specific to your usecase), most of the load comes from two place:

  1. PPPoE: single thread, loads CPU0. On gigabit wired speeds, you can see 70-80% CPU load on CPU0 with SW offload, pakctet steering and the optimization i told you enabled. But you can max out gigabit with it.

  2. Wifi: when I do Iperf3 on 160MHz AX on the LAN side, that loads pretty much all cores equally. Nicely distributed, but quite high still. 50-70% load across all cores.

If you combine the two (gigabit DL over PPPoE on top of AX wifi), that can cause this bufferbloat situation as the system runs out of CPU time. And dont forget that an ARM system loaded to 70-80% on all cores will have processing delay despite the fact that it is not maxed out (this is true to other architectures as well).

That is how I see it. Of course anything that lower the PPPoE or ath11k load will help: PPPoE acceleration (NSS) or wifi offload.

Interesting is that if you dont use PPPoE, SW offload does a much better job: no single core limit, but even beside that the NAT load is pretty low and well distributed across cores.

@robimarko thanks for the rebase, I am builiding it now. Will let you know.

1 Like

No, no, no.
A53 cores are ARMv8, the original ARMv8 march and not v8.5.

Also, why are you even changing the flags as -mcpu=cortex-a53 is being passed which sets the tuning and march already.
Passing the crypto feature is done automaticaly for WolfSSL and nothing else uses it.

Also, Fast roaming shows up for me in LuCi

1 Like

I tested the latest build 2022-06-11. Same problems there. Using still the build from 30.05.

1 Like

Of course you are right... should use instead 8.0-A... I don't use wolfssl but openssl ..ok go back to the default

In both cases, there is no need to override the default tuning as its already being tuned for the A53 core.

Whats the issue?

Some hostapd features are missing in luci, I think the root cause is described here:

3 Likes

I have pushed the fix for it, will send it upstream as well.
Images are building, it will take some time.
@sqrwv

5 Likes

Images are available. I like the new changelog concentrating on your changes :slight_smile:

2 Likes

Yeah, somebody finally added the Github release notes support to the autorelease method I am using so I switched to it today as the changelog generated by the addon was useless if force pushing.

1 Like