IPQ806x NSS Drivers

The GitHub comparison sometimes is frustrating and doesn’t reflect an accurate comparison. Ex: The number of files changed is the same as comparing his branch to master.

Another example is my 21.02 branch...it keeps comparing to master on GitHub. I hope there is any easy fix that I am overlooking...there are tons of threads on GitHub not comparing correctly- many are unsolved.

He rebuilt from scratch. I did the same yesterday, starting at master I cherry-picked each commit in order. I re-did the iproute2 commit with his patch and combined the multiple .dts changes to G10/ea8500 into the single ipq8064 commit.

So our branches are exactly the same. I consolidated several commits to clean things up (I was making a mess) is the only difference. :grinning:

2 Likes

From @ACwifidude's repo, I can see references to nssfq_codel. I don't know enough to know what it means, but I'm guessing you do! Looks like QSDK10.0 currently.

@KONG - Although still pending, the update to 5.4.114 breaks at least one of the patches in your kernel5.4-nss-qsdk10.0 branch.

% make -j1 V=s
...
patching file include/net/neighbour.h
Hunk #1 succeeded at 569 (offset 1 line).
patching file include/net/netfilter/nf_conntrack_extend.h
Hunk #1 succeeded at 28 with fuzz 2 (offset -3 lines).
Hunk #2 FAILED at 48.
1 out of 2 hunks FAILED -- saving rejects to file include/net/netfilter/nf_conntrack_extend.h.rej
patching file include/net/route.h
...
Hunk #1 succeeded at 146 (offset -12 lines).
patching file net/netfilter/Makefile
Patch failed!  Please fix /scratch/union/target/linux/ipq806x/patches-5.4/999-03a-qca-nss-ecm-support.patch!
make[4]: *** [Makefile:36: /scratch/union/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.4.114/.prepared_7ffa279faf88bffc5cedcf554fd29d56] Error 1
make[4]: Leaving directory '/scratch/union/target/linux/ipq806x'
make[3]: *** [Makefile:11: compile] Error 2
make[3]: Leaving directory '/scratch/union/target/linux'
time: target/linux/compile#7.05#1.99#7.54
    ERROR: target/linux failed to build.
make[2]: *** [target/Makefile:25: target/linux/compile] Error 1
make[2]: Leaving directory '/scratch/union'
make[1]: *** [target/Makefile:18: /scratch/union/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.target_compile] Error 2
make[1]: Leaving directory '/scratch/union'
make: *** [/scratch/union/include/toplevel.mk:230: world] Error 2

Complete log.

EDIT: I took a stab at fixing it, here. Does it seems sane?

That looks good to me.

1 Like

Patching master with PR#4105 and with the fix to NSS seems fully functional on my R7800.

1 Like

I'm having lots of issues this my 5GHz radio, on EA7500 V1:

