Commit Graph

307 Commits

Author SHA1 Message Date
breeze303
6b89673857 Merge remote-tracking branch 'qos/NSS-12.5-K6.x' into NSS-12.5-K6.x 2024-10-05 15:22:46 +08:00
Sean Khan
7dd1aff674 nss-drv: Display GRO Fraglist instead of GRO
Replace showing `gro` (Generic Recieve Offload) with
`rx-gro-list` (GRO Fraglist) as that is the more problematic
feature known to cause issues.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-05 00:16:26 -04:00
Sean Khan
c746083504 nss-ecm: Disable rx-gro-list by default
New option added to ecm config: `disable_gro_list`

This config option defaults to '1' (AKA disable rx-gro-list)
`rx-gro-list` is enabled by default in mainline OpenWrt, however it
is very bug prone, and causes various issues related to
UDP traffic (i.e DHCP, WireGuard, DNS, etc.)

This option is not explicitly required. If a user sets this to '0', a
warning will be shown in the logs everytime ECM is started.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-05 00:08:10 -04:00
breeze303
167e0f2b7c Merge remote-tracking branch 'qos/NSS-12.5-K6.x' into NSS-12.5-K6.x 2024-10-04 17:54:39 +08:00
Sean Khan
b217c08798 nss-drv: Add diagnostic gathering utility
This is meant to ease debugging when asking for support. Just run the
command "nss_diag" and include in your issues/forum posts.

Example of output
```
     MODEL: Linksys MX5300
   OPENWRT: r27608+169-3f98f68573
IPQ BRANCH: qualcommax-6.x-nss-mx4300-6.11
IPQ COMMIT: 2153dceb34
  IPQ DATE: 2024-10-03
    NSS FW: NSS.HK.11.4.0.5-6-R
  MAC80211: v6.11-0-g98f7e32f20d2
 ATH11K FW: WLAN.HK.2.12-01368-QCAHKSWPL_SILICONZ-1
       GRO: wan         : on
            br-lan      : on
            lan1        : on
            lan2        : on
            lan3        : on
            lan4        : on
            phy0-mesh0  : on
            phy1-ap0    : on
            phy2-ap0    : on

 NSS PKGS: kmod-qca-nss-cfi-cryptoapi - 6.6.53.12.5.2022.12.15~5cd07ce-r3
           kmod-qca-nss-crypto - 6.6.53.12.5.2022.12.15~3c5a574-r3
           kmod-qca-nss-dp - 6.6.53.2024.04.16~5bf8b91e-r1
           kmod-qca-nss-drv - 6.6.53.11.4.0.5.2021.09.13~53e5863-r13
           kmod-qca-nss-drv-bridge-mgr - 6.6.53.11.4.0.5.2021.08.17~c4049d1-r7
           kmod-qca-nss-drv-igs - 6.6.53.11.4.0.5.2021.08.17~c4049d1-r7
           kmod-qca-nss-drv-qdisc - 6.6.53.11.4.0.5.2021.08.17~c4049d1-r7
           kmod-qca-nss-drv-vlan-mgr - 6.6.53.11.4.0.5.2021.08.17~c4049d1-r7
           kmod-qca-nss-drv-wifi-meshmgr - 6.6.53.11.4.0.5.2021.08.17~c4049d1-r7
           kmod-qca-nss-ecm - 6.6.53.12.5.5.2024.09.02~bd5057b-r1
           nss-eip-firmware - 2.5.7-r3
           nss-firmware-default - 2024.08.04~794fe373-r1
           nss-firmware-ipq8074 - 2024.08.04~794fe373-r1
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-03 06:24:03 -04:00
breeze303
2b94eaf3ba Merge remote-tracking branch 'qos/NSS-12.5-K6.x' into NSS-12.5-K6.x 2024-09-27 21:10:50 +08:00
XT-Martinez
27c9b64b6a Add config for 4G cell ID locking 2024-09-26 10:54:28 -04:00
XT-Martinez
9d1be874b7 Fix indentions 2024-09-26 10:54:28 -04:00
XT-Martinez
6ac90d59c9 Make IP Multiplexing optional 2024-09-26 10:54:28 -04:00
XT-Martinez
28cc54ff77 Add config for PDN index, cleanup modem boot delay 2024-09-26 10:54:22 -04:00
XT-Martinez
01fe8de919 Add enough delay to wait for modem to boot 2024-09-26 10:49:38 -04:00
XT-Martinez
fc5b59c83a Added separate APN config for IPv6
- Added separate APN config for IPv6
- Added validation to ensure a different APN is used
2024-09-26 10:49:38 -04:00
XT-Martinez
1a6ba49959 Update quectel proto script to support dual-stack IP via QMAP multiplexing
Update quectel proto script to support dual-stack IP via QMAP multiplexing
2024-09-26 10:49:38 -04:00
Hikari
681d706908 Initial RMNET fixes (#31)
* wwan: Initial attempt at NSS offload

Initial attempt at getting NSS offload working with 4g/5g based
IPQ807x/50xx platforms.

I don't have a unit to test this on but everything seems to compile
after applying a few patches.

Ensure you are using the "NSS-12.5-K6.x-wwan" branch in your `feeds.conf`

```
src-git nss_packages https://github.com/qosmio/nss-packages.git;NSS-12.5-K6.x-wwan
```

Then install all packages
```
./scripts/feeds install -p nss_packages -a
```

Ensure you select the modules:
```
kmod-pcie_mhi
kmod-qmi_wwan_q
```

Work was derived from `https://github.com/coolsnowwolf/lede` and
`https://git.codelinaro.org/clo/qsdk/platform/vendor/qcom/opensource/qsdk/datarmnet`

