Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main nss sync 210125 #184

Merged
merged 163 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
0a7c8ed
realtek: HPE 1920 24G PoE+ 180W/370W move fans to hwmon
grobian Jan 15, 2025
693c1ea
realtek: Use atomic poll for aux-mdio commands
svanheule Jan 16, 2025
acce25b
netifd: improve packet steering on ipq40xx (and possibly others)
nbd168 Jan 16, 2025
48e1427
mediatek: remove obsolete base-files scripts
nbd168 Jan 16, 2025
44c877f
uci: update to Git HEAD (2025-01-17)
nbd168 Jan 17, 2025
2c78e9d
ucode-mod-pkgen: add ucode module for generating crypto keys/certific…
nbd168 Mar 22, 2024
0de9999
generic: r8169: remove reverted temperature sensor patch
Noltari Jan 17, 2025
d7e82c7
generic: backport Realtek PHY patches from upstream
Noltari Jan 17, 2025
41c164d
generic: add pending patches for RealTek Ethernet PHYs
dangowrt Jan 16, 2025
7924acd
generic: backport pending Realtek PHY patches
Noltari Jan 17, 2025
6763557
airoha: an7581: backport ETS patch for Airoha ethernet
Ansuel Jan 17, 2025
f22feba
airoha: an7581: add pending PCI patch
Ansuel Jan 17, 2025
7482296
wifi-scripts: add a few missing auth_type checks in ucode
nbd168 Jan 18, 2025
52ffef6
realtek: Update aux-mdio driver
svanheule Jan 18, 2025
cddcc69
realtek: rtl839x: Enable AUX MDIO controller
svanheule Jan 18, 2025
fd5797b
realtek: rtl839x: Enable RTL8231 MFD driver
svanheule Jan 18, 2025
45aafe6
realtek: Switch RTL8231 driver on Zyxel GS1900-48
svanheule Jan 18, 2025
2d07791
qualcommax: dl-wrx36: fix 2.5G port LED-s
robimarko Jan 18, 2025
937b5a3
Revert "ath79: reset ETH switch for AR9344"
blocktrron Jan 17, 2025
144af32
ath79: add extended AR9344 reset sequence
blocktrron Jan 3, 2025
676dcb1
ipq4019: patch initialization of Lantiq DSL on FritzBox 7530.
Ansuel May 7, 2024
0f8a5a5
mediatek: filogic: Cudy WR3000H: Fix SUPPORTED_DEVICES
hauke Jan 17, 2025
99431e3
mediatek-filogic: fix wax220 wifi leds
maurerle Jan 16, 2025
ec8a128
generic: add leds_st1202 patch to fix NULL pointer access
innovara Jan 14, 2025
9096f99
mac80211: Fix tracing backport
guidosarducci Jan 1, 2025
9454331
ethtool: update to 6.11
pesa1234 Jan 15, 2025
6720958
ath79: lzma-loader: expose LZMA_TEXT_ADDRESS configuration again
Leo-PL Nov 20, 2024
32c6b90
ath79: zte-mf28x-common: fix initramfs execution
Leo-PL Nov 20, 2024
3d63a41
mediatek: EX5601-T0 add Zyxel EX5601-T1 and T-56 alias
abajk Jan 15, 2025
f80f521
ramips: fixes for Keenetic KN-1711,1713,1910
ivanusevanton Jan 16, 2025
b5686d2
feeds: Add nss-packages repo
qosmio Jul 14, 2024
cdfc439
nat46: patches for QCA NSS ECM
bitthief Feb 3, 2023
0e2a322
package: kernel: nat46: use standard build functions
qosmio May 6, 2024
c745e7e
iproute2: add NSS QDISC support
bitthief Feb 3, 2023
b719fe6
qualcommax: dts: add NSS nodes to IPQ807x devices
bitthief Jul 17, 2023
a92f2a1
qualcommax: net: QCA NSS igs support
bitthief Jul 17, 2023
848f53c
qualcommax: net: QCA NSS qdisc ifb support
bitthief Jul 17, 2023
9ddf576
ath11k_nss: Add NSS WiFi feature
qosmio Dec 16, 2023
04c506f
ath11k_nss: handle qca-nss-drv symbol dependancies
qosmio Jan 8, 2024
540c9a2
ath11k_nss: fix ordering of sysctl values
qosmio Jan 8, 2024
f3387b1
ath11k_nss: bugfix overwriting high watermark
qosmio Jan 9, 2024
cb42947
ath11k_nss: Handle 256/512/1G boards automatically
qosmio Jan 11, 2024
b9b56dc
ath11k_nss: Add support to account memory stats
qosmio Jan 11, 2024
4a9ace4
ath11k_nss: allow specifying pbuf 'memory_profile'
qosmio Jan 11, 2024
2bb9230
ath11k_nss: ath11k support dynamic vlan
qosmio Jan 13, 2024
3aea3f6
ath11k_nss: fix `'ppdu_info' is a pointer...` error
qosmio Jan 13, 2024
b4a19d6
ath11k_nss: bugfix NSS memleak + enhancements
qosmio Jan 16, 2024
640f1e4
ath11k_nss: set pbuf script off by default
qosmio Jan 17, 2024
cc6f3c3
ath11k_nss: squash and refactor patches
qosmio Jan 17, 2024
a5fd9c4
qualcommax: Introduce skbuff_recycle for performance
qosmio Mar 9, 2024
9c37617
qualcommax: NSS: kernel 6.6 support (squash)
qosmio Mar 25, 2024
69237be
qualcommax: Move QCE to user selectable module
qosmio Mar 25, 2024
1750732
cryptodev-linux: Add hooks for QCA NSS
qosmio Mar 25, 2024
5a43a72
feeds: NSS: point to 6.x branch
qosmio Mar 25, 2024
596810b
feeds: nss-packages: switch to branch 12.5-6.x
qosmio May 5, 2024
c01385b
ath11k_nss: fix invalid access to memory
qosmio May 5, 2024
7b91e3b
qualcommax: NSS: Add support for all ipq807x targets
qosmio May 7, 2024
4ffb05e
ath11k_nss: revert AMPDU in radiotap header
qosmio May 15, 2024
9737039
qualcommax: NSS: Set required NSS packages and options
qosmio May 25, 2024
d76c607
ath11k_nss: mac80211 fix pending airtime
qosmio Jun 2, 2024
62b8918
ath11k_nss: mac80211: remove STA txq pending airtime underflow warning
qosmio Jun 2, 2024
4029aed
ath11k_nss: change warning levels
qosmio Jun 2, 2024
b60833d
ath11k_nss: fix incorrect tx/rx stats WDS
qosmio Jun 2, 2024
a52ee8e
ath11k_nss: correctly free skb using ieee80211_free_txskb()
qosmio Jun 2, 2024
65b4a82
ath11k_nss: Add lock when accessing idr_pool of tx_ring
qosmio Jun 2, 2024
146af82
ath11k_nss: mac80211 Use C99 flexible arrays instead of zero-length a…
qosmio Jun 2, 2024
55e71bf
qualcommax: NSS: Add DTS entries for nss-macsec
qosmio Jun 2, 2024
4dcf947
qualcommax: NSS: ECM: Fixes for Bridge VLAN Filtering
qosmio Jun 2, 2024
dbc5c3e
ath11k_nss: Fix IPQ6018 wifi offloading
qosmio Jun 7, 2024
de3ccdc
qualcommax: add ramoops memory region
qosmio Jun 10, 2024
59c8e65
ath11k_nss: modularize nss-pbuf options
qosmio Jun 22, 2024
bf6686a
ath11k_nss: Organize patch order and formatting
qosmio Jun 22, 2024
2c57528
qualcommax: Refresh patches for 6.6
qosmio Jan 3, 2025
e55078a
wifi_nss: Add threaded NAPI for ath10k and ath11k
qosmio Jun 27, 2024
ee79ec2
ath11k_nss: Add mac80211 based AQL support
qosmio Jun 27, 2024
0d5ec99
qualcommax: Fix threaded NAPI scheduling
qosmio Jun 28, 2024
59ba2c3
qualcommax: clean up kernel config, align with QSDK
qosmio Jul 3, 2024
2cb97cd
qualcommax: NSS: introduce helper functions for NAPI threading
qosmio Jul 3, 2024
3eed2af
wifi_nss: Use NAPI threaded helper functions
qosmio Jul 3, 2024
84f541b
ath11k_nss: fix incorrectly applied ath11k_pci threaded napi patch
qosmio Jul 3, 2024
2900677
qualcommax: NSS: Add default packages drv, ecm, bridge-mgr
qosmio Jul 3, 2024
4bfc2ca
ath10k-ct: Bump patch for 6.4 to 6.7
qosmio Jul 3, 2024
882655e
ath10k-ct: Use NAPI threaded helper functions
qosmio Jul 3, 2024
c255a6c
ath11k_nss: add tracing for update_muedca_params_event
qosmio Jul 4, 2024
4bb2475
Revert "qualcommax: NSS: introduce helper functions for NAPI threading"
qosmio Jul 5, 2024
98d40d6
wifi_nss: Revert using napi threaded helper function
qosmio Jul 5, 2024
866d97f
ath11k_nss: fix monitor mode
qosmio Jul 6, 2024
5e76784
hostapd: handle updated MU-EDCA params from driver
qosmio Jul 6, 2024
cf18c1f
Revert "ath11k_nss: Add mac80211 based AQL support"
qosmio Jul 8, 2024
e64b4f9
ath11k_nss: add missing NL80211_ATTR_HE_MUEDCA_PARAMS
qosmio Jul 8, 2024
6fc8d68
qualcommax: skbuff_recycle: allow specifiying max size
qosmio Jul 9, 2024
017a92c
ath11k_nss: Refresh patches
qosmio Jul 10, 2024
8ce20ce
ath11k_nss: Check for NSS FW 11.4 and build accordingly
qosmio Jul 10, 2024
0f1dbaf
ath11k_nss: Bump version 6.6.15 to 6.9.9
qosmio Jul 13, 2024
84b8246
ath11k_nss: optimize qca-nss-pbuf init script
qosmio Jul 13, 2024
96bbd47
qualcommax: Switch to upstream default config
qosmio Jul 13, 2024
1a162b4
qualcommax: Add new menu item for IPQ settings
qosmio Jul 13, 2024
5e3ec6d
qualcommax: skbuff_recycle: add proc option to enable/disable
qosmio Jul 13, 2024
21b45f9
qualcommax: skbuff: at latest changes from QSDK
qosmio Jul 13, 2024
fa8833e
qualcommax: enable skb_recycle for IPQ > 256M
qosmio Jul 14, 2024
4a15835
qualcommax: add notes about SKB_RECYCLER_PREALLOC and SKB_FIXED_SIZE_2K
qosmio Jul 14, 2024
25e186f
ath11k_nss: Revert logic from coconut branch in NSS redirect
qosmio Jul 22, 2024
ca5bfff
ath11k_nss: Possible fix for WDS
qosmio Aug 1, 2024
58e0a2e
ath11k_nss: Fix RX thermal throttling on newer 2.12 firmware
qosmio Aug 1, 2024
c46cc69
ath11k_nss: WAR for association failure issue with WDS
qosmio Aug 1, 2024
09631b7
ath11k_nss: fix bss transition firmware crash
BrainSlayer Aug 6, 2024
4ff70bd
ath11k_nss: utilize existing function to get arvif from dev
qosmio Aug 9, 2024
98cdeaf
hostapd: fix MUEDCA patch for hostapd 2024-09-15
qosmio Sep 19, 2024
0576537
ath11k_nss: skip status ring entry processing (V5)
qosmio Sep 20, 2024
554c6cb
ath11k_nss: Refresh patches for 6.9.9
qosmio Sep 20, 2024
7c10efb
nat46: Bump to version 2024-08-12
qosmio Sep 21, 2024
20c9531
ath11k_nss: Remove unecessary ignore frags patch
qosmio Sep 28, 2024
40ba880
ath11k_nss: Fix patches for backports 6.11
qosmio Sep 26, 2024
f92df40
ath11k_nss: Refresh patches for backports 6.11
qosmio Sep 27, 2024
717b552
ath11k_nss: Revert patch for 512M + 2KB RX header
qosmio Sep 27, 2024
92d62b1
ath11k_nss: Consolidate Allow-fast-rx-by-bypassing-stats-update
qosmio Sep 30, 2024
fd0d78e
ath11k_nss: remove call trace while rebooting AP
qosmio Sep 29, 2024
517792d
ath11k_nss: mac80211: fix NULL pointer access, Klocwork issue
qosmio Sep 28, 2024
48d260b
ath11k_nss: fix WDS instability by disabling NAWDS mode
qosmio Sep 29, 2024
a6434e5
Revert "ath11k_nss: Revert patch for 512M + 2KB RX header"
qosmio Sep 30, 2024
335c783
docs: Update README for NSS specific info
qosmio Oct 1, 2024
3daf025
nss-setup: Add example NSS configs/scripts
qosmio Aug 10, 2024
c26e091
nss-setup: Refactor and add options for setting up nodes to use DHCP
qosmio Aug 12, 2024
5db8e71
nss-setup: fix led configs not generating
qosmio Aug 12, 2024
8684dad
nss-setup: Add additional notes
qosmio Sep 20, 2024
d5008c8
feeds: fix disable nss feed from being packaged
qosmio Sep 26, 2024
42fb2a9
nss-setup: change default optimization to '-O2'
qosmio Oct 1, 2024
27be82e
nss-setup: Make sure user selects their own target
qosmio Oct 1, 2024
ceddcfe
ath11k_nss: 6.11.2: fix 235-003-ath11k-add-AP_VLAN-vif-support-for-WD…
qosmio Oct 4, 2024
3dbea03
ath11k_nss: 6.11.2: fix 999-783-001-wifi-ath11k-Fix-BCCA-counter-for-…
qosmio Oct 4, 2024
d989392
ath11k_nss: Delete 999-783-001-wifi-ath11k-Fix-BCCA-counter-for-EMA.p…
qosmio Oct 5, 2024
44792d1
ath11k_nss: Possible workaround to 0 wifi stats
qosmio Oct 4, 2024
bade3e5
ath11k_nss: Add diagnostic gathering utility
qosmio Oct 5, 2024
da280f9
ath11k_nss: Enhance nss_diag to properly list ifaces
qosmio Oct 5, 2024
6e2076b
ath11k_nss: only show peer ast warning if NSS is off
qosmio Oct 9, 2024
8014074
ath11k_nss: Refresh patches for backports 6.11.2
qosmio Oct 1, 2024
7467756
ath11k_nss: consistently use ath11k_sta_to_arsta
qosmio Oct 9, 2024
5a3e23e
ath10k: change 'peer unmap' warning to debug
qosmio Oct 12, 2024
5c12fdb
nss-setup: Reorg and make uci-defaults pluggable
qosmio Oct 12, 2024
4356f37
nss-setup: Optimize mesh node/sat configs
qosmio Oct 12, 2024
bcf119f
nss-setup: Include example for setting up VLANs
qosmio Oct 12, 2024
d23c599
nss-setup: clean up mesh base and sat config
qosmio Oct 13, 2024
98cf473
nss-setup: explicitly require nss-ecm
qosmio Oct 14, 2024
c8fa978
nss-setup: reorg seed file with additional instructions and clarifica…
qosmio Oct 16, 2024
8aba2f5
ath10k-ct: bump patch for 6.7 to 6.10
AgustinLorenzo Oct 19, 2024
7105df3
ath11k_nss: add disable_mesh_chksum_ath11k.hotplug
qosmio Oct 20, 2024
502316e
ath11k_nss: Improve NSS event callback handling
qosmio Oct 20, 2024
67f4246
ath10k-ct: fix incompatible pointer type
qosmio Oct 20, 2024
5132b95
qualcommax: set non-ct ath10k as default
qosmio Oct 20, 2024
46f955d
ath11k_nss: replace rcu_read_unlock with spin_unlock
qosmio Oct 20, 2024
c035ea3
nss-setup: Initial README for examples
qosmio Oct 21, 2024
617be05
nss-setup: update wifi configs for WPA3
qosmio Oct 26, 2024
4ec88f1
ath11k_nss: Refactor nss_diag interface display
qosmio Oct 27, 2024
ab3ab13
nss-setup: fix network in wifi + formatting
qosmio Oct 29, 2024
2d6397c
nss-setup: Detail advanced setup with trunk ports
bgcngm Nov 3, 2024
40b1ab4
ath11k_nss: Fix null pointer dereference in BSS transition handling
qosmio Nov 15, 2024
722a01d
nss-setup: switch to using apk package manager
qosmio Nov 20, 2024
5477b92
ath11k_nss: nss_diag: check for opkg/apk
qosmio Nov 20, 2024
f1a7613
ath11k_nss: Refresh patches for backports 6.12.6
qosmio Oct 25, 2024
7eec5c9
ath11k_nss: Fix Broadcast Issues After GTK Key Exchange
qosmio Dec 29, 2024
a430281
docs: update branch links, add note about merged MX4300
qosmio Dec 31, 2024
67da354
qualcommax: ipq807x: Add ability to perform upgrade on current partit…
testuser7 Feb 24, 2024
41daf80
base-files: sysupgrade: Add new option -s to perform upgrade on curre…
testuser7 Feb 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ source "target/sdk/Config.in"
source "target/toolchain/Config.in"