Wed May 12 14:48:18 2021 daemon.err hostapd: 20/40 MHz: center segment 0 (=122) and center freq 1 (=5590) not in sync
Wed May 12 14:48:18 2021 kern.info kernel: [144464.855185] device wlan1 left promiscuous mode
Wed May 12 14:48:18 2021 kern.info kernel: [144464.855505] br-lan: port 3(wlan1) entered disabled state
Wed May 12 14:48:18 2021 daemon.notice netifd: Network device 'wlan1' link is down
Wed May 12 14:48:18 2021 kern.info kernel: [144464.902170] ath10k_pci 0001:01:00.0: mac flush null vif, drop 0 queues 0xffff
Wed May 12 14:48:18 2021 kern.info kernel: [144464.904065] wlan1: Destroyed NSS virtual interface
Wed May 12 14:48:18 2021 daemon.debug dnsmasq[4668]: stopped listening on wlan1(#16): fe80::1691:82ff:fe7e:3256%wlan1 port 53
Wed May 12 14:48:19 2021 kern.warn kernel: [144466.278118] ath10k_pci 0001:01:00.0: 10.4 wmi init: vdevs: 16  peers: 528  tid: 132
Wed May 12 14:48:19 2021 kern.warn kernel: [144466.278149] ath10k_pci 0001:01:00.0: msdu-desc: 1424  skid: 32
Wed May 12 14:48:19 2021 kern.info kernel: [144466.399763] ath10k_pci 0001:01:00.0: rts threshold -1
Wed May 12 14:48:19 2021 kern.warn kernel: [144466.404345] ath10k_pci 0001:01:00.0: Firmware lacks feature flag indicating a retry limit of > 2 is OK, requested limit: 4
Wed May 12 14:48:19 2021 kern.err kernel: [144466.406304] debugfs: File 'virt_if' in directory 'stats' already present!
Wed May 12 14:48:19 2021 kern.info kernel: [144466.415417] wlan1: Created a NSS virtual interface
Wed May 12 14:48:19 2021 kern.info kernel: [144466.425581] br-lan: port 3(wlan1) entered blocking state
Wed May 12 14:48:19 2021 kern.info kernel: [144466.426566] br-lan: port 3(wlan1) entered disabled state
Wed May 12 14:48:19 2021 kern.info kernel: [144466.432319] device wlan1 entered promiscuous mode
Wed May 12 14:48:19 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan1 wasn't started
` ``

@KONG or @ACwifidude - Can one of you guys rebase your kernel5.4-nss-qsdk10.0 branch against master? I tried rebasing the conflict in package/network/services/hostapd/files/hostapd.sh but it ended up killing wifi when I booted into the image.

--- a/package/network/services/hostapd/files/hostapd.sh	2021-05-26 08:25:52.843725767 -0400
+++ b/package/network/services/hostapd/files/hostapd.sh	2021-05-26 08:27:44.596353143 -0400
@@ -99,6 +99,7 @@ hostapd_common_add_device_config() {
 	config_add_string require_mode
 	config_add_boolean legacy_rates
 	config_add_int cell_density
+	config_add_boolean vendor_vht
 	config_add_int rts_threshold
 
 	config_add_string acs_chan_bias
@@ -116,7 +117,7 @@ hostapd_prepare_device_config() {
 	local base_cfg=
 
 	json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
-		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
+		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density vendor_vht \
 		rts_threshold
 
 	hostapd_set_log_options base_cfg
@@ -127,6 +128,7 @@ hostapd_prepare_device_config() {
 	set_default legacy_rates 0
 	set_default airtime_mode 0
 	set_default cell_density 0
+	set_default vendor_vht 1
 
 	[ -n "$country" ] && {
 		append base_cfg "country_code=$country" "$N"
@@ -154,6 +156,9 @@ hostapd_prepare_device_config() {
 			ac) append base_cfg "require_vht=1" "$N";;
 		esac
 	fi
+
+	[ "$hwmode" = "g" -a -n "$vendor_vht" ] && append base_cfg "vendor_vht=$vendor_vht" "$N"
+
 	case "$hwmode" in
 		b)
 			if [ "$cell_density" -eq 1 ]; then

Looks like fun. There have been a ton of recent changes to master. I’ve got the day off on Friday. I’ll give it a try.

1 Like

So the patch I posted above does indeed give a functional setup upon trying it again :man_shrugging:

Hey - did you re-push your 20.02 code ? I will rebase mine and recompile with then needed KMOD's - would it be possible to include them on future builds? I posted them above. I basically add the crypto suite + some other FS items.

@Ansuel @darksky @KONG I’m getting 200mbps max on 5ghz wifi. Happened between 08May and 31May - some commit in master is not happy with NSS.

I’ve removed all known 80211 patches with no improvement. I’m lost on what could be causing the slowdown. Any suggestions?

I cannot confirm the slow down.Based on the following two devices connected to my 5 GHz station:

  • iphone7 and an app called SpeedSmart, my d/l speeds are consistent going back for months (350-420 Mbps range).
  • Macbook air and the waveform bufferbloat speedtest, d/l speed was 610 Mbps.

Hmm. Started with a fresh build - no improvement. Tried two different clients and double checked settings. My 8 May build is doing well.

1 Like

hello, sorry to put this here

one thing i've noticed with my linksys ea8500 and asrock g10 is that when I build the firmware to use the mac80211 (non CT) driver AND default firmware (non CT) the router won't transmit at VHT speeds, at least to a mt76x2u device (sends about 4 megabytes/s max using WPA3)

If I use the CT firmware with the mac80211 (non CT) driver things work ok and transmit can exceed 40 megabytes/sec. Just wondering if it's a problem anyone else is experiencing. I've been avoiding the Candela driver recently because of the frag attack stuff

I haven't actually tested this for a few weeks i'll double check

Not sure what to tell you, I am building kong's branch. Last build was a few days ago when I bumped 5.4.124.

Hi Guys,
Sorry to butt-in, but the ip807x also got into a usable state except for dscp/sqm nss offloading. From a quick browse it looks to me that you have been working on this, but can anyone point me to a working repository? It would be a good starting point.

You will have to manually merge package/network/services/hostapd/files/hostapd.sh at least I did a the last time I built.

# from .git/config

[remote "kong-nss"]
        url = git@github.com:ricsc/openwrt.git
        fetch = +refs/heads/*:refs/remotes/kong-nss/*
1 Like

I just flashed a new build to my second unit, iperf says. 750Mbit up 450 down. 80Mhz CH 48.

3 Likes

@KONG nss.qos

Nice. What date? Trunk? (currently topping out around 400ish on 5/30 trunk)

Side note, is there any way to define different SQM speeds for different links? I have two WAN interfaces of different speeds, one on eth0.1 and one on eth0.4