Update and minor fixes for QCA-NSS drivers.

Currently working and tested modules:

nss-ifb
qca-nss-drv
qca-nss-drv-igs (new)
qca-nss-drv-pppoe
qca-nss-drv-qdisc
qca-nss-drv-tun6rd (new)
qca-nss-drv-tunipip6 (new)
qca-nss-gmac
qca-nss-ecm-standard
qca-mcs
This commit is contained in:
SqTER-PL
2025-03-05 19:03:24 +01:00
committed by Lucas Asvio
parent 21b3787542
commit 54d727d610
8 changed files with 26492 additions and 38223 deletions

View File

@@ -1,4 +1,4 @@
# NHSS.QSDK.12.2
# NHSS.QSDK 11.2 - 12.2
# by SqTER
include $(TOPDIR)/rules.mk
@@ -7,10 +7,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qca-nss-clients
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-clients.git
PKG_SOURCE_DATE:=2023-06-01
PKG_SOURCE_DATE:=2020-10-29
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4cc5d7687c69ef1fbc53d5492d9d672d2d8ef030
PKG_MIRROR_HASH:=cc1904bd90a0fc137b114b3232245c973e84068ea52caeaac66c49d958739a4e
PKG_SOURCE_VERSION:=ef082a735fad96bd2f6f59b94d6ea81defc4796e
PKG_MIRROR_HASH:=9375f2bbdd17826b6ddebc77607ec73c98626570243a9831a1e34e1051eb436c
PKG_BUILD_DEPENDS:=qca-nss-drv
PKG_BUILD_PARALLEL:=1
@@ -108,7 +108,7 @@ define KernelPackage/qca-nss-drv-tunipip6
TITLE:=Kernel driver for NSS (connection manager) - DS-lite and ipip6 Tunnel
DEPENDS:=+@NSS_DRV_TUNIPIP6_ENABLE +kmod-iptunnel6 +kmod-ip6-tunnel \
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
FILES:=$(PKG_BUILD_DIR)/qca-nss-tunipip6.ko
FILES:=$(PKG_BUILD_DIR)/tunipip6/qca-nss-tunipip6.ko
AUTOLOAD:=$(call AutoLoad,60,qca-nss-tunipip6)
endef
@@ -210,7 +210,7 @@ define KernelPackage/qca-nss-drv-igs
SUBMENU:=Network Devices
TITLE:=Action for offloading traffic to an IFB interface to perform ingress shaping.
DEPENDS:=@TARGET_ipq806x||TARGET_ipq_ipq807x||TARGET_ipq_ipq807x_64||TARGET_ipq_ipq60xx||TARGET_ipq_ipq60xx_64||TARGET_ipq_ipq50xx||TARGET_ipq_ipq50xx_64 \
+@NSS_DRV_IGS_ENABLE +kmod-sched-core +kmod-ifb +kmod-qca-nss-drv-qdisc \
+@NSS_DRV_IGS_ENABLE +kmod-sched-core +kmod-nf-conntrack +kmod-ifb +kmod-qca-nss-drv-qdisc \
+PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv
FILES:=$(PKG_BUILD_DIR)/nss_qdisc/igs/act_nssmirred.ko
endef
@@ -467,11 +467,7 @@ endif
# endif
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(MAKE_OPTS)) \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
$(KERNEL_MAKE_FLAGS) \
$(PKG_MAKE_FLAGS) \
$(KERNEL_MAKE) $(strip $(MAKE_OPTS)) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
SoC="$(subtarget)" \

View File

@@ -1,4 +1,4 @@
# NHSS.QSDK.12.2
# NHSS.QSDK 11.2 - 12.2
# by SqTER
include $(TOPDIR)/rules.mk
@@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-drv.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-06-01
PKG_SOURCE_VERSION:=fe0bc6b077b842d13a06053271115bb9b3dcc505
PKG_MIRROR_HASH:=1011fb113ba40d7919c0718d055ae6be8600fc8e02c1472f7425b7da47372a8a
PKG_SOURCE_DATE:=2020-03-20
PKG_SOURCE_VERSION:=3cfb9f43
PKG_MIRROR_HASH:=37d268b4712db049df3780ce298abe0456f6478a9ec2504eb303a6f10e03c818
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:= \
@@ -260,12 +260,9 @@ define Build/Configure
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(DRV_MAKE_OPTS)) \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
$(KERNEL_MAKE) $(strip $(DRV_MAKE_OPTS)) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC=$(SOC) \
$(KERNEL_MAKE_FLAGS) \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \
modules
endef

