Qualcommax NSS Build

you are shaping traffic on lan1 port not wan - I assume that your pppoe connection is wan interface. If yes , then your traffic shaping should look like:

insmod nss-ifb nss_dev_name=wan
ip link set up nssifb

# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL
tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb
tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

# Shape egress traffic to 500 Mbit with chained NSSFQ_CODEL
tc qdisc add dev wan root handle 1: nsstbl rate 500Mbit burst 1Mb
tc qdisc add dev wan parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

It might be useful also to change quantum size from 1514 into 1518 for pppoe connection, since frame size for pppoe is 1518 - but I'm not sure if nss can handle custom size properly (worth to try)

1 Like

my wan connetion is on lan1 port.

i will change to 1518 to tray

I've compiled @bitthief repo + patch + wireguard, nss offload enabled, nss qdisc enabled, connection fiber, home usage stats for 24hr window https://imgur.com/a/yp3CCX2
Looks very stable in terms of cpu usage and memory
Only thing that worries me, is transfer that went through phy1-ap0. In my case it's 3TB which is definitely too high, can you also check if you have similar behavior for your wifi interfaces?

edit: stats for 1 week: https://imgur.com/a/lDvmCTe - looks very stable for me.

2 Likes

hello adamhnat ,can you share your grafana dashboard .

I've used board id 11147 - it's not mine, I've reused it and just change wireless interfaces from wlan0, wlan1 into phy1-ap0, phy2-ap0...

1 Like

Great build. luci-app-sqm is missing in the build?

New release, anyone can confirm if hardware offload works with PPPoE internet?

after update with saved settings now i can't connect to both wifi bands on my dynalink... any ideas why?

yep, trying at RAX120 and unable to install sqm-scripts (and luci-app-sqm too)

@bitthief NSS 6.1 repo is still on kernel 6.1.46.
How is it possible to update to latest 6.1.51. Did anyone make a rebase to latest OpenWrt master?

same as old release

Does anybody know, what mean this "failed to insert /lib/modules/6.1.48/nss-ifb.ko"? As I see, all nss modules installed and running. Rax120v2 with this build https://github.com/AgustinLorenzo/openwrt/releases/tag/ipq807x-2023-08-27-1909

root@OpenWrt:~# /etc/init.d/qca-nss-mirred start
root@OpenWrt:~# insmod nss-ifb nss_dev_name=lan1
failed to insert /lib/modules/6.1.48/nss-ifb.ko
root@OpenWrt:~# ip link set up nssifb
Cannot find device "nssifb"


root@OpenWrt:~# lsmod | grep qdisc
qca_nss_drv           905216 14 act_nssmirred,ecm,qca_nss_tunipip6,qca_nss_tun6rd,qca_nss_crypto,qca_nss_qdisc,qca_nss_pptp,qca_nss_pppoe,qca_nss_map_t,qca_nss_lag_mgr,qca_nss_l2tpv2,qca_nss_gre,qca_nss_bridge_mgr,qca_nss_vlan
qca_nss_qdisc          94208  0 
qca_ssdk             1429504  5 qca_nss_qdisc,qca_nss_bridge_mgr,qca_nss_vlan,qca_nss_drv,qca_nss_dp

Are you sure your wan port is on lan1?

Nope, I wanna try maximum speed with traffic shaper (set to 1GB and try with iperf3 to compare with sqm-scripts).
Anyway, with wan or wwan error is the same.

just upgrade my ax6 now using 6.1.51

i just donwload from this link
'https://openwrt.admincomps.ru/nss/20230907/'

I am getting kernel panic with WRX36 binary:
@AgustinLorenzo

  29.208167] Unable to handle kernel read from unreadable memory at virtual address 0000000000000028
