Merge "[qca-nss-drv] Add PPPoE base node statistics"
diff --git a/nss_c2c_rx.c b/nss_c2c_rx.c
index 732a288..e67512e 100644
--- a/nss_c2c_rx.c
+++ b/nss_c2c_rx.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -99,6 +99,9 @@
void nss_c2c_rx_register_handler(struct nss_ctx_instance *nss_ctx)
{
nss_core_register_handler(nss_ctx, NSS_C2C_RX_INTERFACE, nss_c2c_rx_interface_handler, NULL);
- nss_c2c_rx_stats_dentry_create();
+
+ if (nss_ctx->id == NSS_CORE_0) {
+ nss_c2c_rx_stats_dentry_create();
+ }
}
EXPORT_SYMBOL(nss_c2c_rx_register_handler);
diff --git a/nss_c2c_tx.c b/nss_c2c_tx.c
index 683c13b..64e6d08 100644
--- a/nss_c2c_tx.c
+++ b/nss_c2c_tx.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -134,7 +134,10 @@
{
nss_info("%p: nss_c2c_tx_register_handler", nss_ctx);
nss_core_register_handler(nss_ctx, NSS_C2C_TX_INTERFACE, nss_c2c_tx_msg_handler, NULL);
- nss_c2c_tx_stats_dentry_create();
+
+ if (nss_ctx->id == NSS_CORE_0) {
+ nss_c2c_tx_stats_dentry_create();
+ }
}
EXPORT_SYMBOL(nss_c2c_tx_register_handler);
diff --git a/nss_core.c b/nss_core.c
index 8c0ff7a..c2021e9 100644
--- a/nss_core.c
+++ b/nss_core.c
@@ -879,6 +879,10 @@
break;
case N2H_BUFFER_SHAPER_BOUNCED_INTERFACE:
+ reg = &nss_ctx->nss_top->bounce_interface_registrants[interface_num];
+ nss_core_handle_bounced_pkt(nss_ctx, reg, nbuf);
+ break;
+
case N2H_BUFFER_SHAPER_BOUNCED_BRIDGE:
reg = &nss_ctx->nss_top->bounce_bridge_registrants[interface_num];
nss_core_handle_bounced_pkt(nss_ctx, reg, nbuf);
diff --git a/nss_ipv4.c b/nss_ipv4.c
index 2693957..2ad87fb 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -401,7 +401,7 @@
}
nss_ipv4_conn_cfg = ntohl(nirccm->num_conn);
- nss_warning("%p: IPv4 connection configuration success: %d\n", nss_ctx, nim->cm.error);
+ nss_info("%p: IPv4 connection configuration success: %d\n", nss_ctx, nim->cm.error);
}
/*
@@ -536,7 +536,7 @@
(ipv4_num_conn < NSS_MIN_NUM_CONN)) {
nss_warning("%p: input supported connections (%d) does not adhere\
specifications\n1) not multiple of 1024,\n2) is less than \
- min val: %d, OR\n IPv4/6 total exceeds %d\n",
+ min val: %d, OR\n IPv4/6 total exceeds %d\n",
nss_ctx,
ipv4_num_conn,
NSS_MIN_NUM_CONN,
diff --git a/nss_ipv6.c b/nss_ipv6.c
index 850ba49..02a4b0b 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -404,7 +404,7 @@
nss_ipv6_conn_cfg = ntohl(nirccm->num_conn);
- nss_warning("%p: IPv6 connection configuration success: %d\n", nss_ctx, nim->cm.error);
+ nss_info("%p: IPv6 connection configuration success: %d\n", nss_ctx, nim->cm.error);
}
/*
@@ -433,7 +433,7 @@
conn);
goto fail;
}
- nss_warning("%p: CE Memory allocated for IPv6 Connections: %d\n",
+ nss_info("%p: CE Memory allocated for IPv6 Connections: %d\n",
nss_ctx,
conn);
@@ -445,7 +445,7 @@
conn);
goto fail;
}
- nss_warning("%p: CME Memory allocated for IPv6 Connections: %d\n",
+ nss_info("%p: CME Memory allocated for IPv6 Connections: %d\n",
nss_ctx,
conn);
@@ -546,7 +546,7 @@
(ipv6_num_conn < NSS_MIN_NUM_CONN)) {
nss_warning("%p: input supported connections (%d) does not adhere\
specifications\n1) not power of 2,\n2) is less than \
- min val: %d, OR\n IPv4/6 total exceeds %d\n",
+ min val: %d, OR\n IPv4/6 total exceeds %d\n",
nss_ctx,
ipv6_num_conn,
NSS_MIN_NUM_CONN,
diff --git a/nss_n2h.c b/nss_n2h.c
index 552642a..e6c7697 100644
--- a/nss_n2h.c
+++ b/nss_n2h.c
@@ -2053,7 +2053,9 @@
nss_core_register_handler(nss_ctx, NSS_N2H_INTERFACE, nss_n2h_interface_handler, NULL);
- nss_n2h_stats_dentry_create();
+ if (nss_ctx->id == NSS_CORE_0) {
+ nss_n2h_stats_dentry_create();
+ }
}
/*
diff --git a/nss_qrfs.c b/nss_qrfs.c
index baa23fe..5401efe 100644
--- a/nss_qrfs.c
+++ b/nss_qrfs.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -420,7 +420,10 @@
void nss_qrfs_register_handler(struct nss_ctx_instance *nss_ctx)
{
nss_core_register_handler(nss_ctx, NSS_QRFS_INTERFACE, nss_qrfs_msg_handler, NULL);
- nss_qrfs_stats_dentry_create();
+
+ if (nss_ctx->id == NSS_CORE_0) {
+ nss_qrfs_stats_dentry_create();
+ }
}
EXPORT_SYMBOL(nss_qrfs_register_handler);
diff --git a/nss_stats.c b/nss_stats.c
index c02f001..516c85d 100644
--- a/nss_stats.c
+++ b/nss_stats.c
@@ -1,6 +1,6 @@
/*
**************************************************************************
- * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all copies.
@@ -100,7 +100,7 @@
void nss_stats_create_dentry(char *name, const struct file_operations *ops)
{
if (!debugfs_create_file(name, 0400, nss_top_main.stats_dentry, &nss_top_main, ops)) {
- nss_warning("Faied to create debug entry for subsystem %s\n", name);
+ nss_warning("Failed to create debug entry for subsystem %s\n", name);
}
}
@@ -367,7 +367,7 @@
/*
* nss_stats_clean()
- * Cleanup NSS statistics files
+ * Cleanup NSS statistics files
*/
void nss_stats_clean(void)
{
@@ -382,7 +382,7 @@
/*
* nss_stats_init()
- * Enable NSS statistics
+ * Enable NSS statistics
*/
void nss_stats_init(void)
{
diff --git a/nss_unaligned.c b/nss_unaligned.c
index 840f40d..f84ed8f 100644
--- a/nss_unaligned.c
+++ b/nss_unaligned.c
@@ -84,5 +84,8 @@
void nss_unaligned_register_handler(struct nss_ctx_instance *nss_ctx)
{
nss_core_register_handler(nss_ctx, NSS_UNALIGNED_INTERFACE, nss_unaligned_msg_handler, NULL);
- nss_unaligned_stats_dentry_create();
+
+ if (nss_ctx->id == NSS_CORE_0) {
+ nss_unaligned_stats_dentry_create();
+ }
}