View File

@@ -1,6 +1,6 @@
--- a/nss_c2c_tx.c
+++ b/nss_c2c_tx.c
@@ -334,6 +334,7 @@ static struct ctl_table nss_c2c_tx_table
@@ -331,6 +331,7 @@ static struct ctl_table nss_c2c_tx_table
{ }
};
@@ -8,7 +8,7 @@
static struct ctl_table nss_c2c_tx_dir[] = {
{
.procname = "c2c_tx",
@@ -360,6 +361,7 @@ static struct ctl_table nss_c2c_tx_root[
@@ -357,6 +358,7 @@ static struct ctl_table nss_c2c_tx_root[
},
{ }
};
@@ -16,7 +16,7 @@
static struct ctl_table_header *nss_c2c_tx_header;
@@ -378,7 +380,11 @@ void nss_c2c_tx_register_sysctl(void)
@@ -375,7 +377,11 @@ void nss_c2c_tx_register_sysctl(void)
/*
* Register sysctl table.
*/
@@ -94,20 +94,6 @@
return 0;
}
--- a/nss_hal/ipq50xx/nss_hal_pvt.c
+++ b/nss_hal/ipq50xx/nss_hal_pvt.c
@@ -598,7 +598,11 @@ static int __nss_hal_request_irq(struct
return err;
}
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(6, 1, 0))
+ netif_napi_add_weight(&nss_ctx->napi_ndev, &int_ctx->napi, napi_poll_cb, napi_wgt);
+#else
netif_napi_add(&nss_ctx->napi_ndev, &int_ctx->napi, napi_poll_cb, napi_wgt);
+#endif
int_ctx->cause = cause;
err = request_irq(irq, nss_hal_handle_irq, 0, irq_name, int_ctx);
if (err) {
--- a/nss_hal/ipq60xx/nss_hal_pvt.c
+++ b/nss_hal/ipq60xx/nss_hal_pvt.c
@@ -614,62 +614,102 @@ static int __nss_hal_request_irq(struct
@@ -460,7 +446,7 @@
/*
--- a/nss_n2h.c
+++ b/nss_n2h.c
@@ -1862,6 +1862,7 @@ static struct ctl_table nss_n2h_table_mu
@@ -1859,6 +1859,7 @@ static struct ctl_table nss_n2h_table_mu
{ }
};
@@ -468,7 +454,7 @@
/*
* This table will be overwritten during single-core registration
*/
@@ -1891,6 +1892,7 @@ static struct ctl_table nss_n2h_root[] =
@@ -1888,6 +1889,7 @@ static struct ctl_table nss_n2h_root[] =
},
{ }
};
@@ -476,7 +462,7 @@
static struct ctl_table_header *nss_n2h_header;
@@ -2133,8 +2135,12 @@ void nss_n2h_single_core_register_sysctl
@@ -2131,8 +2133,12 @@ void nss_n2h_single_core_register_sysctl
/*
* Register sysctl table.
*/
@@ -489,7 +475,7 @@
}
/*
@@ -2232,7 +2238,11 @@ void nss_n2h_multi_core_register_sysctl(
@@ -2230,7 +2236,11 @@ void nss_n2h_multi_core_register_sysctl(
/*
* Register sysctl table.
*/

View File

