That's great news, and you came further than me, and you have different error.
I'll have a look at your branch and see what I'm missing.
I think I had that peer not found for nss peer delete earlier but fixed it. But can't remember what changes. Might be that ansuel's patches was a little different compared to the qca pathes on the peer stuff.
Thanks! Haven't messed with any of this stuff in over a year, but awesome to see everyone continuing some of the work I did for ipq806x work over to ipq807x
/sys/kernel/debug/qca-nss-drv/stats/wifi is mostly for ipq086x platform, so all the stats show "0".
ipq807x uses the "wifili" API.
➤ grep -Ev "^$" /sys/kernel/debug/qca-nss-drv/stats/wifili
________________________________________________________________________________
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< INTERNAL: UNKNOWN >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
________________________________________________________________________________
________________________________________________________________________________
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< PDEV 0 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
________________________________________________________________________________
#txrx
wifili[0]_rx_msdu_error = 0 error
wifili[0]_rx_inv_peer_rcv = 0 special
wifili[0]_rx_wds_srcport_exception = 0 exception
wifili[0]_rx_wds_srcport_exception_fail = 0 drop
wifili[0]_rx_deliverd = 2887479 special
wifili[0]_rx_deliver_drops = 0 drop
wifili[0]_rx_intra_bss_ucast = 0 special
wifili[0]_rx_intra_bss_ucast_fail = 0 drop
wifili[0]_rx_intra_bss_mcast = 0 special
wifili[0]_rx_intra_bss_mcast_fail = 0 drop
wifili[0]_rx_sg_rcv_send = 0 special
wifili[0]_rx_sg_rcv_fail = 0 drop
wifili[0]_rx_mcast_echo = 0 special
wifili[0]_rx_inv_tid = 0 special
wifili[0]_stats_rx_frag_inv_sc = 0 special
wifili[0]_stats_rx_frag_inv_fc = 0 special
wifili[0]_stats_rx_frag_non_frag = 0 special
wifili[0]_stats_rx_frag_retry = 0 special
wifili[0]_stats_rx_frag_ooo = 0 special
wifili[0]_stats_rx_frag_ooo_seq = 0 special
wifili[0]_stats_rx_frag_all_frag_rcv = 0 special
wifili[0]_stats_rx_frag_deliver = 0 special
wifili[0]_tx_enqueue = 16249667 special
wifili[0]_tx_enqueue_drop = 0 drop
wifili[0]_tx_dequeue = 16249667 special
wifili[0]_tx_hw_enqueue_fail = 0 drop
wifili[0]_tx_sent_count = 16249667 special
#tcl ring
wifili[0]_tcl_no_hw_desc = 0 special
wifili[0]_tcl_ring_full = 0 special
wifili[0]_tcl_ring_sent = 16249654 special
#tcl comp
wifili[0]_tx_desc_free_inv_bufsrc = 0 error
wifili[0]_tx_desc_free_inv_cookie = 0 special
wifili[0]_tx_desc_free_hw_ring_empty = 0 special
wifili[0]_tx_desc_free_reaped = 16249593 special
wifili[0]_tx_capture_enqueue_count = 0 special
wifili[0]_tx_capture_enqueue_fail_count = 0 error
#reo ring
wifili[0]_reo_error = 0 error
wifili[0]_reo_reaped = 2887455 special
wifili[0]_reo_inv_cookie = 0 special
wifili[0]_stats_reo_frag_rcv = 0 special
#tx sw pool
wifili[0]_tx_desc_in_use = 84 special
wifili[0]_tx_desc_alloc_fail = 0 special
wifili[0]_tx_desc_already_allocated = 0 special
wifili[0]_tx_desc_invalid_free = 0 special
wifili[0]_tx_desc_free_src_fw = 13769 special
wifili[0]_tx_desc_free_completion = 16235529 special
wifili[0]_tx_desc_no_pb = 0 special
wifili[0]_tx_desc_queuelimit_drop = 0 drop
#tx ext sw pool
wifili[0]_ext_tx_desc_in_use = 0 special
wifili[0]_ext_tx_desc_alloc_fail = 0 special
wifili[0]_ext_tx_desc_already_allocated = 0 special
wifili[0]_ext_tx_desc_invalid_free = 0 special
#rxdma pool
wifili[0]_rx_desc_no_pb = 12737886 special
wifili[0]_rx_desc_alloc_fail = 0 special
wifili[0]_rx_desc_in_use = 4095 special
#rxdma ring
wifili[0]_rxdma_hw_desc_unavailable = 0 special
wifili[0]_rxdma_buf_replenished = 2891690 special
________________________________________________________________________________
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< PDEV 1 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
________________________________________________________________________________
#txrx
wifili[1]_rx_msdu_error = 0 error
wifili[1]_rx_inv_peer_rcv = 0 special
wifili[1]_rx_wds_srcport_exception = 0 exception
wifili[1]_rx_wds_srcport_exception_fail = 0 drop
wifili[1]_rx_deliverd = 33739 special
wifili[1]_rx_deliver_drops = 0 drop
wifili[1]_rx_intra_bss_ucast = 0 special
wifili[1]_rx_intra_bss_ucast_fail = 0 drop
wifili[1]_rx_intra_bss_mcast = 0 special
wifili[1]_rx_intra_bss_mcast_fail = 0 drop
wifili[1]_rx_sg_rcv_send = 0 special
wifili[1]_rx_sg_rcv_fail = 0 drop
wifili[1]_rx_mcast_echo = 0 special
wifili[1]_rx_inv_tid = 0 special
wifili[1]_stats_rx_frag_inv_sc = 0 special
wifili[1]_stats_rx_frag_inv_fc = 0 special
wifili[1]_stats_rx_frag_non_frag = 0 special
wifili[1]_stats_rx_frag_retry = 0 special
wifili[1]_stats_rx_frag_ooo = 0 special
wifili[1]_stats_rx_frag_ooo_seq = 0 special
wifili[1]_stats_rx_frag_all_frag_rcv = 0 special
wifili[1]_stats_rx_frag_deliver = 0 special
wifili[1]_tx_enqueue = 44859 special
wifili[1]_tx_enqueue_drop = 0 drop
wifili[1]_tx_dequeue = 44859 special
wifili[1]_tx_hw_enqueue_fail = 0 drop
wifili[1]_tx_sent_count = 44859 special
#tcl ring
wifili[1]_tcl_no_hw_desc = 0 special
wifili[1]_tcl_ring_full = 0 special
wifili[1]_tcl_ring_sent = 44859 special
#tcl comp
wifili[1]_tx_desc_free_inv_bufsrc = 0 error
wifili[1]_tx_desc_free_inv_cookie = 0 special
wifili[1]_tx_desc_free_hw_ring_empty = 0 special
wifili[1]_tx_desc_free_reaped = 46160 special
wifili[1]_tx_capture_enqueue_count = 0 special
wifili[1]_tx_capture_enqueue_fail_count = 0 error
#reo ring
wifili[1]_reo_error = 0 error
wifili[1]_reo_reaped = 33703 special
wifili[1]_reo_inv_cookie = 0 special
wifili[1]_stats_reo_frag_rcv = 0 special
#tx sw pool
wifili[1]_tx_desc_in_use = 0 special
wifili[1]_tx_desc_alloc_fail = 0 special
wifili[1]_tx_desc_already_allocated = 0 special
wifili[1]_tx_desc_invalid_free = 0 special
wifili[1]_tx_desc_free_src_fw = 15036 special
wifili[1]_tx_desc_free_completion = 29823 special
wifili[1]_tx_desc_no_pb = 0 special
wifili[1]_tx_desc_queuelimit_drop = 0 drop
#tx ext sw pool
wifili[1]_ext_tx_desc_in_use = 0 special
wifili[1]_ext_tx_desc_alloc_fail = 0 special
wifili[1]_ext_tx_desc_already_allocated = 0 special
wifili[1]_ext_tx_desc_invalid_free = 0 special
#rxdma pool
wifili[1]_rx_desc_no_pb = 0 special
wifili[1]_rx_desc_alloc_fail = 0 special
wifili[1]_rx_desc_in_use = 0 special
#rxdma ring
wifili[1]_rxdma_hw_desc_unavailable = 0 special
wifili[1]_rxdma_buf_replenished = 39099 special
________________________________________________________________________________
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< PDEV 2 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
________________________________________________________________________________
#txrx
wifili[2]_rx_msdu_error = 0 error
wifili[2]_rx_inv_peer_rcv = 0 special
wifili[2]_rx_wds_srcport_exception = 0 exception
wifili[2]_rx_wds_srcport_exception_fail = 0 drop
wifili[2]_rx_deliverd = 0 special
wifili[2]_rx_deliver_drops = 0 drop
wifili[2]_rx_intra_bss_ucast = 0 special
wifili[2]_rx_intra_bss_ucast_fail = 0 drop
wifili[2]_rx_intra_bss_mcast = 0 special
wifili[2]_rx_intra_bss_mcast_fail = 0 drop
wifili[2]_rx_sg_rcv_send = 0 special
wifili[2]_rx_sg_rcv_fail = 0 drop
wifili[2]_rx_mcast_echo = 0 special
wifili[2]_rx_inv_tid = 0 special
wifili[2]_stats_rx_frag_inv_sc = 0 special
wifili[2]_stats_rx_frag_inv_fc = 0 special
wifili[2]_stats_rx_frag_non_frag = 0 special
wifili[2]_stats_rx_frag_retry = 0 special
wifili[2]_stats_rx_frag_ooo = 0 special
wifili[2]_stats_rx_frag_ooo_seq = 0 special
wifili[2]_stats_rx_frag_all_frag_rcv = 0 special
wifili[2]_stats_rx_frag_deliver = 0 special
wifili[2]_tx_enqueue = 0 special
wifili[2]_tx_enqueue_drop = 0 drop
wifili[2]_tx_dequeue = 0 special
wifili[2]_tx_hw_enqueue_fail = 0 drop
wifili[2]_tx_sent_count = 0 special
#tcl ring
wifili[2]_tcl_no_hw_desc = 0 special
wifili[2]_tcl_ring_full = 0 special
wifili[2]_tcl_ring_sent = 0 special
#tcl comp
wifili[2]_tx_desc_free_inv_bufsrc = 0 error
wifili[2]_tx_desc_free_inv_cookie = 0 special
wifili[2]_tx_desc_free_hw_ring_empty = 0 special
wifili[2]_tx_desc_free_reaped = 0 special
wifili[2]_tx_capture_enqueue_count = 0 special
wifili[2]_tx_capture_enqueue_fail_count = 0 error
#reo ring
wifili[2]_reo_error = 0 error
wifili[2]_reo_reaped = 0 special
wifili[2]_reo_inv_cookie = 0 special
wifili[2]_stats_reo_frag_rcv = 0 special
#tx sw pool
wifili[2]_tx_desc_in_use = 0 special
wifili[2]_tx_desc_alloc_fail = 0 special
wifili[2]_tx_desc_already_allocated = 0 special
wifili[2]_tx_desc_invalid_free = 0 special
wifili[2]_tx_desc_free_src_fw = 0 special
wifili[2]_tx_desc_free_completion = 0 special
wifili[2]_tx_desc_no_pb = 0 special
wifili[2]_tx_desc_queuelimit_drop = 0 drop
#tx ext sw pool
wifili[2]_ext_tx_desc_in_use = 0 special
wifili[2]_ext_tx_desc_alloc_fail = 0 special
wifili[2]_ext_tx_desc_already_allocated = 0 special
wifili[2]_ext_tx_desc_invalid_free = 0 special
#rxdma pool
wifili[2]_rx_desc_no_pb = 509891 special
wifili[2]_rx_desc_alloc_fail = 0 special
wifili[2]_rx_desc_in_use = 4095 special
#rxdma ring
wifili[2]_rxdma_hw_desc_unavailable = 0 special
wifili[2]_rxdma_buf_replenished = 0 special
#wbm ring
wifili_wbm_ie_local_alloc_fail = 0 error
wifili_wbm_src_dma = 382 special
wifili_wbm_src_dma_code_inv = 0 special
wifili_wbm_src_reo = 1067 special
wifili_wbm_src_reo_code_nullq = 165 special
wifili_wbm_src_reo_code_inv = 839 error
wifili_wbm_src_inv = 0 error
I mostly used the patch names vs. the content from @Ansuel's patches to pull from qsdk's 12.4.5.r3 branch. Since most of their changes are closer to backports 6.5 (6.5-rc3) vs. 5.15 (5.15.33). Hopefully it's something minor I'm missing.
Hmm... If I remember correctly I think I had the same error using the patch code from qsdk. So I went back to use the code from ansuel. But I don't think you need to change everything, just the peer code in the 199-002-ath11k_nss-add-nss-driver-interface.patch. But have a look at the peer stuff from the ansuel patch and compare it to qsdk.
An update from my code, more or less not working. I tried to add the patches that is working for you. But that did not help with my errors. I also see that qsdk are putting back older code OpenWrt have removed (build fix patches). But I don't wanna go backwards
And sorry for not sharing any patches. It just don't work and it's a mess. Now I'm trying to figure out what changes you did to make it work.
Great work!
I've compiled a version from your repo in order to test the nss wifi offloading on QNAP QHora 301W.
For 30 minutes work I've constantly got this ath11k c000000.wifi: peer not found for nss peer delete
but most of my Wi-Fi 6 devices couldn't connect to the wifi at all.
One Samsung SmartPhone with Wi-Fi 5 connected successfully and indeed the wifi was fully offloaded reading zero CPU usage during wifi Speed Test.
I've even tried with latest firmware WLAN.HK.2.9.0.1-01890-QCAHKSWPL_SILICONZ-1, but nothing changed.
Fingers crossed that the NSS wifi offload can be added to the NSS builds too.
Thanks for the suggestions where to look, going to work on this a little more this weekend.
@sppmaster , I've noticed an odd behavior as well. If I ever switched between my 2G or 5G APs it won't let me connect at all. Something to do with password being converted PSK, a total guess. Only way it works is rebooting with old non-nss, connecting to the AP, and then rebooting back with nss on. So far it's been up 24 hours with no major issues. Just the regular "peer delete" errors I'm trying to mitigate.
I just checked, and looks like I did apply it as part of a "piece-mealed" patch in 900-fix-build.patch but "112" is actually "359" in QSDK's patches ("359-ath11k-fix-tkip-encryption-traffic-failure.patch"). I should probably break it out into its original patch just to better track what's getting applied.
Do you mean any negative performance impact? Honestly the biggest negative is clients having reconnect issues if ever they need to be re-added (i.e. deleting the connection on the client, and re-adding with password ends up not negotiating PSK).
On the positive side, I've been able to consistently get line speed on all my WIFI 6 clients without any CPU usage being consumed at all.
Today I've tried more with the nss-wifi build.
Changing wifi to open network hasn't resolved the issues because my devices couldn't get IP addresses via DHCP.
I have static leases set for all devices (they all use their default MAC addresses) but not all of them could get IP addresses via DHCP.
I then changed the wifi settings so they use randomized MACs when connecting to my wifi. In this case all devices could get new IPs from DHCP. But if a device was later disconnected from the wifi it couldn't reconnect again informing about wrong password.
After a few hours of work I started experiencing connection interruptions on devices connected via cable too.
This is what I found so far.