[   29.208219] Mem abort info:
[   29.216027]   ESR = 0x0000000096000005
[   29.218795]   EC = 0x25: DABT (current EL), IL = 32 bits
[   29.222616]   SET = 0, FnV = 0
[   29.228083]   EA = 0, S1PTW = 0
[   29.230953]   FSC = 0x05: level 1 translation fault
[   29.233988] Data abort info:
[   29.238844]   ISV = 0, ISS = 0x00000005
[   29.241971]   CM = 0, WnR = 0
[   29.245530] user pgtable: 4k pages, 39-bit VAs, pgdp=000000005388b000
[   29.248663] [0000000000000028] pgd=0800000046926003, p4d=0800000046926003, pud=0800000046926003, pmd=0000000000000000
[   29.255096] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
[   29.265674] Modules linked in: ecm xt_connlimit nft_fib_inet nf_flow_table_inet nf_conncount iptable_nat ath11k_ahb ath11k xt_state xt_nat xt_helper xt_conntrack xt_connmark xt_connbytes xt_REDIRECT xt_MASQUERADE nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_chain_nat nf_tables nf_nat_rtsp nf_nat nf_flow_table nf_conntrack_rtsp nf_conntrack mac80211 iptable_mangle iptable_filter ipt_REJECT ip_tables cfg80211 xt_time xt_tcpudp xt_recent xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG x_tables wireguard tcp_bbr qrtr_smd qrtr qmi_helpers ppp_async nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv4 libcrc32c libchacha20poly1305 crc_ccitt compat sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact qca_nss_tun6rd
[   29.265823]  qca_nss_cfi_cryptoapi qca_nss_crypto qca_nss_qdisc qca_nss_vxlanmgr qca_nss_pptp pptp qca_nss_pppoe pppoe pppox qca_nss_map_t qca_nss_lag_mgr qca_nss_l2tpv2 ppp_generic slhc qca_nss_gre qca_nss_bridge_mgr qca_nss_vlan qca_mcs bonding ip_gre gre ifb nat46 nf_defrag_ipv6 sit qca_nss_drv tunnel6 tunnel4 tun vxlan seqiv michael_mic leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk gpio_button_hotplug ext4 mbcache jbd2 aquantia hwmon crc32c_generic
[   29.378770] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.1.48 #0
[   29.401003] Hardware name: Dynalink DL-WRX36 (DT)
[   29.406905] pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   29.411769] pc : ip6mr_find_mfc_entry+0x58/0x1d0
[   29.418536] lr : ecm_multicast_ipv6_connection_process+0x1cc/0xff0 [ecm]
[   29.423402] sp : ffffffc00800b400
[   29.430078] x29: ffffffc00800b400 x28: 0000000000000001 x27: 0000000000004389
[   29.433297] x26: 0000000000000000 x25: 0000000000000000 x24: ffffffc00800b720
[   29.440416] x23: ffffff8004fd36e8 x22: ffffffc00800b5f8 x21: 0000000000000010
[   29.447533] x20: ffffffc00800b710 x19: 0000000000000000 x18: 0000000000000000
[   29.454654] x17: ffffffc0372fc000 x16: ffffffc008008000 x15: 000316b755c2b324
[   29.461769] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000332
[   29.468887] x11: ffffffc00800b880 x10: 0000000000000000 x9 : 000000000000000c
[   29.476006] x8 : ffffffc00800b638 x7 : 0000000000000000 x6 : 0000000000000000
[   29.483125] x5 : ffffffc008cb7f20 x4 : ffffffc00800b5f8 x3 : 0000000000000010
[   29.490241] x2 : ffffffc00800b720 x1 : ffffffc00800b710 x0 : ffffffc008cb76c0
[   29.497361] Call trace:
[   29.504469]  ip6mr_find_mfc_entry+0x58/0x1d0
[   29.506729]  ecm_multicast_ipv6_connection_process+0x1cc/0xff0 [ecm]
[   29.511248]  ecm_ipv6_ip_process+0x35c/0xb74 [ecm]
[   29.517581]  ecm_ipv6_ip_process+0x9b4/0xb74 [ecm]
[   29.522182]  nf_hook_slow+0x48/0xf0
[   29.526953]  br_forward_finish+0x68/0xc0
[   29.530340]  __br_forward+0xe0/0x160
[   29.534505]  maybe_deliver+0xd4/0x130
[   29.538064]  br_flood+0xa4/0x1e4
[   29.541624]  br_handle_frame_finish+0x44c/0x5b0
[   29.544924]  br_handle_frame+0x344/0x404
[   29.549176]  __netif_receive_skb_core.constprop.0+0x4dc/0xda0
[   29.553348]  __netif_receive_skb_list_core+0xd8/0x1f0
[   29.558988]  netif_receive_skb_list_internal+0x1cc/0x2c0
[   29.564022]  napi_complete_done+0x68/0x1b0
[   29.569403]  nss_core_handle_napi_queue+0x60/0x80 [qca_nss_drv]
[   29.573313]  __napi_poll+0x38/0x174
[   29.579123]  net_rx_action+0x130/0x2c0
[   29.582596]  _stext+0x100/0x28c
[   29.586413]  ____do_softirq+0x10/0x20
[   29.589453]  call_on_irq_stack+0x24/0x50
[   29.593273]  do_softirq_own_stack+0x1c/0x30
[   29.597267]  __irq_exit_rcu+0xbc/0xf0
[   29.601172]  irq_exit_rcu+0x10/0x20
[   29.604991]  el1_interrupt+0x38/0x6c
[   29.608291]  el1h_64_irq_handler+0x18/0x2c
[   29.612111]  el1h_64_irq+0x68/0x6c
[   29.616016]  arch_cpu_idle+0x18/0x2c
[   29.619401]  default_idle_call+0x2c/0x70
[   29.623136]  do_idle+0x208/0x230
[   29.627039]  cpu_startup_entry+0x28/0x30
[   29.630254]  arch_show_interrupts+0x0/0x164
[   29.634159]  __secondary_switched+0xb0/0xb4
[   29.638069] Code: 14000004 f9400273 eb05027f 54000960 (b9402a60)
[   29.642238] ---[ end trace 0000000000000000 ]---
[   29.648485] Kernel panic - not syncing: Oops: Fatal exception in interrupt
[   29.653177] SMP: stopping secondary CPUs
[   29.659857] Kernel Offset: disabled
[   29.663933] CPU features: 0x00000,00000000,0000400b
[   29.667147] Memory Limit: none
[   30.672009] Rebooting in 3 seconds..