Signed-off-by: Sean Khan <datapronix@protonmail.com>

* cleanup, initial commit

* Fix typos, mhi quectel connection mananger

* Fix invalid patch

* fix qmi_wwan_q patch

* fix qmi_wwan_q patch

* remove duplicate patch

---------

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Co-authored-by: Sean Khan <datapronix@protonmail.com>
Co-authored-by: Robin Reyes <hikari@pop-os.corephwebsolutions.com>
2024-09-26 10:36:08 -04:00
leideno
47cc754877
Update quectel.sh (#33) 2024-09-24 00:47:17 -04:00
Sean Khan
1af6cec02b nss-ecm: Refresh patches for 12.5.5
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 19:51:08 -04:00
Sean Khan
a7c763b2ce nss-crypto: add dependancy on nss-eip-firmware
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:47:33 -04:00
Sean Khan
24ae066757 nss-cfi: Fix crash on IPQ807x when utilizing NSS cores for crypto tasks
This commit addresses a crash that occurs when running crypto tasks on
IPQ807x devices explicitly utilizing the NSS cores. The crash was
reproducible in scenarios involving cryptographic operations offloaded
to the NSS cores (e.g., using cryptodev with OpenSSL or running the
crypto test module).

IMPORTANT: This fix should not be misunderstood as a general-purpose
performance boost for all cryptographic workloads. If your goal is to
accelerate AES encryption across the board (e.g., using OpenSSL for
routine file encryption), this approach is **not** practical.

The primary benefit of leveraging the NSS cores for cryptographic operations
is within VPN-oriented use cases, such as OpenVPN or IPsec, where the
offloading to NSS cores can reduce CPU load and improve throughput.

It’s critical to note that this fix will **not** accelerate encryption
for protocols like Wireguard. Wireguard’s design uses ChaCha20-Poly1305
rather than AES, and it cannot easily be offloaded to hardware.

Additionally, Wireguard uses short-lived cryptographic keys that rotate
frequently. This frequent key rotation makes it difficult to interface
with hardware offloading mechanisms, which are typically optimized for
long-lived sessions like those found in IPsec.

Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:45:58 -04:00
Sean Khan
46cd9e7707 nss-drv: Fix 'mesh_mesh' naming mesh stats
Cleans up mesh stats naming to remove 'mesh' from prefix as it's already
prefixed when displaying. Otherwise it shows up as 'mesh_mesh'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:31:13 -04:00
Sean Khan
2fcfece2b9 nss-drv: Add missing error code for wifili pkg.
Add missing error code between nss fw and nss drv.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:17:56 -04:00
Sean Khan
b8e019c373 nss-ecm: Bump version 12.5 to 12.5.5
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:14:01 -04:00
breeze303
ea2caa71e2 Merge remote-tracking branch 'qos/NSS-12.5-K6.x' into NSS-12.5-K6.x 2024-09-21 10:41:36 +08:00
Sean Khan
aa57d9c482 nss-ecm: compat with NSS FW < 12.5
NSS_IPV4_RULE_CREATE_RAWIP_VALID is only found in NSS FW 12.5 and
higher. Check if enabled before and macros for it.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-18 21:38:13 -04:00
breeze303
fc911e3920
Update Makefile 2024-09-03 12:54:55 +08:00
tiffany-929
721413093f add ipq50xx 2024-09-02 16:39:25 +08:00
Sean Khan
aba99bef05 nss-drv: let client and ecm choose driver features
Set all features to off, and let client/ecm automatically choose.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-09 19:55:44 -04:00
Sean Khan
23d5aaaf3f nss-drv: cleanup and refresh patches
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-09 01:42:04 -04:00
Sean Khan
0cf4f442e2 nss-drv: add boot wait
Ensures NSS cores are fully booted to hopefully workaround issues with
wifi stats (rx/tx rates) and inactive time.

Patch-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-09 01:40:40 -04:00
Sean Khan
c5340b8d58 qca-nss: Bump 11.4 FW to 11.4.0.5-6
This bumps NSS 11.4.0.5-5 to 11.4.0.5-6 along with the driver and client
packages.

This is the actual final release of 11.4.0.5 series. It brings in
changes related to mesh dummy paths and wifi.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-04 01:42:54 -04:00
Sean Khan
7a21a949cf treewide: Option to build for all NSS firmware
The idea that "newer" NSS firmware = "better" is not always true.
Especially given that 11.4 is the only firmware known to work with mesh,
among other issues like WDS/rmnet_nss being broken on 12.5 releases.

Add option to allow building for all known and available NSS firmwares.
The following are now supported NSS firmwares:

1.) 11.4.0.5-5
2.) 12.1
3.) 12.2
4.) 12.5

