From aba99bef053d85609511e36168cb3c377224995e Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Fri, 9 Aug 2024 19:55:44 -0400 Subject: [PATCH 1/2] 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 --- qca-nss-drv/Config.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qca-nss-drv/Config.in b/qca-nss-drv/Config.in index c6ec9bb..40b05ac 100644 --- a/qca-nss-drv/Config.in +++ b/qca-nss-drv/Config.in @@ -5,7 +5,7 @@ comment "Build Options" choice prompt "Memory Profile" - default NSS_MEM_PROFILE_MEDIUM + default NSS_MEM_PROFILE_HIGH help This option allows you to select the memory profile. It should correspond to the total RAM of your board. @@ -48,7 +48,7 @@ config NSS_DRV_CLMAP_ENABLE config NSS_DRV_CRYPTO_ENABLE bool - default y + default n prompt "Enable CRYPTO" config NSS_DRV_DTLS_ENABLE @@ -90,7 +90,7 @@ config NSS_DRV_IPV4_REASM_ENABLE config NSS_DRV_IPV6_ENABLE bool - default y + default n prompt "Enable IPV6" config NSS_DRV_IPV6_REASM_ENABLE @@ -146,7 +146,7 @@ config NSS_DRV_PPPOE_ENABLE config NSS_DRV_PPTP_ENABLE bool - default y + default n prompt "Enable PPTP" config NSS_DRV_PVXLAN_ENABLE @@ -217,7 +217,7 @@ config NSS_DRV_TUNIPIP6_ENABLE config NSS_DRV_VIRT_IF_ENABLE bool - default y + default n prompt "Enable VIRT_IF" config NSS_DRV_VLAN_ENABLE From aa57d9c4820559021f2b0d7db9496e28bf503058 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Wed, 18 Sep 2024 21:38:13 -0400 Subject: [PATCH 2/2] 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 --- qca-nss-ecm/Makefile | 6 +++++- .../patches/0018-ecm-compat-nss-12_2.patch | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 qca-nss-ecm/patches/0018-ecm-compat-nss-12_2.patch diff --git a/qca-nss-ecm/Makefile b/qca-nss-ecm/Makefile index 6114f91..3d1132d 100644 --- a/qca-nss-ecm/Makefile +++ b/qca-nss-ecm/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=qca-nss-ecm -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git PKG_SOURCE_PROTO:=git @@ -164,6 +164,10 @@ ifneq ($(CONFIG_PACKAGE_kmod-qmi_wwan_q),) ECM_MAKE_OPTS+=ECM_INTERFACE_RAWIP_ENABLE=y endif +ifneq ($(CONFIG_NSS_FIRMWARE_VERSION_12_5),) +EXTRA_CFLAGS+=-DNSS_FIRMWARE_VERSION_12_5 +endif + define Build/InstallDev mkdir -p $(1)/usr/include/qca-nss-ecm $(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm diff --git a/qca-nss-ecm/patches/0018-ecm-compat-nss-12_2.patch b/qca-nss-ecm/patches/0018-ecm-compat-nss-12_2.patch new file mode 100644 index 0000000..44c7d7e --- /dev/null +++ b/qca-nss-ecm/patches/0018-ecm-compat-nss-12_2.patch @@ -0,0 +1,20 @@ +--- a/frontends/nss/ecm_nss_non_ported_ipv4.c ++++ b/frontends/nss/ecm_nss_non_ported_ipv4.c +@@ -855,7 +855,7 @@ static void ecm_nss_non_ported_ipv4_conn + #endif + break; + case ECM_DB_IFACE_TYPE_RAWIP: +-#ifdef ECM_INTERFACE_RAWIP_ENABLE ++#if defined(NSS_FIRMWARE_VERSION_12_5) && defined(ECM_INTERFACE_RAWIP_ENABLE) + nircm->valid_flags |= NSS_IPV4_RULE_CREATE_RAWIP_VALID; + #else + rule_invalid = true; +@@ -1072,7 +1072,7 @@ static void ecm_nss_non_ported_ipv4_conn + #endif + break; + case ECM_DB_IFACE_TYPE_RAWIP: +-#ifdef ECM_INTERFACE_RAWIP_ENABLE ++#if defined(NSS_FIRMWARE_VERSION_12_5) && defined(ECM_INTERFACE_RAWIP_ENABLE) + nircm->valid_flags |= NSS_IPV4_RULE_CREATE_RAWIP_VALID; + #else + rule_invalid = true;