Thanks. Too bad for me, I'll dig into why this doesn't work anymore.
@qosmio Hi buddy, I tried to use your nss patch on ipq60xx platform and it caused the wifi to crash. This is the log:
[ 14.611035] ECM init
[ 14.611123] ECM database jhash random seed: 0x27c714b6
[ 14.671909] ECM init complete
[ 15.403746] ath11k c000000.wifi: radio is not up
[ 15.579846] br-lan: port 1(eth1) entered blocking state
[ 15.579911] br-lan: port 1(eth1) entered disabled state
[ 15.584605] device eth1 entered promiscuous mode
[ 15.606838] br-lan: port 2(eth2) entered blocking state
[ 15.606892] br-lan: port 2(eth2) entered disabled state
[ 15.611935] device eth2 entered promiscuous mode
[ 16.538522] mtdblock: MTD device 'rootfs' is NAND, please consider using UBI block devices instead.
[ 18.719925] nss-dp 3a001000.dp1 eth0: PHY Link up speed: 1000
[ 18.720007] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 19.615774] __adpt_hppe_uniphy_psgmii_mode_set[1156]:INFO:uniphy 0 psgmii channel selection
[ 19.725716] _adpt_hppe_port_interface_mode_apply[2754]:ERROR:config instance0, rv:fffffffc faild
[ 21.471683] ath11k c000000.wifi: failed to wait qmi memory request: -110
[ 21.471733] ath11k c000000.wifi: qmi failed to respond fw mem req: -110
[ 21.478782] qcom-q6v5-wcss-pil cd00000.remoteproc: fatal error received:
[ 21.478782] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.4.0.1-01746-QCAHKSWPL_SILICONZ-1
[ 21.478782] Image Variant : IMAGE_VARIANT_STRING=6018.wlanfw.evalQ
[ 21.478782]
[ 21.478782] platform_hk.c:754 Assertion remote_ddr_mem_req->mem_seg[idx].addr != 0x0 failedparam0 :zero, param1 :zero, param2 :zero.
[ 21.478782] Thread ID : 0x00000072 Thread name : wlan_platform Process ID : 0
[ 21.478782] Register:
[ 21.478782] SP : 0x4af7ccb8
[ 21.478782] FP : 0x4af7ccc0
[ 21.478782] PC : 0x4ac94024
[ 21.478782] SSR : 0x00000008
[ 21.478782] BADVA : 0x00020000
[ 21.478782] LR : 0x4ac937c0
[ 21.478782]
[ 21.478782] Stack Dump
[ 21.478782] from : 0x4af7ccb8
[ 21.478782] to : 0x4af7d050
[ 21.478782]
[ 21.535668] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
[ 21.557841] remoteproc remoteproc0: handling crash #2 in cd00000.remoteproc
[ 21.566020] remoteproc remoteproc0: recovering cd00000.remoteproc
[ 21.598998] remoteproc remoteproc0: stopped remote processor cd00000.remoteproc
[ 21.893509] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[ 31.711692] ath11k c000000.wifi: failed to wait qmi memory request: -110
[ 31.711741] ath11k c000000.wifi: qmi failed to respond fw mem req: -110
[ 31.718810] qcom-q6v5-wcss-pil cd00000.remoteproc: fatal error received:
[ 31.718810] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.4.0.1-01746-QCAHKSWPL_SILICONZ-1
[ 31.718810] Image Variant : IMAGE_VARIANT_STRING=6018.wlanfw.evalQ
[ 31.718810]
[ 31.718810] platform_hk.c:754 Assertion remote_ddr_mem_req->mem_seg[idx].addr != 0x0 failedparam0 :zero, param1 :zero, param2 :zero.
[ 31.718810] Thread ID : 0x00000072 Thread name : wlan_platform Process ID : 0
[ 31.718810] Register:
[ 31.718810] SP : 0x4af7ccf8
[ 31.718810] FP : 0x4af7cd00
[ 31.718810] PC : 0x4ac94024
[ 31.718810] SSR : 0x00000008
[ 31.718810] BADVA : 0x00020000
[ 31.718810] LR : 0x4ac937c0
[ 31.718810]
[ 31.718810] Stack Dump
[ 31.718810] from : 0x4af7ccf8
[ 31.718810] to : 0x4af7d090
[ 31.718810]
[ 31.775680] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
[ 31.797854] remoteproc remoteproc0: handling crash #3 in cd00000.remoteproc
[ 31.806025] remoteproc remoteproc0: recovering cd00000.remoteproc
[ 31.839206] remoteproc remoteproc0: stopped remote processor cd00000.remoteproc
[ 32.133662] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[ 41.951695] ath11k c000000.wifi: failed to wait qmi memory request: -110
[ 41.951748] ath11k c000000.wifi: qmi failed to respond fw mem req: -110
[ 41.958794] qcom-q6v5-wcss-pil cd00000.remoteproc: fatal error received:
[ 41.958794] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.4.0.1-01746-QCAHKSWPL_SILICONZ-1
[ 41.958794] Image Variant : IMAGE_VARIANT_STRING=6018.wlanfw.evalQ
[ 41.958794]
[ 41.958794] platform_hk.c:754 Assertion remote_ddr_mem_req->mem_seg[idx].addr != 0x0 failedparam0 :zero, param1 :zero, param2 :zero.
[ 41.958794] Thread ID : 0x00000072 Thread name : wlan_platform Process ID : 0
[ 41.958794] Register:
[ 41.958794] SP : 0x4af7cd18
[ 41.958794] FP : 0x4af7cd20
[ 41.958794] PC : 0x4ac94024
[ 41.958794] SSR : 0x00000008
[ 41.958794] BADVA : 0x00020000
[ 41.958794] LR : 0x4ac937c0
[ 41.958794]
[ 41.958794] Stack Dump
[ 41.958794] from : 0x4af7cd18
[ 41.958794] to : 0x4af7d0b0
[ 41.958794]
[ 42.015714] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
[ 42.037825] remoteproc remoteproc0: handling crash #4 in cd00000.remoteproc
[ 42.046032] remoteproc remoteproc0: recovering cd00000.remoteproc
[ 42.078967] remoteproc remoteproc0: stopped remote processor cd00000.remoteproc
[ 42.373423] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
[ 52.191689] ath11k c000000.wifi: failed to wait qmi memory request: -110
[ 52.191741] ath11k c000000.wifi: qmi failed to respond fw mem req: -110
[ 52.198778] qcom-q6v5-wcss-pil cd00000.remoteproc: fatal error received:
[ 52.198778] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.2.4.0.1-01746-QCAHKSWPL_SILICONZ-1
[ 52.198778] Image Variant : IMAGE_VARIANT_STRING=6018.wlanfw.evalQ
[ 52.198778]
[ 52.198778] platform_hk.c:754 Assertion remote_ddr_mem_req->mem_seg[idx].addr != 0x0 failedparam0 :zero, param1 :zero, param2 :zero.
[ 52.198778] Thread ID : 0x00000072 Thread name : wlan_platform Process ID : 0
[ 52.198778] Register:
[ 52.198778] SP : 0x4af7ccf8
[ 52.198778] FP : 0x4af7cd00
[ 52.198778] PC : 0x4ac94024
[ 52.198778] SSR : 0x00000008
[ 52.198778] BADVA : 0x00020000
[ 52.198778] LR : 0x4ac937c0
[ 52.198778]
[ 52.198778] Stack Dump
[ 52.198778] from : 0x4af7ccf8
[ 52.198778] to : 0x4af7d090
[ 52.198778]
[ 52.255673] remoteproc remoteproc0: crash detected in cd00000.remoteproc: type fatal error
[ 52.277846] remoteproc remoteproc0: handling crash #5 in cd00000.remoteproc
[ 52.286041] remoteproc remoteproc0: recovering cd00000.remoteproc
[ 52.319058] remoteproc remoteproc0: stopped remote processor cd00000.remoteproc
[ 52.613436] remoteproc remoteproc0: remote processor cd00000.remoteproc is now up
Can you give me some help?
I have a 1G/1G fiber line, it can pretty much saturate on hardwire. But, on my M1, the M1->ROUTER averages 760mbps up, 895mpbs down, with 7ms unloaded and causes latency spikes (24ms+ download, 14ms+ upload).
Setting both to 769220/769220 brought me down to 4ms, and 4ms respectively. And have A+ score (From just A before)
However, I don't game on my Mac, and haven't had issues with setting my values to 90% of my actual speeds in day to day things like Zoom/Teams meetings, so I don't keep mine that restrictive. Running a P
The idea is to set it to 80% (or 90%) of your upload and download, and only if you're noticing bufferbloat. Which in your case, you are not, so I wouldn't worry about it.
Unless you have a specific need for it, disable it. Or start with smallest value of '256mb'. It doesn't play nice on 512mb platforms. I personally have left it off, but I'm not running heavy applications on the router that users have reported to cause OOM, or hung LAN activity (torrenting).
I'd actually like it if folks could make edits to /etc/init.d/pbuf
and play around with the values for the 256mb profile:
extra_pbuf_core0=3100000
n2h_high_water_core0=30258
n2h_wifi_pool_buf=4096
Scenarios:
1.) Setting values JUST for extra_pbuf_core0
(3100000, 2000000, 1550000). Ensure you comment out n2h_high_water_core0
and n2h_wifi_pool_buf
2.) Setting values JUST for n2h_high_water_core0
(25215,15129, 10086) while keeping n2h_wifi_pool_buf
at 4096. Ensure you comment out extra_pbuf_core0
3.) A mix of scenario 1 and 2.
Then carry on activities where you've noticed extreme LAN/WAN degradation (i.e. torrenting).
This would be very valuable as the run away memory usage on 512M platforms has been difficult to pin down.
These are the defaults, with the pbuf script set to 512mb. Memory is perfectly fine and luci is as responsive as ever.
@markuznw You seem like someone who torrents a lot, please also test on my build.
To disable the pbuf script use: uci set pbuf.opt.memory_profile=off
Edit: Thanks for the nice write-up @qosmio
Most of my work integrating the wifi NSS was for IPQ807x. I brought a few pieces over if within the same patches for ipq807x, but nothing specifically for ipq60xx. However, I don't believe there's any patches specific to that platform.
Just created a new branch in my repository. That you could try testing:
I would actually like if AX3600 users could also test this version as it seems to offer better memory management.
NOTE: This should work on both ipq807x/6018, but you must properly set the memory profile for your platform. 1GB platforms can't set it to ATH11K_MEM_PROFILE_512M
.
Setting it to value lower/higher than physically available will cause NULL virtual address kernel panics.
I believe this setting was not originally meant to reduce memory footprint of 1G+ platforms, but to account for platforms that were 512M or less. Though it did save a few MBs. Will require tweaking to allow for the old behavior on 1G+ IPQ807x, while still saving memory for platforms <= 512M
Hi @dckiller51
If it seems that we have a problem with WiFi Mesh even though we have disabled NSS support, it has not worked again.
Regards, Agustin
I used this version 2023-09-25-2008. I can upgrade to this version to keep the mesh ?
(For your information, no problems with this one for several months but I like to update my devices. )
Has anyone made WiFi-offloading work on the nbg7815?
I have no problems making an image with nss support for the lan-wan ports, but every time I try to add WiFi-offloading, the image is created without problems, but when flashing it on the router it is practically blocked because all the ethernet ports are left broken and the WiFi connection has so many errors that it is even impossible to upload a new firmware. The only thing I can do is unlock them through the serial port.
It has happened to me so many times that I don't know what to do because neither the system log nor the kernel log indicate that there is any problem.
Doesn't boot for me. I built it with the same config as always, in which the mem profile is set correctly
I originally had the MESH offload feature (partially) decoupled from the baseline WIFI offload, but it was getting to be maintenance nightmare with all the patch dependancies.
A lot of the "fixes", mostly NSS peer handling, were distributed in patches for WDS, VLAN, and MESH offload that I figured to just include all NSS related features, and do my best with using macros to enable certain code blocks.
But the biggest issue comes with NSS firmware 12.1. The mesh interface just doesn't seem to come up. Same issue with firmware 11.5. The only success I've had is with NSS firmware version 11.4
@dckiller51, if you'd like to use mesh, you currently have 2 options.
1.) Disable NSS offload altogether.
echo 'ath11k nss_offload=0 frame_mode=2' > /etc/modules.d/ath11k
echo 'mac80211 nss_redirect=0' > /etc/modules.d/mac80211
2.) Switch to using NSS firmware 11.4
I just pushed a change to nss-packages repo that introduces a menuconfig option to select a specific version.
Here:
Or you can manually extract NSS firmware version 11.4 to /lib/firmware/
.
Be sure to rename the corresponding retail_routerX.bin
to qca-nssX-retail.bin
Everything should work, but be warned that NSS stats will be wildly off in /sys/kernel/debug/qca-nss-drv/stats/wifi_mesh/
.
@qosmio 2kb build didn't boot with ax3600
Can you provide serial console output?
sorry i can't provide console output
Tomorrow afternoon I can. I have never done it before tho. Do you have a guide I can follow? Besides voltage values on UART nothing should fry my board right?
Same problem here. I tried several times to build for nbg7815 in the last two weeks but every time i clean install the firmware with nss-wifi, all eth/wan ports and wifi do not work. If i flash the nss-wifi firmware keeping setting from master openwrt, ethernet ports works, wan get the public ip for few minutes and then disconnect, wifi is very slow (6 mbit/s).
@JuliusBairaktaris ,@olci
Could you also experiment with CONFIG_ATH11K_MEM_PROFILE_1G
? This will just default to nothing being selected and grab default values
Check photo under SERIAL https://openwrt.org/toh/dynalink/dl-wrx36, be sure nothing related to voltages is connected between the UART pins and your router.
Only 3 wires should be connected.
UART | ROUTER |
---|---|
RX | TX |
TX | RX |
GND | GND |
Would need to order header pins first, I dont have any left, so make it a few days. Sorry
Don't have a set of test clips, maybe for something like a logic probe?
Sorry I don't understand your question.