EDIT: I fixed with resetting it to defaults. I do have other issues with radios that require reboot and some clients cannot connect or connect slowly. Overall, Jan snapshot worked better (months w/o reboot) for me, even if this one is about 10% faster.

I actually have issues I've not experienced since inception, perhaps they are related to the new kernel or ath11k firmware v2.9.

I've built tc-* packages compatible with my nss builds
https://openwrt.admincomps.ru/nss-packages/

Usage:

cd /tmp
wget https://openwrt.admincomps.ru/nss-packages/tc-tiny_6.4.0-1_aarch64_cortex-a53.ipk
opkg install /tmp/tc-tiny_6.4.0-1_aarch64_cortex-a53.ipk
2 Likes

someone has tested the pppoe performance obove 1gbps ? (like 2.5gbps)

Newbie question- what are these tc-* packages for? Thanks!

tc-* packages are used for traffic shaping.
Use the following example with nss-ifb module:

insmod nss-ifb nss_dev_name=wan
ip link set up nssifb

# Shape ingress traffic to 500 Mbit with chained NSSFQ_CODEL
tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb
tc qdisc add dev nssifb parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default

# Shape egress traffic to 500 Mbit with chained NSSFQ_CODEL
tc qdisc add dev wan root handle 1: nsstbl rate 500Mbit burst 1Mb
tc qdisc add dev wan parent 1: handle 10: nssfq_codel limit 10240 flows 1024 quantum 1514 target 5ms interval 100ms set_default
2 Likes