https://github.com/ocformula/openwrt/commits/openwrt-23.05-20230629-broken-NSS-offloading
That doesn't seem to work on openwrt-23.05-nss-qsdk11.
Something's wrong with the patch and master build: continuous socket buffer drops in dmesg under heavy traffic (e.g. speedtest over WIFI), and the NSS-accelerated throughput also decreases about 10%.
[ 206.498395] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.499819] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.515303] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.518225] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.528182] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.533950] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[ 206.544130] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
@noblem: Your suggestion is the only properly working solution at this time.
@ACwifidude : you may want to clone qosmio's NSS package repo and update the feeds.conf.default to use the cloned repo. This may help prevent future NSS breakage if qosmio may make some new nss-packages changes that are not yet thoroughly tested by other people.
It was fine yesterday after running some speed tests.
Today I'm seeing this too, under low traffic.
[29039.476598] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[29039.477265] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
[29039.482971] ipq8064-mdio 37000000.mdio eth0: nss_gmac_xmit_frames: dropping skb
Dear NSS Mavens and Community,
Hello and I hope that all are well. I have been using Hannu Nyman's DSA-kernel6.1
on my R7800. I am wondering if there is a way to rebase ACWIFIDUDE'S Build with the 6.1 Linux Kernel. There are patches for 6.1 in the Master Branch of ACWIFIDUDE'S Build. Hopefully he ( or someone else more adept than myself ) might take a stab at an experimental Build featuring the 6.1 Kernel. Just an idea if it is both doable and not too much trouble or an imposition.
Thanks and Peace
hi,
always that error with my build,idea?
thanks
/media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x/nss_gmac_dev.c: In function 'nss_gmac_mac_init':
/media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x/nss_gmac_dev.c:1170:62: error: passing argument 4 of 'nss_gmac_set_mac_addr' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
1170 | gmac_addr0_low, gmacdev->netdev->dev_addr);
| ~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from /media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x/nss_gmac_dev.c:39:
/media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x/include/nss_gmac_dev.h:1519:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
1519 | uint32_t mac_high, uint32_t mac_low, uint8_t *mac_addr);
| ~~~~~~~~~^~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [scripts/Makefile.build:250: /media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x/nss_gmac_dev.o] Error 1
make[5]: *** [scripts/Makefile.build:500: /media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/ipq806x] Error 2
make[4]: *** [Makefile:2012: /media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794] Error 2
make[4]: Leaving directory '/media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-6.1.34'
make[3]: *** [Makefile:51: /media/james/D/ipq806x_builds/test_acwifi/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-nss-gmac-2021-04-20-17176794/.built] Error 2
make[3]: Leaving directory '/media/james/D/ipq806x_builds/test_acwifi/openwrt/feeds/nss/qca-nss-gmac'
time: package/feeds/nss/qca-nss-gmac/compile#1.36#0.27#1.60
ERROR: package/feeds/nss/qca-nss-gmac failed to build.
make[2]: *** [package/Makefile:120: package/feeds/nss/qca-nss-gmac/compile] Error 1
make[2]: Leaving directory '/media/james/D/ipq806x_builds/test_acwifi/openwrt'
make[1]: *** [package/Makefile:114: /media/james/D/ipq806x_builds/test_acwifi/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/james/D/ipq806x_builds/test_acwifi/openwrt'
make: *** [/media/james/D/ipq806x_builds/test_acwifi/openwrt/include/toplevel.mk:232: world] Error 2
In the function call @ 1710 try a cast to unsigned char * for the last argument in the function call like so:
gmac_addr0_low, (unsigned char *) gmacdev->netdev->dev_addr);
Bigger picture:
Note this hack completely ignores higher-level issues ... like this last param could have been made const
to blow up if compiled against a version of the func which would overwrite the address... handle possible clobberage by independent developers.
Likewise this doesn't address how what you're building made it into an archive ... unless you've mixed code from different trees.
More likely is a compiler update (or CFLAGS) to now treat discarding const as an error, released without checking against all targets (hard to do).
Or this hack could be exactly correct ...
Mmmv,
M.
PPPoE provider + Wireguard.
The problem is most obvious when downloading large files. Both IPv4 and IPv6 traffic is affected.
All is OK with non-NSS builds and the same config on mt7621. Any ideas how to debug?
--2023-07-02 14:05:01-- (try: 2) https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.tar.xz
Connecting to cdn.kernel.org (cdn.kernel.org)|2a04:4e42:200::432|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 137794856 (131M), 136703545 (130M) remaining [application/x-xz]
Saving to: βlinux-6.4.tar.xz.1β
linux-6.4.tar.xz.1 1%[> ] 1.93M --.-KB/s in 0.1s
2023-07-02 14:05:01 (6.03 MB/s) - Read error at byte 2024651/137794856 (error:1C800066:Provider routines::cipher operation failed; error:0A000119:SSL routines::decryption failed or bad record mac). Retrying.
--2023-07-02 14:05:03-- (try: 3) https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.tar.xz
Connecting to cdn.kernel.org (cdn.kernel.org)|2a04:4e42:200::432|:443... connected.
HTTP request sent, awaiting response... 206 Partial Content
Length: 137794856 (131M), 135770205 (129M) remaining [application/x-xz]
Saving to: βlinux-6.4.tar.xz.1β
@ACwifidude's nss master (reverted Qosmio's nss ecm to previous version) + Ansuel's support for QAM-256 in 2.4GHz 802.11n
[WIP,RFT,RFC] mac80211: add support for QAM-256 in 2.4GHz 802.11n by Ansuel Β· Pull Request #12904 Β· openwrt/openwrt Β· GitHub
BusyBox v1.36.1 (2023-07-04 17:37:41 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r23494-a41bded032
-----------------------------------------------------
root@OpenWrt:~# iwinfo phy1-ap0 htmode
HT20 HT40 VHT20 VHT40
root@OpenWrt:~# iwinfo phy1-ap0 info
[...]
Mode: Master Channel: 11 (2.462 GHz) HT Mode: VHT20
Hardware: [Qualcomm Atheros QCA9984]
root@OpenWrt:~# opkg list-installed | grep ath10k
ath10k-board-qca9984 - 20230515-2
ath10k-firmware-qca9984 - 20230515-2
kmod-ath10k - 5.15.119+6.1.24-4
root@OpenWrt:~# lsmod | grep nss
nss_ifb 16384 0
ppp_generic 36864 7 ecm,ppp_async,qca_nss_pptp,pptp,qca_nss_pppoe,pppoe,pppox
pppoe 24576 2 ecm,qca_nss_pppoe
pptp 28672 2 ecm,qca_nss_pptp
qca_nss_crypto 36864 0
qca_nss_drv 303104 7 nss_ifb,ecm,mac80211,qca_nss_qdisc,qca_nss_crypto,qca_nss_pptp,qca_nss_pppoe
qca_nss_gmac 61440 1 qca_nss_drv
qca_nss_pppoe 16384 0
qca_nss_pptp 16384 0
qca_nss_qdisc 61440 5
root@OpenWrt:~# opkg list-installed | grep qca-
kmod-qca-mcs - 5.15.119+2022-03-16-dd8a438-1
kmod-qca-nss-crypto - 5.15.119+2021-03-20-2271a3a-1
kmod-qca-nss-drv - 5.15.119+2020-03-20-3cfb9f43-1
kmod-qca-nss-drv-igs - 5.15.119+2020-10-29-ef082a73-2
kmod-qca-nss-drv-netlink - 5.15.119+2020-10-29-ef082a73-2
kmod-qca-nss-drv-pppoe - 5.15.119+2020-10-29-ef082a73-2
kmod-qca-nss-drv-pptp - 5.15.119+2020-10-29-ef082a73-2
kmod-qca-nss-drv-qdisc - 5.15.119+2020-10-29-ef082a73-2
kmod-qca-nss-ecm-standard - 5.15.119+2023-01-20-db66c47-1
kmod-qca-nss-gmac - 5.15.119+2021-04-20-17176794-1
root@OpenWrt:~# cat /sys/kernel/debug/qca-nss-drv/stats/virt_if
if_num 35 stats start:
rx_packets = 2035405
rx_bytes = 2841517957
rx_dropped = 0
tx_packets = 403836
tx_bytes = 41777494
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 35 stats end:
if_num 37 stats start:
rx_packets = 195099
rx_bytes = 190708306
rx_dropped = 0
tx_packets = 91307
tx_bytes = 17600019
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 37 stats end:
if_num 39 stats start:
rx_packets = 2269619
rx_bytes = 3075465446
rx_dropped = 0
tx_packets = 28076
tx_bytes = 18078129
tx_enqueue_failed = 0
shaper_enqueue_failed = 0
ocm_alloc_failed = 0
if_num 39 stats end:
base node stats begin (shown on if_num 39):
active_interfaces = 6
ocm_alloc_failed = 0
ddr_alloc_failed = 0
base node stats end.
I need some help from you experts here.
I have some Extreme Networks AP3935s and I managed to build and run it without NSS support with this forked commit:
How do I add NSS support? Without NSS the GigE throughput is varying from 233 Mbps to 1Gbps.
Ideally you start by submitting support for this device (without NSS!) to OpenWrt proper, so you profit from the base support being taken care of for you, so you can then (only) concentrate on getting NSS to work on top of that. Having to take care of two moving parts (kernel/ basic DTS and NSS) is always (much) harder than 'only' having to keep track of one (NSS).
I submitted a pull request into "master" 5 days ago but no OpenWRT dev even looked at it. How long is the wait before anyone looks at it and approves or disapprove it? Should I have submitted to some other branch?
master is the way to go (well, technically, main, but same difference), but 5 days is a tad impatient.
latest 22.03 version 20230620 is much slower than previous version 20230518, seems not accelerated at all.
I was able to run NSS on similar Unifi HD device but ethernet ports are not working properly. Can you try editing the DTS file as follows? Maybe it will work fine for you.
&gmac0 {
status = "okay";
qcom,id = <0>;
mdiobus = <&mdio1>;
pinctrl-0 = <&rgmii0_pins>;
pinctrl-names = "default";
phy-mode = "rgmii";
qcom,phy-mdio-addr = <1>;
qcom,poll-required = <0>;
qcom,rgmii-delay = <1>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&gmac2 {
status = "okay";
qcom,id = <2>;
mdiobus = <&mdio1>;
phy-mode = "sgmii";
qcom,phy-mdio-addr = <2>;
qcom,poll-required = <0>;
qcom,rgmii-delay = <0>;
};
How is VHT40 working for you in the 2.4 GHz band? I can't wait, this looks good
From my understanding if OpenWrt officially goes to DSA for ipq806x that will be the end of NSS offloading. In the mean time I'll troubleshoot and work with what we have! I'll work today to see if I can fix NSS for 23.05 and master based off the discussion above.
Cloned qosimo's NSS package repo and removed that one commit as you suggested. @vochong @noblem Appreciate the tip! Updated the 23.05 build today and it looks like it is working well.
Wired:
Wifi:
how do you get that ping on load?
did @Ansuel abandon his work on DSA with NSS?
or has this moved to 807 only nss?
i'm not that happy to use never-more-updated openwrt, but honestly i'd neither know what device to get today, 807 support seems far from stable, so what? should i get a x86 mini pc for routing and keep the 806 just for wifi access point?