Commit Graph

382 Commits

Author SHA1 Message Date
Sean Khan
3ce5249c26 ssdk-shell: fix build with gcc 15 and remove unused code
* Bumped to latest NHSS.QSDK.12.5 release (2024-12-17)
* Fixed build with gcc 15
* Backported 13.0 patch to removed unused chip code

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-13 22:19:44 -04:00
Sean Khan
e5831d6123 nss-ecm: add wildcard opt to del denied ports
Added ability to delete denied ports using wildcard option.

```
echo del * > /proc/sys/net/ecm/udp_denied_ports
echo del * > /proc/sys/net/ecm/tcp_denied_ports
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 22:18:46 -04:00
Sean Khan
adbbcb0c41 treewide: Refresh patches
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 22:12:00 -04:00
Sean Khan
ff7d2b1c00 nss-info: remove source and switch to repo based build
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 21:57:22 -04:00
Sean Khan
99700f4bf9 nss-clients: netlink: modularize build components
Instead forcing all components to be built together, selectively build
feature sets based on driver and client selections.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 21:55:22 -04:00
Sean Khan
274cc66de7 nss-clients: backport and fixes for ipsecmgr, netlink, vxlanmgr, qdisc
backport 12.5:
* ipsecmgr
* netlink
* vxlanmgr
* qdisc

fixes:
* impsecmgr

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 21:02:00 -04:00
Sean Khan
1c24304019 nss-drv: [11.4] Backport priority to multi-queue mapping.
Enable an ingress priority to multi-queue priority mapping table.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:53:30 -04:00
Sean Khan
c885ad0e70 nss-drv: [11.4] backport stats write functionality from 12.5
Allow resetting some stats via debugfs interface.

Not all stats are resettable,

```sh
echo 0 > /sys/kernel/debug/qca-nss-drv/stats/drv
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:48:47 -04:00
Sean Khan
b984c52eb8 nss-drv: [11.4] fix greredir stats partial copy issue.
If the kernel passes smaller user buffer to copy stats
than required, copy the partial content from local  buffer
and in next call copy the remaining content.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:47:51 -04:00
Sean Khan
dca6e6e880 nss-drv: fix write error when creating/destroying PPE VP interfaces
This is just a functional fix, the underlying framework for PPE VP is
not really useful for anything on ipq807x.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:41:20 -04:00
Sean Khan
5cb2492405 nss-drv: fix null ptr deref when logging is enabled
When debug logging is enabled for bridge or gre a null
pointer deref error was causing system to crash

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:37:06 -04:00
Sean Khan
a6d4d5bfc3 nss-drv: [12.5] fix missing GRE macro
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:34:51 -04:00
Sean Khan
febe0256ca nss-drv: nss_rps: fix buff size when writing
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:19:24 -04:00
Sean Khan
1f7a6b7879 nss-crypto: Sync with upstream and remove obsolete patches
2024-09-16 - 60e27b9 - Linux 6.6 compilation fixes

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:16:43 -04:00
Sean Khan
3e2008c883 nss-cfi: Sync with upstream and remove obsolete patches
2025-03-10 - e6ce3e6 - Add support for skcipher in NSS.
2025-02-27 - f49d024 - Addition of ahash finup operation
2025-02-24 - 6d9b018 - Update driver names for ahash
2024-09-16 - 6e8f294 - Linux 6.6 compilation fixes

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:13:48 -04:00
Sean Khan
88ee738cb5 nss-clients: nss_qdisc: restore dev_base_lock usage for kernels < 6.10
In kernels prior to 6.10, dev_base_lock was required to protect the
net_device list traversal. From 6.10 onward the lock was
dropped in favor of RCU.

To preserve previous behavior (i.e. 24.10-nss on kernel 6.6), restore
read_lock()/read_unlock() and wrap into kernel macros check.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-06-15 13:52:33 -04:00
Sean Khan
6b2c80e13a nss-drv: Limit RMNET and memory profile (IPQ5018/6018)
IPQ5018 and IPQ6018 are limited to 512MB so set default accordingly.

