nss-packages-qosmio/qca-nss-drv/patches/0016-nss-drv-add-support-for-kernel-6.6.patch
Sean Khan e991bc1429 nss-drv: [12.5] bump to latest and refresh patches
This commit updates 12.5 version of the nss-drv from:

30fbfa4 -> 4dfab93

Bringing in the following changes:

```
2024-11-13 - d5ee67b - Add support for clearing N2H stats
2024-11-13 - 4850be3 - Add support for clearing DRV stats
2024-11-13 - 3d7c16d - Add support for clearing capwap stats
2024-11-13 - 163fbf4 - Add support clearing Crypto CMN stats
2024-11-13 - 084b475 - Add support for clearing DTLS CMN stats
2024-11-13 - e32f844 - Add support clearing PVxLAN stats
2024-11-13 - 2f54141 - Add support for clearing ipv6 stats
2024-11-13 - 702b14c - Add support for clearing C2C TX stats
2024-11-13 - 201dbc5 - Add support for clearing ipv4 stats
2024-11-13 - 24b6f1a - Add support for clearing eth_rx stats
2024-11-05 - 6e242de - Add support for clearing C2C RX stats
2024-11-05 - 942593c - Added a flag to identify if HW UDP checksum is supported for udp_st
2024-11-05 - e11eb4e - Add support for clearing Trustsec TX stats
2024-11-05 - 4f01399 - Add support for clearing EDMA Lite stats
2024-11-05 - 45b9a31 - Add support for clearing Trustsec RX stats
2024-11-05 - 57b338d - Add baseline stats write functionality
2024-10-16 - b671190 - Fix dtsi parameter that controls enabling UBI
2024-10-08 - 9514a99 - Enabling qca-nss-drv on 6.6 kernel
2024-07-16 - e96972f - udp_st: Add a new mode to handle unsynchronized time.
2024-05-16 - 1db9e55 - Add missing error code for wifili pkg.
```

Stats can be cleared by echoing `0` to the corresponding stats file.

For example, to clear the N2H stats, you can run:

```
echo 0 > /sys/kernel/debug/qca-nss-drv/stats/n2h
```
2025-04-08 03:10:05 -04:00

252 lines
4.8 KiB
Diff

--- 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_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_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 <nss_core.h>
#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
@@ -326,6 +326,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) {
@@ -341,7 +342,6 @@ nss_pm_interface_status_t nss_pm_set_per
index = NSS_FREQ_MID_SCALE;
}
-#if !defined(NSS_HAL_IPQ807x_SUPPORT)
nss_freq_sched_change(index, false);
#endif