[qca-nss-drv] Reduce NSS FW IPv4/6 conn default to 1K
The host default remains at 4K so the connection table in the FW
will be 1K at boot and updated by host to 4K.
Change-Id: I6565e1a2d44d3ea7c093ce5edc895aa76c8095d5
Signed-off-by: Stephen Wang <wstephen@codeaurora.org>
diff --git a/nss_hlos_if.h b/nss_hlos_if.h
index 72a9896..845440e 100644
--- a/nss_hlos_if.h
+++ b/nss_hlos_if.h
@@ -22,11 +22,12 @@
#ifndef __NSS_HLOS_IF_H
#define __NSS_HLOS_IF_H
-#define NSS_MIN_NUM_CONN 256 /**< MIN Connection shared between IPv4 and IPv6 */
-#define NSS_DEFAULT_NUM_CONN 4096 /**< Default number of connections for each IPV4 and IPV6 */
-#define NSS_NUM_CONN_QUANTA_MASK (1024 - 1) /**< Quanta of number of connections 1024 */
-#define NSS_MAX_TOTAL_NUM_CONN_IPV4_IPV6 8196 /**< MAX Connection shared between IPv4 and IPv6 */
-#define NSS_CONN_CFG_TIMEOUT 6000 /**< 6 sec timeout for connection cfg message */
+#define NSS_MIN_NUM_CONN 256 /**< MIN Connection shared between IPv4 and IPv6. */
+#define NSS_DEFAULT_NUM_CONN 4096 /**< Default number of connections for each IPv4 and IPv6. */
+#define NSS_FW_DEFAULT_NUM_CONN 1024 /**< Firmware default number of connections for IPv4 and IPv6.*/
+#define NSS_NUM_CONN_QUANTA_MASK (1024 - 1) /**< Quanta of number of connections 1024. */
+#define NSS_MAX_TOTAL_NUM_CONN_IPV4_IPV6 8196 /**< MAX Connection shared between IPv4 and IPv6. */
+#define NSS_CONN_CFG_TIMEOUT 6000 /**< 6 sec timeout for connection cfg message. */
enum {
NSS_SUCCESS = 0,
diff --git a/nss_ipv4.c b/nss_ipv4.c
index fb84ff4..134f202 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -437,7 +437,7 @@
if (nim->cm.response != NSS_CMN_RESPONSE_ACK) {
nss_warning("%p: IPv4 connection configuration failed with error: %d\n", nss_ctx, nim->cm.error);
- nss_core_update_max_ipv4_conn(NSS_DEFAULT_NUM_CONN);
+ nss_core_update_max_ipv4_conn(NSS_FW_DEFAULT_NUM_CONN);
nss_ipv4_free_conn_tables();
return;
}
@@ -526,7 +526,7 @@
if (nim->cm.response != NSS_CMN_RESPONSE_ACK) {
nss_warning("%p: IPv4 fetch connection info failed with error: %d\n", nss_ctx, nim->cm.error);
- nss_core_update_max_ipv4_conn(NSS_DEFAULT_NUM_CONN);
+ nss_core_update_max_ipv4_conn(NSS_FW_DEFAULT_NUM_CONN);
return;
}
@@ -561,7 +561,7 @@
/*
* By default, NSS FW is configured with default number of connections.
*/
- if (ipv4_num_conn == NSS_DEFAULT_NUM_CONN) {
+ if (ipv4_num_conn == NSS_FW_DEFAULT_NUM_CONN) {
nss_info("%p: Default number of connections (%d) already configured\n", nss_ctx, ipv4_num_conn);
return 0;
}
diff --git a/nss_ipv6.c b/nss_ipv6.c
index dfbb908..f9470f9 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -439,7 +439,7 @@
if (nim->cm.response != NSS_CMN_RESPONSE_ACK) {
nss_warning("%p: IPv6 connection configuration failed with error: %d\n", nss_ctx, nim->cm.error);
- nss_core_update_max_ipv6_conn(NSS_DEFAULT_NUM_CONN);
+ nss_core_update_max_ipv6_conn(NSS_FW_DEFAULT_NUM_CONN);
nss_ipv6_free_conn_tables();
return;
}
@@ -535,7 +535,7 @@
if (nim->cm.response != NSS_CMN_RESPONSE_ACK) {
nss_warning("%p: IPv6 fetch connection info failed with error: %d\n", nss_ctx, nim->cm.error);
- nss_core_update_max_ipv6_conn(NSS_DEFAULT_NUM_CONN);
+ nss_core_update_max_ipv6_conn(NSS_FW_DEFAULT_NUM_CONN);
return;
}
@@ -570,7 +570,7 @@
/*
* By default, NSS FW is configured with default number of connections.
*/
- if (ipv6_num_conn == NSS_DEFAULT_NUM_CONN) {
+ if (ipv6_num_conn == NSS_FW_DEFAULT_NUM_CONN) {
nss_info("%p: Default number of connections (%d) already configured\n", nss_ctx, ipv6_num_conn);
return 0;
}