yep i cant get it to work https://katb.in/vurejubipew
Hi @qosmio
For collecting the commits to get offload for the WiFi:
and if I haven't skipped any, this would be it and there is no change for nss-packages.
and is any change necessary for it to work out of the box?
Regards, Agustín
Are you using SMB on the router or is it SMB traffic from WLAN to a separate server?
On MBP M1, transferring 83GB file from Ubuntu Samba instance ~76MB/s
iPhone 15 Pro
I used your config @qosmio
I've tried smb on router, using Mac m1 / linux and windows. It was acting like it wasn't accessible most of the time.
One more update https://github.com/qosmio/openwrt-ipq/commit/a10d039a71a70d597c84dcc438dddc7357bd2332
I managed to complete a build that booted fine and seemed to run, but ended up with everything network being absolutely dead slow. Download about 150 mbps, upload 15 mbps, regardless of wifi or ethernet. On stable 23.05.2 I get about 900/900. My connection is 1500/1000.
I don't see anything that looks too terribly off in the logs. Is there something special needed (i.e. configurations) besides just installing the build and letting it rip?
dmesg and system log;
Merry Christmas everyone!
For devices with 1GB RAM memory (like QHora-301W) should we select ATH11K_MEM_PROFILE_512M
option?
I mean, is there anything that you changed in the code that is explicit for NSS wifi offload to work and that require this option to be selected or it is just RAM memory dependent.
Just compiled with latest commits.
After first boot WLANs are not active and I get this.
[ 136.409721] ath11k c000000.wifi: ipq8074 hw2.0
[ 136.409755] ath11k c000000.wifi: FW memory mode: 0
[ 136.413328] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[ 136.429718] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[ 137.151184] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[ 137.153610] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 137.196361] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[ 137.202862] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[ 137.202908] ath11k c000000.wifi: fw_version 0x290104a5 fw_build_timestamp 2023-08-02 20:32 fw_build_id WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1
[ 161.185532] F2FS-fs (sda1): Found nat_bits in checkpoint
[ 161.287351] F2FS-fs (sda1): Mounted with checkpoint version = 16aa3ef
[ 169.299401] ath11k c000000.wifi: htt event 48 not handled
[ 169.302388] ath11k c000000.wifi: nss init soc nss if_num 203 userpd_id 0
[ 169.303798] ath11k c000000.wifi: nss state in default init state
[ 169.310637] ath11k c000000.wifi: NSS SOC Initialization Failed :-22
[ 169.316552] ath11k c000000.wifi: failed to setup nss driver interface-22
[ 169.324086] ath11k c000000.wifi: failed to create pdev core: -22
[ 179.681552] ath11k c000000.wifi: failed to wait wlan mode request (mode 4): -110
[ 179.681597] ath11k c000000.wifi: qmi failed to send wlan mode off: -110
[ 185.468905] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: fatal error received:
[ 185.468905] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1
[ 185.468905] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.eval_v2Q
[ 185.468905]
[ 185.468905] dog_hb.c:210 DOG_HB detects starvation of task "WLAN RT1", triage with its owner(d.dump 0x4b5e49c0)
[ 185.468905] param0 :1264470464, param1 :1264470464, param2 :zero.
[ 185.468905] Thread ID : 0x00000075 Thread name : dog_hb Process ID : 0
[ 185.468905] Register:
[ 185.468905] SP : 0x4b5c1fb8
[ 185.468905] FP : 0x4b5c1fc0
[ 185.468905] PC : 0x4b1080c4
[ 185.468905] SSR : 0x00000008
[ 185.468905] BADVA : 0x00020000
[ 185.468905] LR : 0x4b107860
[ 185.468905]
[ 185.468905] Stack Dump
[ 185.468905] from : 0x4b5c1fb8
[ 185.468905] to : 0x4b5c20f0
[ 185.468905]
[ 185.523435] remoteproc remoteproc0: crash detected in cd00000.q6v5_wcss: type fatal error
[ 185.545676] remoteproc remoteproc0: handling crash #1 in cd00000.q6v5_wcss
[ 185.553906] remoteproc remoteproc0: recovering cd00000.q6v5_wcss
[ 185.586607] remoteproc remoteproc0: stopped remote processor cd00000.q6v5_wcss
[ 189.921536] ath11k c000000.wifi: failed to wait wlan mode request (mode 4): -110
[ 189.921581] ath11k c000000.wifi: qmi failed to send wlan mode off: -110
[ 191.457539] qcom-q6v5-wcss-pil cd00000.q6v5_wcss: start timed out
[ 191.457587] remoteproc remoteproc0: can't start rproc cd00000.q6v5_wcss: -110
[ 275.485193] ECM init
[ 275.485265] ECM database jhash random seed: 0xcf6c4738
[ 275.502593] ECM init complete
After reboot the NSS works (NSS wifi too). WiFi clients connect only when they are not using static leases rules set in DHCP configuration.
Small visual glitch - RX Rate for Associated Stations is always zero.
All other issues described in my earlier post are present. When I start a torrent client all connections experience huge drops. Cannot access even luci.
After turning off torrent client connections recover after some time.
speedtest from my laptop, looks like it worked.
IoT in OEM firmware was enabled but I never used it, so it's ok and save RAM now.
I am getting following error:
In file included from /usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438/mc_netlink.c:21:
/usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438/mc_osdep.h: In function 'os_br_pass_frame_up':
/usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438/mc_osdep.h:27:16: error: implicit declaration of function 'br_pass_frame_up'; did you mean 'os_br_pass_frame_up'? [-Werror=implicit-function-declaration]
27 | return br_pass_frame_up(skb);
| ^~~~~~~~~~~~~~~~
| os_br_pass_frame_up
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:250: /usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438/mc_netlink.o] Error 1
make[4]: *** [Makefile:2012: /usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438] Error 2
make[4]: Leaving directory '/usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/linux-6.1.34'
make[3]: *** [Makefile:68: /usr/home/openwrt/openwrt-ipq/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-mcs-2022-03-16-dd8a438/.built] Error 2
make[3]: Leaving directory '/usr/home/openwrt/openwrt-ipq/feeds/nss/qca-mcs'
time: package/feeds/nss/qca-mcs/compile#2.25#1.40#3.64
ERROR: package/feeds/nss/qca-mcs failed to build.
make[2]: *** [package/Makefile:120: package/feeds/nss/qca-mcs/compile] Error 1
make[2]: Leaving directory '/usr/home/openwrt/openwrt-ipq'
make[1]: *** [package/Makefile:114: /usr/home/openwrt/openwrt-ipq/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/usr/home/openwrt/openwrt-ipq'
make: *** [/usr/home/openwrt/openwrt-ipq/include/toplevel.mk:232: world] Error 2
Just pushed another big update.
ath11k_nss: Rework depends, make nss_redirect
optional
Reading back on @Ansuel and @robimarko messages (way back in 2021) ath11k is fully capable of offloading wifi without the need for mac80211 being patched to use NSS vif
hooks.
After reworking the nss peer delete
and encap mismatch
errors and getting everything stable, I tested with disabling the nss_redirect
flag in mac80211 and wifi offload worked... even better than before as now there wasn't an overhead of mac80211 creating vifs to offload traffic. That was mostly required on ath10k, but not for ath11k. This should help for router based programs that are CPU intensive like SMB/Transmission.
Commit log:
1.) Added a reworked `qca-nss-pbuf` init script from QSDK that will set sysctl
NSS `n2hcfg` wifi options based on board type and available
RAM.
2.) ath11k is fully capable of offloading wifi, it does not need
mac80211 to create any NSS vifs. This lowers overhead and has actually
shown considerable speed improvements for CPU programs on the router
side (i.e. SMB). I believe ax3600's IoT (ath10k) would require it
for offloading.
I've added 2 new makemenu options, `MAC80211_NSS_SUPPORT` which enables
NSS related features, and `MAC80211_NSS_REDIRECT` which provides the option to
autoload the module on boot with `nss_redirect=1`.
3.) Reverted the option that defaulted `ATH11K_MEM_PROFILE_512M` to
true. This was not required for platforms with 1GB or more memory
(which is most of them). The default is 1GB. Select for platforms
like Xiaomi AX3600.
I for some reason forgot that the dynalink, and majority of the ipq807x boards have 1GB RAM. I reverted the option from being default, as 1GB is the target platform in the nss patches. Hopefully that and removal of mac80211 offloading option should help.
Have you compiled the kernel? That reference is in target/linux/qualcommax/patches-6.1/0604-qca-add-mcs-support.patch
, which doesn't look like it was applied.
Try:
make -j$(proc) target/{clean,compile} package/{cleanup,compile,install,index} target/install
if I build it without ath10k driver, should I choose MAC80211_NSS_REDIRECT
?
I dont need the IoT antenna, making it not exist is a possible way?
Oh the kernel won't be compiled together when I build it?
my workaround to this was to add to the mac80211 cflags "-Wno-implicit-function-declaration"
You mean add this flag when I run make
command?
no - edit the mac80211 Makefile package/kernel/mac80211/Makefile
change from
MAKE_OPTS:= \
$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
to
MAKE_OPTS:= \
$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES) -Wno-implicit-function-declaration" \
No more issues with torrents and luci web interface hanging after this update.
Seems that NSS offloading is fully working including NSS wifi offload. For my QNAP it requires a second reboot after initial firmware flashing and first reboot.
The other observations still apply.
I'm able to reach 1G down speed via WiFi on my Motorola Edge 30 Fusion (zero CPU, ISP plan is 1G down/0.7G up), and simultaneous 1G WiFi speeds while torrent client is running and I transfer files from PC (with 1G NIC) to a SSD USB3 connected to the router USB3 port at 115 MB/s! (all of this with 20-30% CPU load)
Amazing job and big thank you @qosmio!
Is the second reboot related to nss-eip-firmware
not able to load after initial install and require a second reboot too?