Adding OpenWrt support for QNAP QHora-301W

Wait, what was the problem?

Yeah, the performance increase is barely anything.

just do a "hdparm -tT" on /dev/mmcblk0p4

Yeah, seeing it now.

This could be a problem with the eMMC itself or with the interface to the SOC?

Its probably a driver problem, cause there appear to have been various HS400 to 200 fixes all over the MMC subsystem, especially since that eMMC has been on the market for like 5 years

Now that i have this working what if anything can i do to help get this device support official ?

1 Like

Yes please - make it official - I'd be very happy :slight_smile:

I wanted to enable nss-drv in 5.15 and load the 10Gbe drivers in user-space so I made a custom compile and wanted to contribute back!

I wrote a custom init script with a little bit of shell-foo to get the firmware for the 10Gbe ports loaded quick as possible and releasing it for others here (it is pretty well documented):

Things to note:

  • When the device boots or restarts, it runs the aq-fw-download on both interfaces simultaneously BUT it is a slow process that takes several minutes. Please wait for the 10Gbe ports to initialize if you are using them. The normal 1Gbe ports come up near instantly.

  • With my tests, including the SQM packages gave me full speeds out of the 10Gbe ports where before it did not (but I did not have to enable it).

  • If you want to get full use of your 10Gbe ports, be sure to go under firewall and enable the offloading. I also go under Network > Interfaces > Global Network Options and enable Packet Steering.

Here are my repos that I used in the build, including the extra scripts for the loading of the 10Gbe firmware:

https://github.com/FixedBit/openwrt/tree/qhora301w
https://github.com/FixedBit/nss-packages
https://github.com/FixedBit/qhora301w-files

My GitHub build is only for the QHora-301W.

Build Log

GitHub Build Action

Attribution for patches:

https://github.com/psi-c/openwrt
https://github.com/psi-c/nss-packages

Edit: Added new build with faster 10Gbe firmware load script.

5 Likes

Very nice, does this image change the mtd partition layout?
Or is it fully compatible with current scheme?
(IK they were making builds that broke it on the page for other hw)

Also, why does it take minutes to load in userland?
I'm surprised it would take any longer than uboot, it should cut the time in half if you can load them simultaneously.

Will be testing it shortly, and post feedback. thanks

Had some very strange issues, initially, thought they were likely to be caused by trying to keep old settings.. upgraded w. -n for a clean install and ran into the same.. changed a few interface settings (wan* to eth0) and then when that didn't work deleted wan6, and reboot ... suddenly worked fine. Probably something on my end.

Lots of wanted modules missing, so will be building..

Is the required bits for nss already in the main repo, or do I have to swap out the nss-packages (or patches) repo vs the ones it downloads during build (eg, if it downloads from your repo, no need)

Thanks again, I had issues with some api's I wasn't familiar with and never managed to get it 5.15 w. nss-drv .

It is 100% a clone of the original from robimarko so it does not mess with any partitions that theirs does not so you should be fine. You can use it over any builds installed with their method (using serial).

You know, this one I am not sure of either. The aq-fw-download utility loads it so very slow and if someone has tips on how to make it faster I am all ears! As an uneducated guess, it is because it is loading it outside of u-boot.

This is one I am not sure of. If anyone has issues like this also let me know and I can check into it. I know that since the aq-fw-download utility takes a long time, that could have had something to do with it. I usually delete the wan6 (and disable ipv6) before anything else so that may be it. If needed I can just throw in a script to delete it on first boot.

The modules missing is correct as I copied 100% of the repo from robimarko and just added the parts I needed. I actually do need to go in and compile the modules that work and host a repo since it seems there is a need for that now since this is not "officially supported." That is actually the reason I put up the entire repo and build info so others can see and build what they may need in the mean time.

Everything needed for the image with nss-drv is in my repo already and you can even look in the github action for the repo to see the options passed for the .config generation.

I was lucky that another person on this forum (forgot their name right now) put those patches in their repo for another router and they fixed the exact issues I was having trying to compile for the QHora. At the moment all this really is, is cobbling together the amazing work from others and then packaged in a way that works for this router. I do not have the others so I do not build for them.

The "additions" I did were the loading script for the 10Gbe nics and gathering the needed bits to make it work. The github action pulls over files from this repo so that it can activate the nics [SOURCE].

Also a side note, it pulls the nss files from a fork (different from robimarko's) so that it can apply those patches also [SOURCE].

I think I covered everything here and love the detailed feedback, if you need any help getting it compiled yourself for the modules let me know.

May I ask if you are using NSS-ECM?

Cause, NSS-DRV on its own does not really offer anything, nor any kind of offloading

I was using the original image and I was getting very poor results from the 10Gbe ports (this is using 5Gb fiber internet from AT&T. I would get, not even 1Gig speeds on multiple speedtests and iperf3 tests.

I saw someone in here mention try using nss-drv and offloading and so I looked around and found those patches. I am not 100% sure why as I am still doing trial and error on things but I know that when I enabled offloading and loaded in nss-drv I started to finally get speeds that matched what I am supposed to get from the ISP.

I tried everything I saw posted about getting better results from OpenWRT but I could only ever get anything near correct when I used the methods and build I posted.

If you have tweaks or ideas to try with your build I am ready to try it as I respect your work on this project and know you have more expertise than me!

Hm, the thing is that NSS-DRV is the core NSS driver that loads the NSS FW but it does not do any kind of offloading, for that NSS ECM is required.

So, its very weird to me that you get speed improvements with only NSS-DRV

Likely SW offloading only... The issue with SW offload is that it plays nicely on non-tunneled (eg. pure IP) traffic, but with for example PPPoE, you will see a single core maxed out well before you can hit the limit of SW offload. Especially on multi-gig connections.

For that NSS-DRV is not needed at all.

Yeah, PPoE and stuff like that cant really be SW offloaded properly due to the header strip/add.

I believe that is what was happening actually, turning on software offloading did help but the hardware option did not seem to make a difference. I totally wrote it wrong on that but yes software is what made the difference!

On htop it would peg out core0 so I also turned on Packet Steering and it seemed to help.

You may very well be right and I will test again later with new builds from you and compare.

The majority of what I am using my build for is the user-land loading of the 10Gbe drivers.

HW offload setting wont work cause there is no HW offloading driver for IPQ807x, only MT7620/1 have HW offloading

and MT7622 ?

Yeah, forgot that one, its all the same PPE in them

I assume you want to usptream as much as you can before you touch the ECM again? :slight_smile: If you create a side branch with bitthief's modifications, I am happy to start testing it.