diff --git a/qca-nss-clients/Makefile b/qca-nss-clients/Makefile index f6c191f..ba62de2 100644 --- a/qca-nss-clients/Makefile +++ b/qca-nss-clients/Makefile @@ -749,7 +749,7 @@ define Build/Compile CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS) -Wno-enum-conversion" \ DTLSMGR_DIR="$(DTLSMGR_DIR)" \ IPSECMGR_DIR="$(IPSECMGR_DIR)" \ SoC=$(SOC) \ diff --git a/qca-nss-clients/patches/0025-nss-clients-add-kernel-6.6-support.patch b/qca-nss-clients/patches/0025-nss-clients-add-kernel-6.6-support.patch new file mode 100644 index 0000000..07d7ff5 --- /dev/null +++ b/qca-nss-clients/patches/0025-nss-clients-add-kernel-6.6-support.patch @@ -0,0 +1,65 @@ +--- a/bridge/nss_bridge_mgr.c ++++ b/bridge/nss_bridge_mgr.c +@@ -1369,7 +1369,6 @@ static struct notifier_block nss_bridge_ + .notifier_call = nss_bridge_mgr_netdevice_event, + }; + +-#if defined(NSS_BRIDGE_MGR_PPE_SUPPORT) + /* + * nss_bridge_mgr_is_physical_dev() + * Check if the device is on physical device. +@@ -1598,25 +1597,6 @@ static struct ctl_table nss_bridge_mgr_t + { } + }; + +-static struct ctl_table nss_bridge_mgr_dir[] = { +- { +- .procname = "bridge_mgr", +- .mode = 0555, +- .child = nss_bridge_mgr_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_bridge_mgr_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_bridge_mgr_dir, +- }, +- { } +-}; +-#endif +- + /* + * nss_bridge_mgr_init_module() + * bridge_mgr module init function +@@ -1636,7 +1616,7 @@ int __init nss_bridge_mgr_init_module(vo + #if defined(NSS_BRIDGE_MGR_PPE_SUPPORT) + br_mgr_ctx.wan_if_num = -1; + br_fdb_update_register_notify(&nss_bridge_mgr_fdb_update_notifier); +- br_mgr_ctx.nss_bridge_mgr_header = register_sysctl_table(nss_bridge_mgr_root_dir); ++ br_mgr_ctx.nss_bridge_mgr_header = register_sysctl("nss/bridge_mgr", nss_bridge_mgr_table); + + /* + * Enable ACL rule to enable L2 exception. This is needed if PPE Virtual ports is added to bridge. +--- a/gre/nss_connmgr_gre.c ++++ b/gre/nss_connmgr_gre.c +@@ -277,7 +277,7 @@ static struct rtnl_link_stats64 *nss_con + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)) + start = u64_stats_fetch_begin_bh(&tstats->syncp); + #else +- start = u64_stats_fetch_begin_irq(&tstats->syncp); ++ start = u64_stats_fetch_begin(&tstats->syncp); + #endif + rx_packets = u64_stats_read(&tstats->rx_packets); + tx_packets = u64_stats_read(&tstats->tx_packets); +@@ -286,7 +286,7 @@ static struct rtnl_link_stats64 *nss_con + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)) + } while (u64_stats_fetch_retry_bh(&tstats->syncp, start)); + #else +- } while (u64_stats_fetch_retry_irq(&tstats->syncp, start)); ++ } while (u64_stats_fetch_retry(&tstats->syncp, start)); + #endif + + tot->rx_packets += rx_packets; diff --git a/qca-nss-drv/Makefile b/qca-nss-drv/Makefile index 9297ea6..3f81aa7 100644 --- a/qca-nss-drv/Makefile +++ b/qca-nss-drv/Makefile @@ -122,7 +122,7 @@ endef EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-dp \ -I$(STAGING_DIR)/usr/include/qca-ssdk \ - -Wno-unused-variable + -Wno-unused-variable -Wno-enum-conversion ifdef CONFIG_NSS_MEM_PROFILE_MEDIUM EXTRA_CFLAGS += -DNSS_MEM_PROFILE_MEDIUM diff --git a/qca-nss-drv/patches/0011-nss-drv-remove-gmac-stat.patch b/qca-nss-drv/patches/0011-nss-drv-gmac-only-for-ipq806x.patch similarity index 55% rename from qca-nss-drv/patches/0011-nss-drv-remove-gmac-stat.patch rename to qca-nss-drv/patches/0011-nss-drv-gmac-only-for-ipq806x.patch index fceebae..32e14b5 100644 --- a/qca-nss-drv/patches/0011-nss-drv-remove-gmac-stat.patch +++ b/qca-nss-drv/patches/0011-nss-drv-gmac-only-for-ipq806x.patch @@ -26,3 +26,23 @@ /* * Per-project stats +--- a/Makefile ++++ b/Makefile +@@ -40,7 +40,6 @@ qca-nss-drv-objs += nss_hal/nss_hal.o + + ifneq "$(NSS_DRV_POINT_OFFLOAD)" "y" + qca-nss-drv-objs += \ +- nss_gmac_stats.o \ + nss_if.o \ + nss_if_log.o \ + nss_phys_if.o \ +@@ -381,7 +380,8 @@ endif + + ifeq ($(SoC),$(filter $(SoC),ipq806x)) + qca-nss-drv-objs += nss_data_plane/nss_data_plane_gmac.o \ +- nss_hal/ipq806x/nss_hal_pvt.o ++ nss_hal/ipq806x/nss_hal_pvt.o \ ++ nss_gmac_stats.o \ + + ifneq "$(NSS_DRV_C2C_ENABLE)" "n" + ccflags-y += -DNSS_DRV_C2C_ENABLE diff --git a/qca-nss-drv/patches/0016-nss-drv-add-support-for-kernel-6.6.patch b/qca-nss-drv/patches/0016-nss-drv-add-support-for-kernel-6.6.patch new file mode 100644 index 0000000..53b0314 --- /dev/null +++ b/qca-nss-drv/patches/0016-nss-drv-add-support-for-kernel-6.6.patch @@ -0,0 +1,619 @@ +--- a/nss_core.c ++++ b/nss_core.c +@@ -65,7 +65,7 @@ + (((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)))) || \ + (((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)))) || \ + (((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)))) || \ +-(((LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)))))) ++(((LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)))))) + #error "Check skb recycle code in this file to match Linux version" + #endif + +--- a/nss_dynamic_interface.c ++++ b/nss_dynamic_interface.c +@@ -226,7 +226,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; +- di_data.response = false; ++ di_data.response = -1; + 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 + + core_id = nss_top_main.dynamic_interface_table[type]; + nss_ctx = (struct nss_ctx_instance *)&nss_top_main.nss[core_id]; +- di_data.response = false; ++ di_data.response = -1; + init_completion(&di_data.complete); + + if (nss_is_dynamic_interface(if_num) == false) { +--- a/nss_init.c ++++ b/nss_init.c +@@ -592,48 +592,12 @@ static struct ctl_table nss_general_tabl + { } + }; + +-static struct ctl_table nss_init_dir[] = { +-#if (NSS_FREQ_SCALE_SUPPORT == 1) +- { +- .procname = "clock", +- .mode = 0555, +- .child = nss_freq_table, +- }, +-#endif +- { +- .procname = "general", +- .mode = 0555, +- .child = nss_general_table, +- }, +-#if (NSS_SKB_REUSE_SUPPORT == 1) +- { +- .procname = "skb_reuse", +- .mode = 0555, +- .child = nss_skb_reuse_table, +- }, +-#endif +- { } +-}; +- +-static struct ctl_table nss_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_init_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_root_dir, +- }, +- { } +-}; +- +-static struct ctl_table_header *nss_dev_header; ++static struct ctl_table_header *nss_clock_header; ++static struct ctl_table_header *nss_skb_header; ++static struct ctl_table_header *nss_general_header; ++static struct ctl_table *nss_clock_table; ++static struct ctl_table *nss_skb_reuse_tabl; ++static struct ctl_table *nss_general_tabl; + + /* + * nss_init() +@@ -785,7 +749,16 @@ nss_info("Init NSS driver"); + /* + * Register sysctl table. + */ +- nss_dev_header = register_sysctl_table(nss_root); ++ // to avoid multiple calls to `register_sysctl_table` ++ nss_general_header = register_sysctl("dev/nss/general", nss_general_table); ++ ++#if (NSS_SKB_REUSE_SUPPORT == 1) ++ nss_skb_header = register_sysctl("dev/nss/skb_reuse", nss_skb_reuse_table); ++#endif ++ ++#if (NSS_FREQ_SCALE_SUPPORT == 1) ++ nss_clock_header = register_sysctl("dev/nss/clock", nss_freq_table); ++#endif + + /* + * Registering sysctl for ipv4/6 specific config. +@@ -948,8 +921,18 @@ static void __exit nss_cleanup(void) + { + nss_info("Exit NSS driver"); + +- if (nss_dev_header) +- unregister_sysctl_table(nss_dev_header); ++ if (nss_general_header) ++ unregister_sysctl_table(nss_general_header); ++ ++#if (NSS_SKB_REUSE_SUPPORT == 1) ++ if (nss_skb_header) ++ unregister_sysctl_table(nss_skb_header); ++#endif ++ ++#if (NSS_FREQ_SCALE_SUPPORT == 1) ++ if (nss_clock_header) ++ unregister_sysctl_table(nss_clock_header); ++#endif + + /* + * Unregister n2h specific sysctl +--- a/nss_project.c ++++ b/nss_project.c +@@ -333,33 +333,6 @@ static struct ctl_table nss_project_tabl + { } + }; + +-static struct ctl_table nss_project_dir[] = { +- { +- .procname = "project", +- .mode = 0555, +- .child = nss_project_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_project_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_project_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_project_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_project_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_project_header; + + /* +@@ -368,7 +341,7 @@ static struct ctl_table_header *nss_proj + */ + void nss_project_register_sysctl(void) + { +- nss_project_header = register_sysctl_table(nss_project_root); ++ nss_project_header = register_sysctl("dev/nss/project", nss_project_table); + } + + /* +--- a/nss_n2h.c ++++ b/nss_n2h.c +@@ -1904,36 +1904,6 @@ static struct ctl_table nss_n2h_table_mu + { } + }; + +-/* +- * This table will be overwritten during single-core registration +- */ +-static struct ctl_table nss_n2h_dir[] = { +- { +- .procname = "n2hcfg", +- .mode = 0555, +- .child = nss_n2h_table_multi_core, +- }, +- { } +-}; +- +-static struct ctl_table nss_n2h_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_n2h_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_n2h_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_n2h_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_n2h_header; + + /* +@@ -2282,8 +2252,7 @@ void nss_n2h_single_core_register_sysctl + /* + * Register sysctl table. + */ +- nss_n2h_dir[0].child = nss_n2h_table_single_core; +- nss_n2h_header = register_sysctl_table(nss_n2h_root); ++ nss_n2h_header = register_sysctl("dev/nss/n2hcfg", nss_n2h_table_single_core); + } + + /* +@@ -2381,7 +2350,7 @@ void nss_n2h_multi_core_register_sysctl( + /* + * Register sysctl table. + */ +- nss_n2h_header = register_sysctl_table(nss_n2h_root); ++ nss_n2h_header = register_sysctl("dev/nss/n2hcfg", nss_n2h_table_multi_core); + } + + /* +--- a/nss_ppe_vp.c ++++ b/nss_ppe_vp.c +@@ -783,24 +783,6 @@ static struct ctl_table nss_ppe_vp_table + { } + }; + +-static struct ctl_table nss_ppe_vp_dir[] = { +- { +- .procname = "ppe_vp", +- .mode = 0555, +- .child = nss_ppe_vp_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_ppe_vp_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_ppe_vp_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_ppe_vp_procfs_header; + + /* +@@ -812,7 +794,7 @@ void nss_ppe_vp_procfs_register(void) + /* + * Register sysctl table. + */ +- nss_ppe_vp_procfs_header = register_sysctl_table(nss_ppe_vp_root_dir); ++ nss_ppe_vp_procfs_header = register_sysctl("dev/nss/ppe_vp", nss_ppe_vp_table); + } + + /* +--- a/nss_pppoe.c ++++ b/nss_pppoe.c +@@ -353,33 +353,6 @@ static struct ctl_table nss_pppoe_table[ + { } + }; + +-static struct ctl_table nss_pppoe_dir[] = { +- { +- .procname = "pppoe", +- .mode = 0555, +- .child = nss_pppoe_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_pppoe_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_pppoe_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_pppoe_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_pppoe_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_pppoe_header; + + /* +@@ -391,7 +364,7 @@ void nss_pppoe_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_pppoe_header = register_sysctl_table(nss_pppoe_root); ++ nss_pppoe_header = register_sysctl("dev/nss/pppoe", nss_pppoe_table); + } + + /* +--- a/nss_rps.c ++++ b/nss_rps.c +@@ -577,33 +577,6 @@ static struct ctl_table nss_rps_table[] + { } + }; + +-static struct ctl_table nss_rps_dir[] = { +- { +- .procname = "rps", +- .mode = 0555, +- .child = nss_rps_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_rps_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_rps_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_rps_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_rps_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_rps_header; + + /* +@@ -640,7 +613,7 @@ void nss_rps_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_rps_header = register_sysctl_table(nss_rps_root); ++ nss_rps_header = register_sysctl("dev/nss/rps", nss_rps_table); + } + + /* +--- a/nss_stats.c ++++ b/nss_stats.c +@@ -88,32 +88,6 @@ static struct ctl_table nss_stats_table[ + { } + }; + +-static struct ctl_table nss_stats_dir[] = { +- { +- .procname = "stats", +- .mode = 0555, +- .child = nss_stats_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_stats_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_stats_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_stats_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_stats_root_dir, +- }, +- { } +-}; + static struct ctl_table_header *nss_stats_header; + + /* +@@ -125,7 +99,7 @@ void nss_stats_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_stats_header = register_sysctl_table(nss_stats_root); ++ nss_stats_header = register_sysctl("dev/nss/stats", nss_stats_table); + } + + /* +--- a/nss_c2c_tx.c ++++ b/nss_c2c_tx.c +@@ -334,33 +334,6 @@ static struct ctl_table nss_c2c_tx_table + { } + }; + +-static struct ctl_table nss_c2c_tx_dir[] = { +- { +- .procname = "c2c_tx", +- .mode = 0555, +- .child = nss_c2c_tx_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_c2c_tx_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_c2c_tx_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_c2c_tx_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_c2c_tx_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_c2c_tx_header; + + /* +@@ -378,7 +351,7 @@ void nss_c2c_tx_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_c2c_tx_header = register_sysctl_table(nss_c2c_tx_root); ++ nss_c2c_tx_header = register_sysctl("dev/nss/c2c_tx", nss_c2c_tx_table); + } + + /* +--- a/nss_dma.c ++++ b/nss_dma.c +@@ -378,33 +378,6 @@ static struct ctl_table nss_dma_table[] + { } + }; + +-static struct ctl_table nss_dma_dir[] = { +- { +- .procname = "dma", +- .mode = 0555, +- .child = nss_dma_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_dma_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_dma_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_dma_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_dma_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_dma_header; + + /* +@@ -422,7 +395,7 @@ void nss_dma_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_dma_header = register_sysctl_table(nss_dma_root); ++ nss_dma_header = register_sysctl("dev/nss/dma", nss_dma_table); + } + + /* +--- a/nss_ipv4.c ++++ b/nss_ipv4.c +@@ -712,33 +712,6 @@ static struct ctl_table nss_ipv4_table[] + { } + }; + +-static struct ctl_table nss_ipv4_dir[] = { +- { +- .procname = "ipv4cfg", +- .mode = 0555, +- .child = nss_ipv4_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_ipv4_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_ipv4_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_ipv4_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_ipv4_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_ipv4_header; + + /* +@@ -753,7 +726,7 @@ void nss_ipv4_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_ipv4_header = register_sysctl_table(nss_ipv4_root); ++ nss_ipv4_header = register_sysctl("dev/nss/ipv4cfg", nss_ipv4_table); + } + + /* +--- a/nss_ipv6.c ++++ b/nss_ipv6.c +@@ -18,6 +18,7 @@ + * nss_ipv6.c + * NSS IPv6 APIs + */ ++#include "linux/ipv6.h" + #include + #include "nss_dscp_map.h" + #include "nss_ipv6_stats.h" +@@ -377,7 +378,7 @@ EXPORT_SYMBOL(nss_ipv6_get_mgr); + * nss_ipv6_register_handler() + * Register our handler to receive messages for this interface + */ +-void nss_ipv6_register_handler() ++void nss_ipv6_register_handler(void) + { + struct nss_ctx_instance *nss_ctx = nss_ipv6_get_mgr(); + +@@ -706,33 +707,6 @@ static struct ctl_table nss_ipv6_table[] + { } + }; + +-static struct ctl_table nss_ipv6_dir[] = { +- { +- .procname = "ipv6cfg", +- .mode = 0555, +- .child = nss_ipv6_table, +- }, +- { } +-}; +- +-static struct ctl_table nss_ipv6_root_dir[] = { +- { +- .procname = "nss", +- .mode = 0555, +- .child = nss_ipv6_dir, +- }, +- { } +-}; +- +-static struct ctl_table nss_ipv6_root[] = { +- { +- .procname = "dev", +- .mode = 0555, +- .child = nss_ipv6_root_dir, +- }, +- { } +-}; +- + static struct ctl_table_header *nss_ipv6_header; + + /* +@@ -747,7 +721,7 @@ void nss_ipv6_register_sysctl(void) + /* + * Register sysctl table. + */ +- nss_ipv6_header = register_sysctl_table(nss_ipv6_root); ++ nss_ipv6_header = register_sysctl("dev/nss/ipv6cfg", nss_ipv6_table); + } + + /* +--- a/nss_pm.c ++++ b/nss_pm.c +@@ -323,6 +323,7 @@ error: + nss_pm_interface_status_t nss_pm_set_perf_level(void *handle, nss_pm_perf_level_t lvl) + { + #if ((NSS_DT_SUPPORT == 1) && (NSS_FREQ_SCALE_SUPPORT == 1)) ++#if !defined(NSS_HAL_IPQ807x_SUPPORT) + nss_freq_scales_t index; + + switch (lvl) { +@@ -335,10 +336,9 @@ nss_pm_interface_status_t nss_pm_set_per + break; + + default: +- index = NSS_PM_PERF_LEVEL_IDLE; ++ index = (nss_freq_scales_t)NSS_PM_PERF_LEVEL_IDLE; + } + +-#if !defined(NSS_HAL_IPQ807x_SUPPORT) + nss_freq_sched_change(index, false); + #endif + diff --git a/qca-nss-ecm/Makefile b/qca-nss-ecm/Makefile index 3340fa2..6cb9e1d 100644 --- a/qca-nss-ecm/Makefile +++ b/qca-nss-ecm/Makefile @@ -5,9 +5,10 @@ PKG_RELEASE:=1 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-10-20 -PKG_SOURCE_VERSION:=82b27915fffdbe2cdb2d4eb70e5736ccf92e2560 -PKG_MIRROR_HASH:=643895cb187cacfcde337c19dc5a34512acc225c0db1813a15cc1b66523835c4 +PKG_SOURCE_DATE:=2024-02-05 +PKG_SOURCE_VERSION:=db6e481 +PKG_MIRROR_HASH:=49de506af1b59c84c360aa421b187d13a86e51692dcf56ba932a7c2eeeffff6b +PKG_VERSION:=12.4.r4-$(PKG_SOURCE_DATE)-$(PKG_SOURCE_VERSION) PKG_BUILD_PARALLEL:=1 PKG_FLAGS:=nonshared @@ -21,10 +22,10 @@ define KernelPackage/qca-nss-ecm CATEGORY:=Kernel modules SUBMENU:=Network Support DEPENDS:=@(TARGET_qualcommax||TARGET_ipq60xx) \ + +kmod-nf-conntrack \ +@NSS_DRV_IPV6_ENABLE \ +@NSS_DRV_VIRT_IF_ENABLE \ +PACKAGE_kmod-qca-nss-drv:kmod-qca-nss-drv \ - +kmod-nf-conntrack \ +PACKAGE_kmod-qca-mcs:kmod-qca-mcs \ +PACKAGE_kmod-bonding:kmod-bonding \ +PACKAGE_kmod-vxlan:kmod-vxlan \ @@ -44,6 +45,10 @@ define KernelPackage/qca-nss-ecm/Description This package contains the QCA NSS Enhanced Connection Manager endef +define KernelPackage/qca-nss-ecm/conffiles +/etc/config/ecm +endef + define KernelPackage/qca-nss-ecm/install $(INSTALL_DIR) $(1)/etc/firewall.d $(1)/etc/init.d $(1)/usr/bin $(1)/lib/netifd/offload $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/sysctl.d $(1)/etc/hotplug.d/net $(INSTALL_DATA) ./files/qca-nss-ecm.firewall $(1)/etc/firewall.d/qca-nss-ecm diff --git a/qca-nss-ecm/patches/0015-ecm-add-support-for-kernel-6.6.patch b/qca-nss-ecm/patches/0015-ecm-add-support-for-kernel-6.6.patch new file mode 100644 index 0000000..c28072b --- /dev/null +++ b/qca-nss-ecm/patches/0015-ecm-add-support-for-kernel-6.6.patch @@ -0,0 +1,141 @@ +--- a/ecm_interface.c ++++ b/ecm_interface.c +@@ -8269,24 +8269,6 @@ static struct ctl_table ecm_interface_ta + { } + }; + +-static struct ctl_table ecm_interface_root_dir[] = { +- { +- .procname = "ecm", +- .mode = 0555, +- .child = ecm_interface_table, +- }, +- { } +-}; +- +-static struct ctl_table ecm_interface_root[] = { +- { +- .procname = "net", +- .mode = 0555, +- .child = ecm_interface_root_dir, +- }, +- { } +-}; +- + #ifdef ECM_INTERFACE_IPSEC_GLUE_LAYER_SUPPORT_ENABLE + /* + * ecm_interface_ipsec_register_callbacks() +@@ -8783,7 +8765,7 @@ int ecm_interface_init(void) + /* + * Register sysctl table. + */ +- ecm_interface_ctl_table_header = register_sysctl_table(ecm_interface_root); ++ ecm_interface_ctl_table_header = register_sysctl("net/ecm", ecm_interface_table); + + result = register_netdevice_notifier(&ecm_interface_netdev_notifier); + if (result != 0) { +--- a/frontends/ecm_front_end_common.c ++++ b/frontends/ecm_front_end_common.c +@@ -1164,34 +1164,16 @@ static struct ctl_table ecm_front_end_sy + {} + }; + +-static struct ctl_table ecm_front_end_common_root[] = { +- { +- .procname = "ecm", +- .mode = 0555, +- .child = ecm_front_end_sysctl_tbl, +- }, +- { } +-}; +- +-static struct ctl_table ecm_front_end_common_root_dir[] = { +- { +- .procname = "net", +- .mode = 0555, +- .child = ecm_front_end_common_root, +- }, +- { } +-}; +- + /* + * ecm_front_end_common_sysctl_register() + * Function to register sysctl node during front end init + */ +-void ecm_front_end_common_sysctl_register() ++void ecm_front_end_common_sysctl_register(void) + { + /* + * Register sysctl table. + */ +- ecm_front_end_ctl_tbl_hdr = register_sysctl_table(ecm_front_end_common_root_dir); ++ ecm_front_end_ctl_tbl_hdr = register_sysctl("net/ecm", ecm_front_end_sysctl_tbl); + #ifdef ECM_FRONT_END_SFE_ENABLE + if (ecm_front_end_ctl_tbl_hdr) { + ecm_sfe_sysctl_tbl_init(); +@@ -1203,7 +1185,7 @@ void ecm_front_end_common_sysctl_registe + * ecm_front_end_common_sysctl_unregister() + * Function to unregister sysctl node during front end exit + */ +-void ecm_front_end_common_sysctl_unregister() ++void ecm_front_end_common_sysctl_unregister(void) + { + /* + * Unregister sysctl table. +@@ -1702,7 +1684,11 @@ bool ecm_front_end_common_intf_ingress_q + { + #if defined(CONFIG_NET_CLS_ACT) + struct net_device *dev; +- struct mini_Qdisc *miniq; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) ++ struct bpf_mprog_entry *entry; ++#else ++ struct mini_Qdisc *entry; ++#endif + + dev = dev_get_by_index(&init_net, interface_num); + if (!dev) { +@@ -1711,8 +1697,13 @@ bool ecm_front_end_common_intf_ingress_q + } + + BUG_ON(!rcu_read_lock_bh_held()); +- miniq = rcu_dereference_bh(dev->miniq_ingress); +- if (miniq) { ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) ++ entry = rcu_dereference_bh(dev->tcx_ingress); ++#else ++ entry = rcu_dereference_bh(dev->miniq_ingress); ++#endif ++ if (entry) { + DEBUG_INFO("Ingress Qdisc is present for device[%s]\n", dev->name); + dev_put(dev); + return true; +@@ -1735,7 +1726,11 @@ bool ecm_front_end_common_intf_qdisc_che + struct Qdisc *q; + int i; + #if defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NET_EGRESS) +- struct mini_Qdisc *miniq; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) ++ struct bpf_mprog_entry *entry; ++#else ++ struct mini_Qdisc *entry; ++#endif + #endif + + *is_ppeq = false; +@@ -1766,8 +1761,12 @@ bool ecm_front_end_common_intf_qdisc_che + } + + #if defined(CONFIG_NET_CLS_ACT) && defined(CONFIG_NET_EGRESS) +- miniq = rcu_dereference_bh(dev->miniq_egress); +- if (miniq) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) ++ entry = rcu_dereference_bh(dev->tcx_egress); ++#else ++ entry = rcu_dereference_bh(dev->miniq_egress); ++#endif ++ if (entry) { + DEBUG_INFO("Egress needed\n"); + dev_put(dev); + return true;