source "tmp/.config-package.in"

source "config/Config-ipq.in"
203 changes: 130 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,165 @@
![OpenWrt logo](include/logo.png)
# NSS Fork for IPQ807x
| Branch | mac80211 Version | Notes |
|-----------------------------------------------------------------------------------------|------------------|----------------------------------------------------------------------|
| [main-nss](https://github.com/qosmio/openwrt-ipq/tree/main-nss) |6.12.6|Current with upstream `main` (unstable)|
| [24.10-nss](https://github.com/qosmio/openwrt-ipq/tree/24.10-nss) |6.11.2|Current with upstream `openwrt-24.10` (next stable release)|
| [24.10-nss-mx4300](https://github.com/qosmio/openwrt-ipq/tree/24.10-nss-mx4300) |6.11.2|Current with upstream `openwrt-24.10` [supports Linksys MX4300](https://github.com/openwrt/openwrt/pull/16070)|

OpenWrt Project is a Linux operating system targeting embedded devices. Instead
of trying to create a single, static firmware, OpenWrt provides a fully
writable filesystem with package management. This frees you from the
application selection and configuration provided by the vendor and allows you
to customize the device through the use of packages to suit any application.
For developers, OpenWrt is the framework to build an application without having
to build a complete firmware around it; for users this means the ability for
full customization, to use the device in ways never envisioned.
UPDATE: As of [2024-12-31 support for MX4300 has been merged](https://github.com/openwrt/openwrt/pull/16070) upstream in `main` branch and `main-nss-mx4300` is no longer needed.

Sunshine!
## Table of Contents
- [Overview](#overview)
- [What's NSS?](#whats-nss)
- [How Does OpenWrt "Offload" Traffic?](#how-does-openwrt-offload-traffic)
- [How Is NSS Different from OpenWrt's Offloading Options?](#how-is-nss-different-from-openwrts-offloading-options)
- [Do I Need NSS?](#do-i-need-nss)
- [OK, I Want NSS. Does My Device Support It?](#ok-i-want-nss-does-my-device-support-it)
- [Quickstart](#quickstart)
- [Important Note](#important-note)
- [Donate](#donate)

## Download
---

Built firmware images are available for many architectures and come with a
package selection to be used as WiFi home router. To quickly find a factory
image usable to migrate from a vendor stock firmware to OpenWrt, try the
*Firmware Selector*.
## Overview
This repository contains a fork of OpenWrt that integrates Qualcomm's NSS (Network Subsystem) support for the IPQ807x and IPQ6018 series of SoCs. The goal of this project is to provide enhanced network performance and reliability through hardware offloading, leveraging NSS's capabilities to improve throughput and reduce CPU load.

* [OpenWrt Firmware Selector](https://firmware-selector.openwrt.org/)
---
#### What's NSS?

If your device is supported, please follow the **Info** link to see install
instructions or consult the support resources listed below.
NSS (**N**etwork **S**ub**s**ystem) is a specialized hardware offloading engine developed by Qualcomm, integrated into their IPQ series SoCs (System-on-Chip), such as the IPQ807x and IPQ6018. NSS is designed to handle high-throughput network tasks like NAT, routing, and even security tasks such as IPsec, without burdening the main CPU cores.

##
---
#### How Does OpenWrt "Offload" Traffic?

An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
OpenWrt offers three primary methods for offloading network traffic, each aimed at reducing CPU load and improving throughput:

* [OpenWrt Wiki Download](https://openwrt.org/downloads)
1. **Packet Steering**: Distributes network processing across multiple CPU cores. It helps balance the load on multi-core CPUs but still relies on the CPU to handle packet processing.

## Development
2. **Software Flow Offloading**: Accelerates traffic processing by using the CPU’s fast path, allowing more efficient handling of routing and NAT (Network Address Translation) by bypassing the kernel's normal slow path. This relies entirely on the CPU to speed up packet forwarding.

To build your own firmware you need a GNU/Linux, BSD or macOS system (case
sensitive filesystem required). Cygwin is unsupported because of the lack of a
case sensitive file system.
3. **Hardware Flow Offloading**: Available only on select devices (e.g., Mediatek), this method offloads packet forwarding directly to the network hardware using kernel-based mechanisms (nftables/iptables) to accelerate traffic. However, this is limited to devices that have hardware acceleration capabilities supported by OpenWrt.

### Requirements
---
#### Why Isn't NSS Supported in Vanilla OpenWrt?

You need the following tools to compile OpenWrt, the package names vary between
distributions. A complete list with distribution specific packages is found in
the [Build System Setup](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem)
documentation.
NSS requires proprietary binaries (NSS firmware) and extensive patches to the Linux kernel and networking stack. Qualcomm does not openly release the necessary firmware or detailed documentation on how to integrate NSS support, making it extremely difficult for the OpenWrt community to maintain. The required patches are invasive and complex, altering significant portions of the network stack, which makes upstream integration into OpenWrt unlikely. Maintaining compatibility with each new kernel version is another barrier, as Qualcomm’s support for these patches is minimal and sporadic.

```
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.7+ rsync subversion unzip which
```
---

### Quickstart
#### How Is NSS Different from OpenWrt's Offloading Options?

1. Run `./scripts/feeds update -a` to obtain all the latest package definitions
defined in feeds.conf / feeds.conf.default
The main difference between NSS and OpenWrt's offloading methods is that NSS provides **hardware acceleration** directly within the SoC, bypassing the CPU almost entirely for certain network tasks. OpenWrt's offloading, on the other hand, relies heavily on the **CPU** to manage and accelerate traffic, either via multi-core CPU distribution (Packet Steering) or kernel-level acceleration (Software/Hardware Flow Offloading).

2. Run `./scripts/feeds install -a` to install symlinks for all obtained
packages into package/feeds/
NSS doesn’t play nice with OpenWrt’s built-in offloading because they conflict in how they handle packets, leading to performance issues or even outright failures.

3. Run `make menuconfig` to select your preferred configuration for the
toolchain, target system & firmware packages.
---

4. Run `make` to build your firmware. This will download all sources, build the
cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen
applications for your target system.
#### Key Differences:

### Related Repositories
- **Packet Steering**: While it redistributes packet processing across multiple CPU cores, it still involves the CPU heavily. With NSS, dedicated hardware cores handle packet processing, so packet steering can interfere by unnecessarily involving the CPU, reducing the benefits of offloading to hardware.

The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called `opkg`. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
- **Software Flow Offloading**: This uses kernel-level mechanisms (nftables/iptables) to accelerate packet forwarding by utilizing the CPU’s fast path. NSS, however, bypasses the kernel’s networking stack and offloads these tasks directly to the hardware. If both are enabled, packet handling may be done redundantly in software and hardware, leading to inefficiencies or conflicts.

* [LuCI Web Interface](https://github.com/openwrt/luci): Modern and modular
interface to control the device via a web browser.
- **Hardware Flow Offloading**: Available only for certain devices like Mediatek, this method offloads packet processing to specific hardware via kernel drivers. However, this hardware-based acceleration is entirely separate from NSS and not as efficient on Qualcomm devices. Using it alongside NSS can lead to unpredictable behavior, as both try to accelerate traffic but in incompatible ways.

* [OpenWrt Packages](https://github.com/openwrt/packages): Community repository
of ported packages.
---

* [OpenWrt Routing](https://github.com/openwrt/routing): Packages specifically
focused on (mesh) routing.
#### Do I Need NSS?

* [OpenWrt Video](https://github.com/openwrt/video): Packages specifically
focused on display servers and clients (Xorg and Wayland).
Here are some reasons you might need NSS:

## Support Information
- You require high network throughput (e.g., gigabit speeds) on devices like the IPQ807x or IPQ6018 series.
- Your router handles resource-intensive tasks like NAT, VPN (IPsec), or other routing-heavy activities that would otherwise overwhelm the CPU.
- You’re seeking better performance than what OpenWrt’s software and hardware offloading options can provide.

For a list of supported devices see the [OpenWrt Hardware Database](https://openwrt.org/supported_devices)
However, it’s important to note that **NSS is NOT supported upstream** in OpenWrt. As of now, there are only a few community-driven projects that maintain NSS patches.

### Documentation
I personally maintain an NSS fork of OpenWrt [qosmio/openwrt-ipq](https://github.com/qosmio/openwrt-ipq) and the necessary NSS packages [qosmio/nss-packages](https://github.com/qosmio/nss-packages).

* [Quick Start Guide](https://openwrt.org/docs/guide-quick-start/start)
* [User Guide](https://openwrt.org/docs/guide-user/start)
* [Developer Documentation](https://openwrt.org/docs/guide-developer/start)
* [Technical Reference](https://openwrt.org/docs/techref/start)
---

### Support Community
#### OK, I Want NSS. Does My Device Support It?

* [Forum](https://forum.openwrt.org): For usage, projects, discussions and hardware advise.
* [Support Chat](https://webchat.oftc.net/#openwrt): Channel `#openwrt` on **oftc.net**.
NSS is available for most Qualcomm IPQ807x and IPQ6018 devices. If your device is part of this chipset family and supported in OpenWrt, it can run NSS.

### Developer Community
Supported devices include, but are not limited to:
- Devices based on the **IPQ807x** (e.g., some high-end Netgear and TP-Link routers)
- Devices based on the **IPQ6018** (e.g., certain enterprise routers)

* [Bug Reports](https://bugs.openwrt.org): Report bugs in OpenWrt
* [Dev Mailing List](https://lists.openwrt.org/mailman/listinfo/openwrt-devel): Send patches
* [Dev Chat](https://webchat.oftc.net/#openwrt-devel): Channel `#openwrt-devel` on **oftc.net**.
---

## License
## Quickstart

OpenWrt is licensed under GPL-2.0
1. Clone this repository:
```bash
git clone https://github.com/qosmio/openwrt-ipq -b main-nss
cd openwrt-ipq
```
2. Update feeds:
```bash
./scripts/feeds update
./scripts/feeds install -a
```
3. Copy over the seed file
```bash
cp nss-setup/config-nss.seed .config
```
4. Open the `.config` in a text editor, find your device, and remove the "#" and change `"is not set"` to `"=y"`

Example:
```diff
-# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_dynalink_dl-wrx36 is not set
+CONFIG_TARGET_qualcommax_ipq807x_DEVICE_dynalink_dl-wrx36=y
```
6. Generate the full config
```bash
make defconfig V=s
```
7. Now run full build
```bash
make download -j$(nproc) V=s
make -j$(nproc) V=s
```
---
### Important Note:

Many users report issues after enabling Packet Steering or Flow Offloading (Software or Hardware), often because they are used to these options or they get carried over during a sysupgrade. Even if the setup seems to work initially, it is not optimized for NSS offloading, and you are losing the full benefits of hardware acceleration.

If you plan to use NSS, **start fresh** and **disable all other offloading options**.

By default OpenWrt's offloading is disabled, but if you ever happen to enable it accidentally, make sure you disable it.

---
```bash
uci set network.@device[0].packet_steering=0
uci set network.@device[0].flow_offloading=0
uci set network.@device[0].flow_offloading_hw=0
uci commit network
```
If you have questions or issues, please join the discussion on OpenWrt's forums.
[Qualcomm NSS Build](https://forum.openwrt.org/t/qualcommax-nss-build)

## Please remember when posting about an issue:
1. Include your device make and model.
2. Relevant logs and screenshots.
3. State clearly and concisely the issue you're having.
> "My router doesn't work", "I'm getting an error"

Is not something I can help with.
4. Include the specific commit you're building from.
> "I'm building from latest"

Also not helpful as I'm always pushing changes...

5. Be respectful and mindful. I dedicate my free time to maintain and improve this project, and I do it for the benefit of the community. Remember that I'm not a full-time developer or support team—I'm just an individual sharing my work. Constructive feedback is always welcome, but please refrain from being overly critical or demanding.

## Support the Project

I never really thought about setting up donations before, but with so many people being receptive and appreciative and asking how to contribute, I figured, why not? Of course, this project also builds on the incredible work done by the talented devs upstream who put in countless hours into OpenWrt itself. I’ll definitely continue working on this, but if you’d like to support, every bit helps.

[![Donate with PayPal](./paypal.png)](https://www.paypal.com/donate?business=3V3H2SZFY7DNQ&item_name=Maintaining+NSS+fork+of+OpenWRT+and+NSS+packages.)
<a href="https://cash.app/$austinzk">
<img src="./cashapp.png" alt="Cashapp" width="150px"/>
</a>

Consider donating to the [OpenWrt Foundation](https://openwrt.org/donate)
Binary file added cashapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 150 additions & 0 deletions config/Config-ipq.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# vim: set ft=kconfig
menu "Qualcomm IPQ Options"

comment "Kernel build options"

choice KERNEL_IPQ_MEM_PROFILE
prompt "IPQ memory profile"
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_edimax_cax1800
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_compex_wpq87
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4200v1
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_redmi_ax6
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_xiaomi_ax3600
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_zte_mf269

config IPQ_MEM_PROFILE_1024
bool "1024"
config IPQ_MEM_PROFILE_512
bool "512"
config IPQ_MEM_PROFILE_256
bool "256"
endchoice

config KERNEL_IPQ_MEM_PROFILE
int
default 1024 if IPQ_MEM_PROFILE_1024
default 512 if IPQ_MEM_PROFILE_512
default 256 if IPQ_MEM_PROFILE_256

help
This option select memory profile to used, which defines
the reserved memory configuration used in device tree

config KERNEL_SKB_RECYCLER
bool "Generic SKB recycling"
default y if KERNEL_IPQ_MEM_PROFILE > 256

choice KERNEL_SKB_RECYCLE_SIZE
prompt "SKB recycler size"
default SKB_RECYCLE_SIZE_2304
default SKB_RECYCLE_SIZE_1856 if KERNEL_IPQ_MEM_PROFILE < 1024

depends on KERNEL_SKB_RECYCLER
config SKB_RECYCLE_SIZE_1856
bool "1856"
config SKB_RECYCLE_SIZE_2304
bool "2304"
endchoice

config KERNEL_SKB_RECYCLE_SIZE
int
depends on KERNEL_SKB_RECYCLER
default 2304 if SKB_RECYCLE_SIZE_2304
default 1856 if SKB_RECYCLE_SIZE_1856

help
SKB recycler default size

config KERNEL_SKB_RECYCLER_MULTI_CPU
bool "Cross-CPU recycling for CPU-locked workloads"
depends on KERNEL_SKB_RECYCLER
default y

config KERNEL_SKB_RECYCLER_PREALLOC
bool "Enable preallocation of SKBs (For SFE not NSS)"
depends on KERNEL_SKB_RECYCLER
default n
help
NOTE: This is primarily for platforms utilizing SFE (Shortcut Forwarding Engine)
and not NSS (Network Subsystem) offload.

NSS offload platforms mostly utilize the SKB recycling feature when managing memory.
Mostly when to "reclaim" it.

This option enables preallocation of SKBs.
The default is '16384' which means 16384 x 4096 (Size of SKB) = 64MB.

config KERNEL_SKB_RECYCLE_MAX_PREALLOC_SKBS
int "Number of SKBs to be preallocated"
depends on KERNEL_SKB_RECYCLER_PREALLOC
default 16384

config KERNEL_SKB_FIXED_SIZE_2K
bool "SKB size fixed at 2K"
default n
default y if KERNEL_IPQ_MEM_PROFILE < 512
help
SKB size fixed at 2K. Primarily for platforms with less than 512MB memory.

config KERNEL_ALLOC_SKB_PAGE_FRAG_DISABLE
depends on KERNEL_SKB_RECYCLER
bool "Disable alloc skb page frag"
default n

choice KERNEL_PREEMPTION
prompt "Kernel preemption level"
default KERNEL_PREEMPT

config KERNEL_PREEMPT_NONE
bool "No Forced Preemption (Server)"
help
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the time,
but there are no guarantees and occasional longer delays are
possible.

Select this option if you are building a kernel for a server or
scientific/computation system, or if you want to maximize the
raw processing power of the kernel, irrespective of scheduling
latencies.

config KERNEL_PREEMPT_NONE_BUILD
depends on KERNEL_PREEMPT_NONE
bool
default y

config KERNEL_PREEMPT
bool "Preemptible Kernel (Low-Latency)"
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
preemptible. This allows reaction to interactive events by
permitting a low priority process to be preempted involuntarily
even if it is in kernel mode executing a system call and would
otherwise not be about to reach a natural preemption point.
This allows applications to run more 'smoothly' even when the
system is under load, at the cost of slightly lower throughput
and a slight runtime overhead to kernel code.

Select this if you are building a kernel for a desktop or
embedded system with latency requirements in the milliseconds
range.

if KERNEL_PREEMPT
config KERNEL_PREEMPT_RCU
bool "Preemptible RCU"
default y
select KERNEL_PREEMPT_COUNT
help
This option selects the RCU implementation that is
designed for very large SMP systems with hundreds or
thousands of CPUs, but for which real-time response
is also required. It also scales down nicely to
smaller systems.

Select this option if you are unsure.

endif
endchoice

endmenu
Loading
Loading