@@ -1,6 +1,6 @@
--- a/nss_dynamic_interface.c
+++ b/nss_dynamic_interface.c
@@ -226,7 +226,7 @@ int nss_dynamic_interface_alloc_node(enu
@@ -223,7 +223,7 @@ int nss_dynamic_interface_alloc_node(enu
core_id = nss_top_main.dynamic_interface_table[type];
nss_ctx = (struct nss_ctx_instance *)&nss_top_main.nss[core_id];
di_data.if_num = -1;
@@ -9,7 +9,7 @@
init_completion(&di_data.complete);
nss_dynamic_interface_msg_init(&ndim, NSS_DYNAMIC_INTERFACE, NSS_DYNAMIC_INTERFACE_ALLOC_NODE,
@@ -285,7 +285,7 @@ nss_tx_status_t nss_dynamic_interface_de
@@ -282,7 +282,7 @@ nss_tx_status_t nss_dynamic_interface_de
core_id = nss_top_main.dynamic_interface_table[type];
nss_ctx = (struct nss_ctx_instance *)&nss_top_main.nss[core_id];
@@ -50,7 +50,7 @@
EXPORT_SYMBOL(nss_lag_tx_slave_state);
--- a/nss_n2h.c
+++ b/nss_n2h.c
@@ -1153,16 +1153,16 @@ static nss_tx_status_t nss_n2h_mitigatio
@@ -1150,16 +1150,16 @@ static nss_tx_status_t nss_n2h_mitigatio
/*
* ACK/NACK received from NSS FW
*/
@@ -70,7 +70,7 @@
}
static inline void nss_n2h_buf_pool_free(struct nss_n2h_buf_pool *buf_pool)
@@ -1234,7 +1234,7 @@ static nss_tx_status_t nss_n2h_buf_pool_
@@ -1231,7 +1231,7 @@ static nss_tx_status_t nss_n2h_buf_pool_
/*
* ACK/NACK received from NSS FW
*/
@@ -79,7 +79,7 @@
nss_n2h_buf_pool_free(buf_pool);
goto failure;
@@ -1243,10 +1243,10 @@ static nss_tx_status_t nss_n2h_buf_pool_
@@ -1240,10 +1240,10 @@ static nss_tx_status_t nss_n2h_buf_pool_
up(&nss_n2h_bufcp[core_num].sem);
} while(num_pages);
@@ -92,7 +92,7 @@
}
/*
@@ -1545,7 +1545,7 @@ static nss_tx_status_t nss_n2h_host_bp_c
@@ -1542,7 +1542,7 @@ static nss_tx_status_t nss_n2h_host_bp_c
if (nss_tx_status != NSS_TX_SUCCESS) {
nss_warning("%px: nss_tx error setting back pressure\n", nss_ctx);
up(&nss_n2h_host_bp_cfg_pvt.sem);
@@ -101,7 +101,7 @@
}
/*
@@ -1555,7 +1555,7 @@ static nss_tx_status_t nss_n2h_host_bp_c
@@ -1552,7 +1552,7 @@ static nss_tx_status_t nss_n2h_host_bp_c
if (ret == 0) {
nss_warning("%px: Waiting for ack timed out\n", nss_ctx);
up(&nss_n2h_host_bp_cfg_pvt.sem);
@@ -110,7 +110,7 @@
}
/*
@@ -1563,11 +1563,11 @@ static nss_tx_status_t nss_n2h_host_bp_c
@@ -1560,11 +1560,11 @@ static nss_tx_status_t nss_n2h_host_bp_c
*/
if (nss_n2h_host_bp_cfg_pvt.response == NSS_FAILURE) {
up(&nss_n2h_host_bp_cfg_pvt.sem);

View File

@@ -1,4 +1,4 @@
# NHSS.QSDK.12.4.5.r2
# NHSS.QSDK.11.2 - 12.4.5.r2
# by SqTER
include $(TOPDIR)/rules.mk
@@ -317,9 +317,7 @@ define Build/InstallDev
endef
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" $(strip $(ECM_MAKE_OPTS)) \
$(KERNEL_MAKE_FLAGS) \
$(PKG_MAKE_FLAGS) \
$(KERNEL_MAKE) $(strip $(ECM_MAKE_OPTS)) \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(subtarget)" \
EXAMPLES_BUILD_PCC="$(CONFIG_QCA_NSS_ECM_EXAMPLES_PCC)" \

View File

@@ -11,7 +11,7 @@ PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-gmac.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2023-06-01
PKG_SOURCE_VERSION:=171767947467662f2407d0cfff26dfb136c3fb4a
PKG_MIRROR_HASH:=3c59139b20bc607f71e8a20e14ea63e6520b2f321347cfa7b3532c15120c9947
PKG_MIRROR_HASH:=21f8a0ce6672f9dfae9eca6490b19e49cfc51f6fdc5ba48db28c20a92af81822
include $(INCLUDE_DIR)/package.mk
@@ -40,9 +40,8 @@ EXTRA_CFLAGS+= \
-I$(PKG_BUILD_DIR)/nss_hal/$(BOARD)
define Build/Compile
$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
$(KERNEL_MAKE_FLAGS) \
$(PKG_MAKE_FLAGS) \
$(KERNEL_MAKE) \
SUBDIRS="$(PKG_BUILD_DIR)" \
M="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
modules