RMNET is also only supported on IPQ807x and IPQ5018.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-06-04 18:26:26 -04:00
Sean Khan
0ba24f4c33 nss-ecm: Ensure NSS_IPV4_RULE_CREATE_RAWIP_VALID is only checked for NSS 12.5+
It was unconditionally setting `rule_invalid = true` for FW less than 12.5.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-06-03 04:15:14 -04:00
Sean Khan
2f4750a191 nss-drv: rework smp affinity hangling
Reworked SMP affinity handling for better balancing of PPDU and USBs

```
Pinning IRQ(46) nss_queue0               to CPU 0 (NSS Core 0)
Pinning IRQ(47) nss_queue1               to CPU 1 (NSS Core 0)
Pinning IRQ(48) nss_queue2               to CPU 2 (NSS Core 0)
Pinning IRQ(49) nss_queue3               to CPU 3 (NSS Core 0)
Pinning IRQ(57) nss_queue0               to CPU 3 (NSS Core 1)
Pinning IRQ(58) nss_queue1               to CPU 2 (NSS Core 1)
Pinning IRQ(59) nss_queue2               to CPU 1 (NSS Core 1)
Pinning IRQ(60) nss_queue3               to CPU 0 (NSS Core 1)
Pinning IRQ(43) nss_empty_buf_sos        to CPU 0 (NSS Core 0)
Pinning IRQ(44) nss_empty_buf_queue      to CPU 0 (NSS Core 0)
Pinning IRQ(53) nss_empty_buf_sos        to CPU 3 (NSS Core 1)
Pinning IRQ(55) nss_empty_buf_queue      to CPU 3 (NSS Core 1)
Pinning IRQ(41) xhci-hcd:usb1            to CPU 2
Pinning IRQ(42) xhci-hcd:usb3            to CPU 2
Pinning IRQ(79) ppdu-end-interrupts-mac1 to CPU 2
Pinning IRQ(83) ppdu-end-interrupts-mac2 to CPU 3
Pinning IRQ(81) ppdu-end-interrupts-mac3 to CPU 1
```

Primarily meant to improve performance on Arcadyan AW1000 which uses USB
based cellular modems (xhci-hcd:usb3). They are now pinned to CPU 2

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-06-01 23:40:20 -04:00
Sean Khan
370137d0bf nss-drv: nss_stats: fix gawk regex compatibility
It's not necessary to escape '#' and '=' in awk regexes, doing so
causes gawk to throw warnings.

Busybox awk is more permissive and does not throw warnings.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-31 03:42:44 -04:00
Sean Khan
d845680ef2 wwan: remove all wwan related packages out of nss packages
These packages really shouldn't be in this repository as it's not the
core focus of the project. I am unable to test or maintain these since
it requires a device with a Quectel modem and cellular service, neither of
which I have access to.

For `Arcadyan AW1000` users you may be interested in trying:

https://github.com/immortalwrt/wwan-packages

All issues related to these packages will be closed and not addressed

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 20:39:36 -04:00
Sean Khan
c0bbc6f168 treewide: Remove dependency on br_netfilter
Upstream OpenWrt 24.10 and later uses nftables by default.
Bridge filtering is not really needed anymore.

This should also prevent unnecessary chain dependencies getting built
like like `kmod-ipt-ipopt`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 18:43:45 -04:00
Sean Khan
03f6cb25eb nss-drv: Limit arch specific NSS features
Prevent selecting or building NSS features that are ipq806x specific

These include:

- Port ID (nss_portid.c)
- OAM (nss_oam.c)
- Timestamping (nss_tstamp.c)
- Legacy WiFi Offload (nss_wifi.c)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 14:35:29 -04:00
Sean Khan
589db1c9c8 nss-clients: GRE: Fix building on kernels < 6.10
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 05:25:17 -04:00
Sean Khan
6b2d99511c nss-drv: Restore '-Wno-unused-variable' flag
It was accidentally removed in commit: de828e39b
("treewide: Additional fixes for kernel 6.12 + GCC 14.3")

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 03:21:05 -04:00
Sean Khan
de828e39b2 treewide: Additional fixes for kernel 6.12 + GCC 14.3+
Fixes for:

  incompatible-pointer-types: (nss gre)
  int-conversion