Users should start with 11.4 as that seems to be the one with the most
enabled features. It is now also the default version.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-30 14:33:50 -04:00
Sean Khan
9c1bd07946 treewide: Bump NSS FW 12.1 to 12.5
Switch to personal fork utilizing NSS fw binaries from dd-wrt repo:
`https://github.com/mirror/dd-wrt/tree/master/src/router/qca-nss/firmware`

Also delete patches that limited feature set to NSS firmware 12.1

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-22 16:51:11 -04:00
Sean Khan
0b71120ef6 nss-drv: move nss_empty_buf* to different cores
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-13 19:34:41 -04:00
Sean Khan
ae952634ca nss-drv: fix formatting of hotplug script
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-13 19:31:04 -04:00
Sean Khan
217a4fa43b nss-drv: add skb_recycler init script
This script is meant to set various skb_recycler settings. There is a
similar version in QSDK, but it's packaged in the main repo, rather than
an external package like 'qca-nss-drv'. To avoid making too many changes
in the main repo, introduce this script in `qca-nss-drv`.

This script will read the following config:

/etc/config/skb_recycler

```
config skb_recycler 'opt'
	option max_skbs '1024'
	option max_spare_skbs '256'
	option enable '1'
```

Users are encouraged to experiment disabling `skb_recycler` to see if
memory leaks are still occuring, especially on 512M boards. There are issues
currently where skb_recycler corrupts skbs during times of high traffic, but there
wasn't a way to completely disable it.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-13 18:43:52 -04:00
Sean Khan
4490b7a4a7 nss-drv: More FW 12.1 fixes
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 17:36:42 -04:00
Sean Khan
6f2520cf6f nss-ecm: Fix syntax error in firewall rule
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 15:27:35 -04:00
Sean Khan
4a9f247f40 nss-ecm: remove NSS_IPV4_RULE_CREATE_RAWIP_VALID
`NSS_IPV4_RULE_CREATE_RAWIP_VALID` is only available in NSS FW
version 12.5, which is not publically availiable.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 15:05:06 -04:00
Robin Reyes
7479cee639 remove duplicate patch 2024-07-10 14:34:13 -04:00
Robin Reyes
24dc2b18e7 fix qmi_wwan_q patch 2024-07-10 14:34:13 -04:00
Robin Reyes
b590f1a50a fix qmi_wwan_q patch 2024-07-10 14:34:13 -04:00
Robin Reyes
4c5c6479bd Fix invalid patch 2024-07-10 14:34:13 -04:00
Robin Reyes
49611b5e88 Fix typos, mhi quectel connection mananger 2024-07-10 14:34:13 -04:00
Robin Reyes
0c0f106c6b cleanup, initial commit 2024-07-10 14:34:13 -04:00
Sean Khan
4b1cb1d940 wwan: Initial attempt at NSS offload
Initial attempt at getting NSS offload working with 4g/5g based
IPQ807x/50xx platforms.

