Commit Graph

36 Commits

Author SHA1 Message Date
Sean Khan
baed4d5a9e nss-ecm: fix logic in rule addition
When using `nft insert rule` the rule is inserted on top of the
`forward_wan` chain, which bypasses any filtering in place. Instead,
append the rule to the end of the chain.

Other changes include renaming chain `RATE-LIMIT` to `ECM-RATE-LIMIT`
for better rule classification, and `shellformat` formatting.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 11:12:44 -04:00
Sean Khan
4c8e0ae9f2 nss-ecm: Skip bonding_masters interfaces
`lo` and `bonding_masters` interfaces are not managed by ethtool, so
should be skipped when disabling any interface features.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 11:09:04 -04:00
Sean Khan
cc45b20f63 treewide: remove excutable bit and apply on install
Files should really not stored as executable.

Only make them excutable on package installation.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 11:06:17 -04:00
Sean Khan
7d0fa17d0e qca-nss-ecm: Add fw4 check for bridge filter
iptables based bridge filtering is incompatible with nftables (fw4), and
causes just causes NAT loopback issues.

This is only required for systems using legacy iptables (fw3) as the
primary firewalling. nftables doesn't need explicit enablement of bridge filtering.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-02 20:20:10 -04:00
Sean Khan
2dbb426a29 qca-nss-ecm: bump latest 12.5 and fix fortify_memcpy_chk
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-02 20:18:13 -04:00
Sean Khan
1ae543092a treewide: Refactor for APK based builds
Update to comply with APK's `pkgver` format.

Rather than stick with the same convention as upstream `qca-ssdk` and
`qca-nss-dp` which uses:

```
$(PKG_NAME)-$(PKG_SOURCE_DATE)~$(PKG_SOURCE_VERSION)
```

i.e. `qca-ssdk-2024.06.13~c451136b.tar.zst`

Add in the QSDK version as part of the release since we
have options to build for both 11.4 and 12.5. This makes it easier to
debug build related issues, by knowing exactly which QSDK version is
being built against.

Example:
```
qca-nss-drv-11.4.0.5.2021.06.24~dc14ca2.tar.zst
qca-nss-drv-12.5.2024.04.06~53a0dc1.tar.zst
qca-nss-clients-11.4.0.5.2021.08.17~153998d.tar.zst
qca-nss-clients-12.5.2024.03.05~9a53b18.tar.zst
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-24 20:33:28 -04:00
Sean Khan
b00980f17b treewide: Bump to consolidated release QSDK-12.5
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-23 16:39:16 -04:00
Sean Khan
f5844d3706 qca-nss-ecm: Enable bridge vlan filtering
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-02 19:32:34 -04:00
Sean Khan
5f6afea20a nss-ecm: add missing uci option
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-05-05 12:47:59 -04:00
Sean Khan
9308d452f6 nss-packages: Bump to QSDK 12.5 for kernel 6.6
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>
2024-05-05 02:49:54 -04:00
Sean Khan
da8d2acc7a nss-ecm: fix uci config lookup 2024-05-01 14:38:38 -04:00
Sean Khan
1891a290e0 nss-ecm: switch to using named sections in uci
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>
2024-04-28 13:10:58 -04:00
Sean Khan
3ffec2d091 nss-ecm: workaround insmod issue
switch to using modprobe vs. insmod as it allows more versatility in
  dependency loading.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-04-25 05:17:18 -04:00
Qosmio
2075ebd759 nss-packages: update hashes for 'zst'
Signed-off-by: Qosmio <datapronix@protonmail.com>
2024-04-09 00:25:58 -04:00
Qosmio
c39093e475 qca-nss-ecm: parse and load mod depends
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`
2024-04-01 06:35:42 -04:00
Qosmio
486a2c1f34 qca-nss-ecm: use config_get_bool to avoid missing option errors 2024-03-26 12:28:40 -04:00
Qosmio
a681594860 nss-packages: add backwards compatible TARGET option ipq807x 2024-03-26 12:26:14 -04:00
Qosmio
54013375f5 qca-nss-ecm: add ethtool dependency
Enforce dependency as it is used by 'disable_offloads' script
2024-03-26 12:20:18 -04:00
Qosmio
78aedd1916 qca-nss-ecm: move MLO check internally
`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.
2024-03-24 21:59:48 -04:00
Qosmio
7e0e5abd8c qca-nss-ecm: refresh patches 2024-03-24 21:59:08 -04:00
Qosmio
1625586a6c qca-nss-ecm: remove ovs dependency 2024-03-19 12:03:52 -04:00
Qosmio
7e02d378bb qca-nss-ecm: bump version 12.4.5.r3 to 12.4.5.r5 2024-03-18 06:54:43 -04:00
Qosmio
9a2a123a47 qca-nss-ecm: fix incorrect else if statement 2024-03-17 01:40:36 -04:00
Qosmio
088f830466 qca-nss-ecm: refactor disable offload scripts 2024-03-15 19:34:39 -04:00
Qosmio
5900f254b9 qca-nss-ecm: Add IGS (ingress) QoS compile flag 2024-03-15 19:30:13 -04:00
Qosmio
8fb422e4d7 qca-nss-ecm: enable band steering
Useful for setups that have external APs to allow better handling when
switching between APs
2024-03-15 19:23:27 -04:00
Qosmio
e08d3c0607 qca-nss-ecm: rearrange order kernel version is checked 2024-03-15 19:18:10 -04:00
Qosmio
1431912bdb qca-nss-ecm: bump version 12.4.r4 to 12.4.5.r3
NOTE: QSDK 12.2, 12.4 are for kernel 5.4, starting with release 12.4.5
QSDK switched to kernel 6.1.
2024-03-15 19:16:15 -04:00
Qosmio
3fa6b5b7d4 qca-nss-ecm: remove backported 5.15 ipv6_dev_find_and_hold 2024-03-15 19:11:44 -04:00
Qosmio
40a48f512b qca-nss-ecm: make building ae example optional 2024-03-15 19:10:23 -04:00
Qosmio
837dd16342 Merge branch 'NSS-12.4-K6.1' of https://github.com/qosmio/nss-packages into NSS-12.4-K6.6 2024-03-15 02:13:56 -04:00
zxlhhyccc
399136a5ee
qca-nss-ecm:Fixed the problem that the route does not respond after startup. 2024-03-13 22:50:51 +08:00
Qosmio
8795d29dfb nss-packages: Initial support for kernel 6.6
WIP
2024-03-12 12:00:52 -04:00
Qosmio
9ab44ea39c nss-ecm: renumber patches 2024-03-12 02:07:53 -04:00
Qosmio
c7c8de990f nss-packages: refresh patches 2024-03-11 15:53:55 -04:00
Qosmio
8d54d726c2 Move non-upstream NSS packages back into repo
To keep fork as closely synced with upstream, move NSS packages back
into repository. Not sure why they were moved out from my original fork.
* nss-firmware
* qca-nss-crypto
* qca-nss-cfi

Removed the following:
* mhz (already available in packages repo)
* qrtr (unecessary, and has been broken for years)

Also moved packages out of `qca` and back into root directory.
2024-02-19 01:35:04 -05:00