And ignore warnings for:
  empty-body

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-28 21:06:50 -04:00
Sean Khan
54d105f7ca nss-drv: additional fixes for kernel 6.12
Fixes the following sysctl table check failures:

[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/ppe_vp/(null) procname is null
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/ppe_vp/(null) No proc_handler
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/pppoe/(null) procname is null
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/pppoe/(null) No proc_handler

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-27 19:13:10 -04:00
Sean Khan
9762fbaabe nss-drv: Fix GCC empty-body error in GCC 14.3+
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-27 15:47:10 -04:00
Sean Khan
25086fbac3 treewide: Additional fixes for kernel 6.12 + GCC 15.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-25 15:36:03 -04:00
Sean Khan
061e717e06 treewide: fix nss-crypto and qca-nss-cfi patches for kernel 6.12
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-09 14:53:17 -04:00
Sean Khan
6f823a2b34 treewide: Initial support for kernel 6.12 + GCC 15.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-08 23:12:18 -04:00
Sean Khan
aeca10fbca nss-drv: [11.4] Fix empty line always appearing
Fixes the weird empty line that always appears in dmesg when loading

```
[Thu May  1 15:07:40 2025] hotplug: symlinking qca-nss0.bin to /lib/firmware/qca-nss0-retail.bin
[Thu May  1 15:07:40 2025] qca-nss 39000000.nss: NSS FW Version: NSS.HK.11.4.0.5-6-R
[Thu May  1 15:07:40 2025] qca-nss 39000000.nss: fw of size 835960 bytes copied to addr: 40000000, nss_id: 0

[Thu May  1 15:07:40 2025] qca-nss 39000000.nss: NSS core 0 booted successfully
[Thu May  1 15:07:40 2025] hotplug: symlinking qca-nss1.bin to /lib/firmware/qca-nss1-retail.bin
[Thu May  1 15:07:40 2025] qca-nss 39400000.nss: fw of size 292296 bytes copied to addr: 40800000, nss_id: 1

[Thu May  1 15:07:40 2025] qca-nss 39400000.nss: NSS core 1 booted successfully
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-01 19:14:04 -04:00
Sean Khan
7180ade5ca nss-firmware: ipq5018: Add 12.2-156-R
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-01 16:48:07 -04:00
Sean Khan
2ffd5034a6 treewide: mark various qca-nss modules as BROKEN
Several QCA NSS modules compile successfully but do not
function properly at runtime. This is due to either faulty
implementation or deliberate disabling of certain features in the NSS
firmware by Qualcomm.

Based on extensive testing with NSS firmware 11.4:
- Only 22 out of 64 dynamic interface types succeed in creation.
- All others return NACK, indicating lack of support or broken
  implementation.

Modules affected include DTLS, IPSEC, TLS, CAPWAP, GRE redirect paths,
VXLAN, CLMAP and more.

OpenVPN support is partially enabled on crypto core, but requires patching
userspace OpenVPN to function — outside scope here. Wireguard is preferred
as it already achieves line-rate performance without relying on NSS offload.

Marking these kernel packages as BROKEN to prevent false expectations
and discourage their use, though they're available should Qualcomm
ever release a firmware that supports them. (NOT GOING TO HAPPEN...)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-30 03:18:00 -04:00
Sean Khan
df691901d4 wwan: limit building to IPQ807x/IPQ50xx platforms
IPQ60xx platforms do not support `rmnet_nss`, so
limit to IPQ807x and IPQ50xx.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-29 23:54:20 -04:00
Sean Khan
17c99d8b48 nss-crypto: fix unnecessary build when not selected
Recent changes in nss-clients enabled unconditional evaluation
of the `qca-nss-drv-dtlsmgr` and `qca-nss-drv-tlsmgr` packages,
which always pulled in their dependencies, including `qca-nss-cfi`
and `qca-nss-crypto`, even if these packages were not selected.

This caused build failures due to missing symbols when the
required NSS crypto components were not enabled.

This commit updates the Makefiles for `qca-nss-crypto` and `qca-nss-cfi`
to ensure that their build and install steps are only executed
if the corresponding package is selected.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-29 21:02:17 -04:00
qosmio
9f0011aacd
Create config.yml
Signed-off-by: qosmio <datapronix@protonmail.com>
2025-04-29 03:40:41 -04:00
Sean Khan
19f0fefbeb nss-crypto: fix target dependency logic
"@" symbol implies "CONFIG_SOME_SYMBOL" whereas without implies
"CONFIG_PACKAGE_some-package". The later is what we want here since
nss-eip-firmware is a package.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-29 03:00:49 -04:00
Sean Khan
2b273dbbd8 (chore): add issues template 2025-04-29 02:24:17 -04:00
Sean Khan
0a07b0c6b0 nss-clients: tun6rd: partial revert of commit 7a0c508
commit 7a0c508 `treewide: rework handling platform specific features`
accidently set tun6rd and tlsmgr to 'y' vs. 'm' causing them to be built
if selected.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-28 11:48:16 -04:00
Sean Khan
43eaccf698 nss-crypto: only select nss-eip-firmware for IPQ807x/60xx
IPQ50xx does not have EIP hardware

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-28 00:18:55 -04:00
Sean Khan
7a0c508dec treewide: rework handling platform specific features
Overhaul the way platform-specific requirements are handled since
IPQ60xx and IPQ50xx don't support all the same features as IPQ807x.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-27 21:52:50 -04:00
Sean Khan
25bb2ac73b treewide: fix SHA hashes in Makefiles
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-27 13:55:38 -04:00
Sean Khan
062ae3a501 qca-mcs: fix header-guard error for gcc 15
GCC 15 has stricter checks for header macros where
mismatches between `#ifndef` and `#define` are flagged as errors.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-27 13:45:02 -04:00
Sean Khan
18a9e76182 nss-drv: backport 12.5 ipq50xx fixes
First attempt at backporting the 12.5 ipq50xx fixes to 11.4.

Fixes compilation errors, but not tested on hardware yet.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-26 03:30:21 -04:00
Sean Khan
709ddc324a nss-ecm: fix compilation undefined dev when tunipip6 is enabled
Resolves the following error

```
'dev' undeclared (first use in this function)
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-25 16:20:19 -04:00
Evgeniy Nikulov
6895d8bb10 nss-ecm: add ppp_generic dependencies (#44)
can`t compile qca-nss-ecm packages in case 'l2tp' I got issue that there is no ppp_generic package.

So, this change will fix building for l2tp case and will not broke pppoe case

EDIT: Fix whitespace
2025-04-25 16:18:53 -04:00
Sean Khan
bb4d4c9a25 nss-clients: [12.5] fix failure to apply 0030-fixup-compiler-errors patch
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-18 05:28:10 -04:00
Sean Khan
3584692072 nss-firmware: bugfix empty packages due to incorrect inheritance
The previous refactor (32dd47ec) attempted to use a common definition
block (`nss-firmware-common`) for package metadata and builds.
However, the way it was referenced (`$(nss-firmware-common)`) didn't
work for inheriting properties like TITLE, SECTION, CATEGORY, or
the install logic via `$(call ...)` within the sub-package definitions.

This resulted in the platform-specific packages
(`ipq807x`, `ipq60xx`, `ipq50xx`) being built without any firmwares
leading to empty `.ipk` files and failure to boot.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-18 02:29:23 -04:00
Sean Khan
a3692762e9 nss-clients: nss_match fix read/write procfs files
More fixes to read/write procfs files in nss_match.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-17 22:55:00 -04:00