I don't have a unit to test this on but everything seems to compile
after applying a few patches.

Ensure you are using the "NSS-12.5-K6.x-wwan" branch in your `feeds.conf`

```
src-git nss_packages https://github.com/qosmio/nss-packages.git;NSS-12.5-K6.x-wwan
```

Then install all packages
```
./scripts/feeds install -p nss_packages -a
```

Ensure you select the modules:
```
kmod-pcie_mhi
kmod-qmi_wwan_q
```

Work was derived from `https://github.com/coolsnowwolf/lede` and
`https://git.codelinaro.org/clo/qsdk/platform/vendor/qcom/opensource/qsdk/datarmnet`

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 14:34:13 -04:00
Sean Khan
1af951126c nss-drv: limit headers to fw 12.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 13:50:58 -04:00
Sean Khan
3af307f2e9 nss-drv: fix exports and split backports patch
* Cleaned up backports patch to only bring in header changes if they are
  not tied directly to NSS firmware API. Because the API for NSS
  firmware has strict structure and ordering, it ends up messing with
  driver calls.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 13:13:24 -04:00
Sean Khan
872487e55d nss-clients: fix tun6rd and tunipip build
These were accidently configured as 'y' when it was supposed to be 'm'

Should resolve the following build errors:

```
qca-nss-tun6rd.ko' is missing.
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 12:21:52 -04:00
Sean Khan
78364afce8 nss-drv: Clean-up unecessary patches
`0012-Makefile-modularize-driver.patch` mistakenly added 'wifi_mesh_init'
when it was already in 'nss_init.c'.

The patch following `0013-backport-12.4.patch` would then
clean up the "duplicated" entries.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 04:53:52 -04:00
Sean Khan
841d43b00f treewide: various patches for GCC-14 + build fixes
Also disabled pvxlanmgr and clmapmgr from showing up. It's badly broken
and not suported.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 21:03:51 -04:00
Sean Khan
76047d6637 nss-drv: extract and display nss firmware version
Added a custom function to show NSS firmware version during boot.

```
[Mon Jul  8 07:45:21 2024] qca-nss 39000000.nss: NSS FW Version: NSS.FW.12.1-022-HK.R
```

And

```
[Mon Jul  8 07:21:12 2024] qca-nss 39000000.nss: NSS FW Version: NSS.HK.11.4.0.5-5-R
```

Not sure why Qualcomm never included this ability in their drivers, since
it's clearly there in every firmware.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 11:19:16 -04:00