Remove the $(NSS_ARCHIVE) variable that conflicts with building for
platforms other than IPQ807X. NSS_ARCHIVE is getting evaluated on very first
platform, rather than each platform.
This was primarily meant for externally hosted NSS firmware, but was mostly used internally.
Can be safely removed.
Reported-by: Shi Jiay (shi05275@gmail.com)
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Because of the way these modules will hook into the kernel certain
applications that use devcrypto will try to offload to it. This just
kernel panics and user confusion.
These modules are broken on IPQ807x and there has been no work upstream
to fix it in over 3 years. Luckily these modules aren't required to get
offloading for over 95% of use cases (mostly just affects
IPSec/OpenVPN).
Rather than removing, I'm disabling these modules from showing up
in default build options when "@BROKEN" isn't explicitly enabled.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
note: qca-nss-crypto, and qca-nss-cfi are non-code change releases, but
align with naming scheme upstream anyways.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
kernel 6.6.29 added an additional parameter to `br_pass_frame_up` (bool
promisc). Add a check for it and handle accordingly.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
The way ECM uci config is handled is pretty ugly due to it not specifying a
named section for 'general'.
Current:
```
➤ uci show ecm
ecm.global=ecm
ecm.global.acceleration_engine='nss'
ecm.@general[0]=general
ecm.@general[0].enable_bridge_filtering='0'
ecm.@general[0].disable_offloads='0'
ecm.@general[0].disable_flow_control='0'
ecm.@general[0].disable_interrupt_moderation='0'
ecm.@general[0].disable_gro='0'
```
None of the options require the use of unnamed sections
(like /etc/config/dhcp does when defining configs for multiple hosts)
With this change the config would produce:
```
ecm.global=ecm
ecm.global.acceleration_engine='nss'
ecm.general=ecm
ecm.general.enable_bridge_filtering='0'
ecm.general.disable_offloads='0'
ecm.general.disable_flow_control='0'
ecm.general.disable_interrupt_moderation='0'
ecm.general.disable_gro='0'
```
Which is a lot easier to read, and access programmatically.
We can also merge `global` and `general` into a single section as it
doesn't really make sense why we need global/general when it's
technically "ALL" globally applied.
For now, to ease users on the change, let's just stick to 2 sections.
**PLEASE NOTE: For users building their own images, and storing their**
**configs in 'files/etc/config/ecm' you will need to manually update the**
**config before compiling.**
For users using **sysupgrade** or installing without custom config at build
time 'files/etc/config/ecm' should be OK.
The following can be run manually on the config file 'ecm'
```sh
conf=/etc/config/ecm
uci -q show ecm.general || {
echo "Converting 'ECM' config to new format."
sed -i "s/config.*general.*/config ecm 'general'/g" "$conf"
}
```
Signed-off-by: Sean Khan <datapronix@protonmail.com>
1.) Rather than modify upstream `smp_affinity` script, move changes into
this init script.
Primarily: "xhci-hcd:usb1", "ppdu-end-interrupts-mac1", "ppdu-end-interrupts-mac2"
2.) Move logging into separate function, and better account for NSS core
specific output.
3.) Set the defaults for `enable_rps` and `enable_log` to true ('1').
4.) Change startup to sequence to `94` [after `smp_affinity` (93)]
Signed-off-by: Qosmio <datapronix@protonmail.com>
Using the previous version, not all nss related interrupts were being balanced across the available CPU cores.
This makes sure they are as well as moving a bit more off cpu0.
1.) Moved `set_affinity` function outside of `enable_rps`
2.) Added 2 new functions `bitmask_to_cpus` and `cpus_to_bitmask`
a.) bitmask_to_cpus - Takes a bitmask of CPUs and returns a
list of CPU numbers. (i.e. `bitmask_to_cpus "f"` -> 0,1,2,3)
b.) cpus_to_bitmask - Takes a comma/space or range list of CPUs and returns
a bitmask. (i.e. `cpus_to_bitmask "2,3"` -> c)
3.) Changed logic of `set_affinity` to now use physical CPUs rather than
knowing the bitmask. This should make it more straight forward when
testing changes
4.) Added an UCI option `enable_log` to enable/disable logging output to
`logger`. Default is `1` (on)
5.) Removed unused UCI options `nss_firmware *`
6.) Changed the way UCI options are retrieved to account for missing
options.
7.) Moved '/lib/debug/qca-nss-drv' to '/usr/bin/nss_stats' so it's in
$PATH and has a more intuitive name
Using the previous version, not all nss related interrupts were being balanced across the available CPU cores.
This makes sure they are as well as moving a bit more off cpu0.
Since many of ECM's module depends are dynamic and chosen at build time
`kmodloader` seems to have trouble properly loading its dependencies.
Attempt to parse ecm's module depends and load them prior to installing
the module.
This commit also replaces error prone `uci get` command with `config_get`,
in case certain options are missing from `/etc/config/ecm`
The following modules have been disabled for either being broken,
incompatible or abandoned by Qualcomm:
* profile
* capwapmgr
* dtlsmgr
* ipsecmgr
* tlsmgr
* mscs
* nssinfo (netlink + libnl-nss)
`is_mlo_device` is a check for whether a device is multi-link operation
capable, it is also geared towards WiFi 7 which is only supported on
IPQ95xx/53xx platforms with SFE. Since these patches are only focused on NSS,
rather than unecessarily patching the kernel, don't check if device is MLO capable.