mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-18 17:21:56 +00:00
Bump QCA NSS ECM to NHSS.QSDK.12.3.r2 tag.
Massive thanks to @AgustinLorenzo.
Reference:
8d73961018
923 lines
38 KiB
Diff
923 lines
38 KiB
Diff
From ff08fc9f9f2f0afca5e87601d10833cbbe6ac719 Mon Sep 17 00:00:00 2001
|
|
From: Ansuel Smith <ansuelsmth@gmail.com>
|
|
Date: Sat, 15 May 2021 03:51:14 +0200
|
|
Subject: [PATCH 03/12] treewide: rework debugfs api to new implementation
|
|
|
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
---
|
|
ecm_classifier_default.c | 24 +++---------
|
|
ecm_classifier_dscp.c | 8 +---
|
|
ecm_classifier_emesh.c | 24 +++---------
|
|
ecm_classifier_hyfi.c | 7 +---
|
|
ecm_classifier_mark.c | 8 +---
|
|
ecm_classifier_ovs.c | 8 +---
|
|
ecm_classifier_pcc.c | 8 +---
|
|
ecm_conntrack_notifier.c | 8 +---
|
|
ecm_db/ecm_db_connection.c | 7 +---
|
|
ecm_db/ecm_db_host.c | 7 +---
|
|
ecm_db/ecm_db_iface.c | 7 +---
|
|
ecm_db/ecm_db_mapping.c | 7 +---
|
|
ecm_db/ecm_db_node.c | 7 +---
|
|
ecm_state.c | 14 ++-----
|
|
frontends/cmn/ecm_bond_notifier.c | 8 +---
|
|
frontends/ecm_front_end_ipv4.c | 7 +---
|
|
frontends/ecm_front_end_ipv6.c | 7 +---
|
|
frontends/nss/ecm_nss_ipv4.c | 49 +++++++------------------
|
|
frontends/nss/ecm_nss_ipv6.c | 49 +++++++------------------
|
|
frontends/nss/ecm_nss_multicast_ipv4.c | 7 +---
|
|
frontends/nss/ecm_nss_multicast_ipv6.c | 7 +---
|
|
frontends/nss/ecm_nss_non_ported_ipv4.c | 7 +---
|
|
frontends/nss/ecm_nss_non_ported_ipv6.c | 7 +---
|
|
frontends/nss/ecm_nss_ported_ipv4.c | 16 ++------
|
|
frontends/nss/ecm_nss_ported_ipv6.c | 16 ++------
|
|
frontends/sfe/ecm_sfe_ipv4.c | 49 +++++++------------------
|
|
frontends/sfe/ecm_sfe_ipv6.c | 49 +++++++------------------
|
|
frontends/sfe/ecm_sfe_non_ported_ipv4.c | 7 +---
|
|
frontends/sfe/ecm_sfe_non_ported_ipv6.c | 7 +---
|
|
frontends/sfe/ecm_sfe_ported_ipv4.c | 8 +---
|
|
frontends/sfe/ecm_sfe_ported_ipv6.c | 8 +---
|
|
31 files changed, 122 insertions(+), 330 deletions(-)
|
|
|
|
diff --git a/ecm_classifier_default.c b/ecm_classifier_default.c
|
|
index 39315a9..1dad277 100644
|
|
--- a/ecm_classifier_default.c
|
|
+++ b/ecm_classifier_default.c
|
|
@@ -760,26 +760,14 @@ int ecm_classifier_default_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
- (u32 *)&ecm_classifier_default_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm deafult classifier enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
+ (u32 *)&ecm_classifier_default_enabled);
|
|
|
|
- if (!debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
- (u32 *)&ecm_classifier_default_accel_mode)) {
|
|
- DEBUG_ERROR("Failed to create ecm deafult classifier accel_mode file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
+ (u32 *)&ecm_classifier_default_accel_mode);
|
|
|
|
- if (!debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
- (u32 *)&ecm_classifier_accel_delay_pkts)) {
|
|
- DEBUG_ERROR("Failed to create accel delay packet counts in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
|
+ (u32 *)&ecm_classifier_accel_delay_pkts);
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/ecm_classifier_dscp.c b/ecm_classifier_dscp.c
|
|
index 4f0caeb..6c9401e 100644
|
|
--- a/ecm_classifier_dscp.c
|
|
+++ b/ecm_classifier_dscp.c
|
|
@@ -816,12 +816,8 @@ int ecm_classifier_dscp_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
|
|
- (u32 *)&ecm_classifier_dscp_enabled)) {
|
|
- DEBUG_ERROR("Failed to create dscp enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_dscp_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
|
|
+ (u32 *)&ecm_classifier_dscp_enabled);
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/ecm_classifier_emesh.c b/ecm_classifier_emesh.c
|
|
index 72cf2e1..f8aecec 100644
|
|
--- a/ecm_classifier_emesh.c
|
|
+++ b/ecm_classifier_emesh.c
|
|
@@ -1954,33 +1954,17 @@ int ecm_classifier_emesh_sawf_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
- (u32 *)&ecm_classifier_emesh_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm emesh classifier enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_emesh_sawf_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
+ (u32 *)&ecm_classifier_emesh_enabled);
|
|
|
|
- if (!debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
- (u32 *)&ecm_classifier_emesh_latency_config_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm emesh classifier latency config enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_emesh_sawf_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
+ (u32 *)&ecm_classifier_emesh_latency_config_enabled);
|
|
|
|
- if (!debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
- (u32 *)&ecm_classifier_sawf_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm sawf classifier enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_emesh_sawf_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
+ (u32 *)&ecm_classifier_sawf_enabled);
|
|
|
|
- if (!debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
- (u32 *)&ecm_classifier_sawf_cake_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm sawf cake enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_emesh_sawf_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
|
|
+ (u32 *)&ecm_classifier_sawf_cake_enabled);
|
|
|
|
/*
|
|
* Register for service prioritization notification update.
|
|
diff --git a/ecm_classifier_hyfi.c b/ecm_classifier_hyfi.c
|
|
index a57a13e..fad7209 100644
|
|
--- a/ecm_classifier_hyfi.c
|
|
+++ b/ecm_classifier_hyfi.c
|
|
@@ -1111,11 +1111,8 @@ int ecm_classifier_hyfi_rules_init(struct dentry *dentry)
|
|
goto classifier_task_cleanup;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
|
|
- (u32 *)&ecm_classifier_hyfi_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ecm hyfi classifier enabled file in debugfs\n");
|
|
- goto classifier_task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
|
|
+ (u32 *)&ecm_classifier_hyfi_enabled);
|
|
|
|
if (!debugfs_create_file("cmd", S_IWUSR, ecm_classifier_hyfi_dentry,
|
|
NULL, &ecm_classifier_hyfi_cmd_fops)) {
|
|
diff --git a/ecm_classifier_mark.c b/ecm_classifier_mark.c
|
|
index d054d8e..65dd1e1 100644
|
|
--- a/ecm_classifier_mark.c
|
|
+++ b/ecm_classifier_mark.c
|
|
@@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
|
|
- (u32 *)&ecm_classifier_mark_enabled)) {
|
|
- DEBUG_ERROR("Failed to create mark enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_mark_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
|
|
+ (u32 *)&ecm_classifier_mark_enabled);
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/ecm_classifier_ovs.c b/ecm_classifier_ovs.c
|
|
index b9d98d4..16a2ea9 100644
|
|
--- a/ecm_classifier_ovs.c
|
|
+++ b/ecm_classifier_ovs.c
|
|
@@ -2265,12 +2265,8 @@ int ecm_classifier_ovs_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
|
|
- (u32 *)&ecm_classifier_ovs_enabled)) {
|
|
- DEBUG_ERROR("Failed to create ovs enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_ovs_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
|
|
+ (u32 *)&ecm_classifier_ovs_enabled);
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/ecm_classifier_pcc.c b/ecm_classifier_pcc.c
|
|
index 6c6fcd4..af13357 100644
|
|
--- a/ecm_classifier_pcc.c
|
|
+++ b/ecm_classifier_pcc.c
|
|
@@ -1246,12 +1246,8 @@ int ecm_classifier_pcc_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
|
|
- (u32 *)&ecm_classifier_pcc_enabled)) {
|
|
- DEBUG_ERROR("Failed to create pcc enabled file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_classifier_pcc_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
|
|
+ (u32 *)&ecm_classifier_pcc_enabled);
|
|
|
|
return 0;
|
|
}
|
|
diff --git a/ecm_conntrack_notifier.c b/ecm_conntrack_notifier.c
|
|
index f4f2c60..7b20132 100644
|
|
--- a/ecm_conntrack_notifier.c
|
|
+++ b/ecm_conntrack_notifier.c
|
|
@@ -429,12 +429,8 @@ int ecm_conntrack_notifier_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
|
|
- (u32 *)&ecm_conntrack_notifier_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm conntrack notifier stopped file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_conntrack_notifier_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
|
|
+ (u32 *)&ecm_conntrack_notifier_stopped);
|
|
|
|
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
|
/*
|
|
diff --git a/ecm_db/ecm_db_connection.c b/ecm_db/ecm_db_connection.c
|
|
index 77e5f3f..4bd47c3 100644
|
|
--- a/ecm_db/ecm_db_connection.c
|
|
+++ b/ecm_db/ecm_db_connection.c
|
|
@@ -3776,11 +3776,8 @@ static struct file_operations ecm_db_connection_count_simple_fops = {
|
|
*/
|
|
bool ecm_db_connection_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("connection_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_db_connection_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm db connection count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("connection_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_db_connection_count);
|
|
|
|
if (!debugfs_create_file("connection_count_simple", S_IRUGO, dentry,
|
|
NULL, &ecm_db_connection_count_simple_fops)) {
|
|
diff --git a/ecm_db/ecm_db_host.c b/ecm_db/ecm_db_host.c
|
|
index 8820576..38a21b4 100644
|
|
--- a/ecm_db/ecm_db_host.c
|
|
+++ b/ecm_db/ecm_db_host.c
|
|
@@ -771,11 +771,8 @@ EXPORT_SYMBOL(ecm_db_host_alloc);
|
|
bool ecm_db_host_init(struct dentry *dentry)
|
|
{
|
|
|
|
- if (!debugfs_create_u32("host_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_db_host_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm db host count file in debugfs\n");
|
|
- return false;;
|
|
- }
|
|
+ debugfs_create_u32("host_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_db_host_count);
|
|
|
|
ecm_db_host_table = vzalloc(sizeof(struct ecm_db_host_instance *) * ECM_DB_HOST_HASH_SLOTS);
|
|
if (!ecm_db_host_table) {
|
|
diff --git a/ecm_db/ecm_db_iface.c b/ecm_db/ecm_db_iface.c
|
|
index 53c254c..f9ad269 100644
|
|
--- a/ecm_db/ecm_db_iface.c
|
|
+++ b/ecm_db/ecm_db_iface.c
|
|
@@ -3706,11 +3706,8 @@ EXPORT_SYMBOL(ecm_db_iface_alloc);
|
|
*/
|
|
bool ecm_db_iface_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("iface_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_db_iface_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm db iface count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("iface_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_db_iface_count);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/ecm_db/ecm_db_mapping.c b/ecm_db/ecm_db_mapping.c
|
|
index 1d06ef4..8574d20 100644
|
|
--- a/ecm_db/ecm_db_mapping.c
|
|
+++ b/ecm_db/ecm_db_mapping.c
|
|
@@ -807,11 +807,8 @@ EXPORT_SYMBOL(ecm_db_mapping_alloc);
|
|
*/
|
|
bool ecm_db_mapping_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("mapping_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_db_mapping_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm db mapping count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("mapping_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_db_mapping_count);
|
|
|
|
ecm_db_mapping_table = vzalloc(sizeof(struct ecm_db_mapping_instance *) * ECM_DB_MAPPING_HASH_SLOTS);
|
|
if (!ecm_db_mapping_table) {
|
|
diff --git a/ecm_db/ecm_db_node.c b/ecm_db/ecm_db_node.c
|
|
index 89b386f..513fb84 100644
|
|
--- a/ecm_db/ecm_db_node.c
|
|
+++ b/ecm_db/ecm_db_node.c
|
|
@@ -1211,11 +1211,8 @@ keep_sni_conn:
|
|
*/
|
|
bool ecm_db_node_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("node_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_db_node_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm db node count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("node_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_db_node_count);
|
|
|
|
ecm_db_node_table = vzalloc(sizeof(struct ecm_db_node_instance *) * ECM_DB_NODE_HASH_SLOTS);
|
|
if (!ecm_db_node_table) {
|
|
diff --git a/ecm_state.c b/ecm_state.c
|
|
index b4348a8..2424b58 100644
|
|
--- a/ecm_state.c
|
|
+++ b/ecm_state.c
|
|
@@ -894,17 +894,11 @@ int ecm_state_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
|
|
- (u32 *)&ecm_state_dev_major_id)) {
|
|
- DEBUG_ERROR("Failed to create ecm state dev major file in debugfs\n");
|
|
- goto init_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
|
|
+ (u32 *)&ecm_state_dev_major_id);
|
|
|
|
- if (!debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
|
|
- (u32 *)&ecm_state_file_output_mask)) {
|
|
- DEBUG_ERROR("Failed to create ecm state output mask file in debugfs\n");
|
|
- goto init_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
|
|
+ (u32 *)&ecm_state_file_output_mask);
|
|
|
|
/*
|
|
* Register a char device that we will use to provide a dump of our state
|
|
diff --git a/frontends/cmn/ecm_bond_notifier.c b/frontends/cmn/ecm_bond_notifier.c
|
|
index ca7fb45..f7e75e7 100644
|
|
--- a/frontends/cmn/ecm_bond_notifier.c
|
|
+++ b/frontends/cmn/ecm_bond_notifier.c
|
|
@@ -241,12 +241,8 @@ int ecm_bond_notifier_init(struct dentry *dentry)
|
|
return -1;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry,
|
|
- (u32 *)&ecm_bond_notifier_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm bond notifier stopped file in debugfs\n");
|
|
- debugfs_remove_recursive(ecm_bond_notifier_dentry);
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry,
|
|
+ (u32 *)&ecm_bond_notifier_stopped);
|
|
|
|
/*
|
|
* Register Link Aggregation callbacks with the bonding driver
|
|
diff --git a/frontends/ecm_front_end_ipv4.c b/frontends/ecm_front_end_ipv4.c
|
|
index 8bf040b..3b060f1 100644
|
|
--- a/frontends/ecm_front_end_ipv4.c
|
|
+++ b/frontends/ecm_front_end_ipv4.c
|
|
@@ -383,11 +383,8 @@ void ecm_front_end_ipv4_stop(int num)
|
|
*/
|
|
int ecm_front_end_ipv4_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
|
- (u32 *)&ecm_front_end_ipv4_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm front end ipv4 stop file in debugfs\n");
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
|
+ (u32 *)&ecm_front_end_ipv4_stopped);
|
|
|
|
return ecm_ipv4_init(dentry);
|
|
}
|
|
diff --git a/frontends/ecm_front_end_ipv6.c b/frontends/ecm_front_end_ipv6.c
|
|
index c6f09a8..2450346 100644
|
|
--- a/frontends/ecm_front_end_ipv6.c
|
|
+++ b/frontends/ecm_front_end_ipv6.c
|
|
@@ -262,11 +262,8 @@ void ecm_front_end_ipv6_stop(int num)
|
|
*/
|
|
int ecm_front_end_ipv6_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
|
- (u32 *)&ecm_front_end_ipv6_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm front end ipv6 stop file in debugfs\n");
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
|
+ (u32 *)&ecm_front_end_ipv6_stopped);
|
|
|
|
return ecm_ipv6_init(dentry);
|
|
}
|
|
diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c
|
|
index 0fee3e8..5b0ce29 100644
|
|
--- a/frontends/nss/ecm_nss_ipv4.c
|
|
+++ b/frontends/nss/ecm_nss_ipv4.c
|
|
@@ -1009,41 +1009,23 @@ int ecm_nss_ipv4_init(struct dentry *dentry)
|
|
return result;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_no_action_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 no_action_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_no_action_limit_default);
|
|
|
|
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_driver_fail_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 driver_fail_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_driver_fail_limit_default);
|
|
|
|
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_nack_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 nack_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_nack_limit_default);
|
|
|
|
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 accelerated_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_accelerated_count);
|
|
|
|
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_pending_accel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_accel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_pending_accel_count);
|
|
|
|
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_pending_decel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_decel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_pending_decel_count);
|
|
|
|
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
NULL, &ecm_nss_ipv4_accel_limit_mode_fops)) {
|
|
@@ -1074,11 +1056,8 @@ int ecm_nss_ipv4_init(struct dentry *dentry)
|
|
goto task_cleanup;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
- (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 vlan passthrough file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
|
+ (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable);
|
|
|
|
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE
|
|
if (!ecm_nss_non_ported_ipv4_debugfs_init(ecm_nss_ipv4_dentry)) {
|
|
diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c
|
|
index ee6b434..8d13f68 100644
|
|
--- a/frontends/nss/ecm_nss_ipv6.c
|
|
+++ b/frontends/nss/ecm_nss_ipv6.c
|
|
@@ -986,41 +986,23 @@ int ecm_nss_ipv6_init(struct dentry *dentry)
|
|
return result;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_no_action_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 no_action_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_no_action_limit_default);
|
|
|
|
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_driver_fail_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 driver_fail_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_driver_fail_limit_default);
|
|
|
|
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_nack_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 nack_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_nack_limit_default);
|
|
|
|
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 accelerated_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_accelerated_count);
|
|
|
|
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_pending_accel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_accel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_pending_accel_count);
|
|
|
|
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_pending_decel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_decel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_pending_decel_count);
|
|
|
|
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
NULL, &ecm_nss_ipv6_accel_limit_mode_fops)) {
|
|
@@ -1051,11 +1033,8 @@ int ecm_nss_ipv6_init(struct dentry *dentry)
|
|
goto task_cleanup;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
- (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 vlan passthrough file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
|
+ (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable);
|
|
|
|
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE
|
|
if (!ecm_nss_non_ported_ipv6_debugfs_init(ecm_nss_ipv6_dentry)) {
|
|
diff --git a/frontends/nss/ecm_nss_multicast_ipv4.c b/frontends/nss/ecm_nss_multicast_ipv4.c
|
|
index a3dcb79..c9e92de 100644
|
|
--- a/frontends/nss/ecm_nss_multicast_ipv4.c
|
|
+++ b/frontends/nss/ecm_nss_multicast_ipv4.c
|
|
@@ -2619,14 +2619,8 @@ find_next_tuple:
|
|
*/
|
|
bool ecm_nss_multicast_ipv4_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- struct dentry *multicast_dentry;
|
|
-
|
|
- multicast_dentry = debugfs_create_u32("multicast_accelerated_count", S_IRUGO, dentry,
|
|
+ debugfs_create_u32("multicast_accelerated_count", S_IRUGO, dentry,
|
|
&ecm_nss_multicast_ipv4_accelerated_count);
|
|
- if (!multicast_dentry) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 multicast_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
|
|
return true;
|
|
}
|
|
@@ -2645,11 +2639,8 @@ void ecm_nss_multicast_ipv4_stop(int num)
|
|
*/
|
|
int ecm_nss_multicast_ipv4_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
|
- (u32 *)&ecm_front_end_ipv4_mc_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm front end ipv4 mc stop file in debugfs\n");
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
|
+ (u32 *)&ecm_front_end_ipv4_mc_stopped);
|
|
|
|
/*
|
|
* Register multicast update callback to MCS snooper
|
|
--- a/frontends/nss/ecm_nss_multicast_ipv6.c
|
|
+++ b/frontends/nss/ecm_nss_multicast_ipv6.c
|
|
@@ -2554,14 +2554,8 @@ static void ecm_nss_multicast_ipv6_mfc_update_event_callback(struct in6_addr *gr
|
|
*/
|
|
bool ecm_nss_multicast_ipv6_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- struct dentry *multicast_dentry;
|
|
-
|
|
- multicast_dentry = debugfs_create_u32("multicast_accelerated_count", S_IRUGO, dentry,
|
|
+ debugfs_create_u32("multicast_accelerated_count", S_IRUGO, dentry,
|
|
&ecm_nss_multicast_ipv6_accelerated_count);
|
|
- if (!multicast_dentry) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 multicast_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
|
|
return true;
|
|
}
|
|
@@ -2580,11 +2574,8 @@ void ecm_nss_multicast_ipv6_stop(int num)
|
|
*/
|
|
int ecm_nss_multicast_ipv6_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
|
- (u32 *)&ecm_front_end_ipv6_mc_stopped)) {
|
|
- DEBUG_ERROR("Failed to create ecm front end ipv6 mc stop file in debugfs\n");
|
|
- return -1;
|
|
- }
|
|
+ debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
|
+ (u32 *)&ecm_front_end_ipv6_mc_stopped);
|
|
|
|
/*
|
|
* Register multicast update callback to MCS snooper
|
|
diff --git a/frontends/nss/ecm_nss_non_ported_ipv4.c b/frontends/nss/ecm_nss_non_ported_ipv4.c
|
|
index ec4f365..77de341 100644
|
|
--- a/frontends/nss/ecm_nss_non_ported_ipv4.c
|
|
+++ b/frontends/nss/ecm_nss_non_ported_ipv4.c
|
|
@@ -1830,11 +1830,8 @@ struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv4_connection_ins
|
|
*/
|
|
bool ecm_nss_non_ported_ipv4_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 non_ported_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/nss/ecm_nss_non_ported_ipv6.c b/frontends/nss/ecm_nss_non_ported_ipv6.c
|
|
index 13e0cc5..91ad7aa 100644
|
|
--- a/frontends/nss/ecm_nss_non_ported_ipv6.c
|
|
+++ b/frontends/nss/ecm_nss_non_ported_ipv6.c
|
|
@@ -1656,11 +1656,8 @@ struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv6_connection_ins
|
|
*/
|
|
bool ecm_nss_non_ported_ipv6_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 non_ported_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/nss/ecm_nss_ported_ipv4.c b/frontends/nss/ecm_nss_ported_ipv4.c
|
|
index 6375b6b..ea997e3 100644
|
|
--- a/frontends/nss/ecm_nss_ported_ipv4.c
|
|
+++ b/frontends/nss/ecm_nss_ported_ipv4.c
|
|
@@ -1896,21 +1896,11 @@ struct ecm_front_end_connection_instance *ecm_nss_ported_ipv4_connection_instanc
|
|
*/
|
|
bool ecm_nss_ported_ipv4_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- struct dentry *udp_dentry;
|
|
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
|
|
|
|
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
|
|
- if (!udp_dentry) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 udp_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
-
|
|
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv4 tcp_accelerated_count file in debugfs\n");
|
|
- debugfs_remove(udp_dentry);
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
|
|
|
|
- return true;
|
|
+ return true;
|
|
}
|
|
diff --git a/frontends/nss/ecm_nss_ported_ipv6.c b/frontends/nss/ecm_nss_ported_ipv6.c
|
|
index 1be8a58..451a557 100644
|
|
--- a/frontends/nss/ecm_nss_ported_ipv6.c
|
|
+++ b/frontends/nss/ecm_nss_ported_ipv6.c
|
|
@@ -1809,21 +1809,11 @@ struct ecm_front_end_connection_instance *ecm_nss_ported_ipv6_connection_instanc
|
|
*/
|
|
bool ecm_nss_ported_ipv6_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- struct dentry *udp_dentry;
|
|
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
|
|
|
|
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
|
|
- if (!udp_dentry) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 udp_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
-
|
|
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) {
|
|
- DEBUG_ERROR("Failed to create ecm nss ipv6 tcp_accelerated_count file in debugfs\n");
|
|
- debugfs_remove(udp_dentry);
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/sfe/ecm_sfe_ipv4.c b/frontends/sfe/ecm_sfe_ipv4.c
|
|
index 2076bad..3f30821 100644
|
|
--- a/frontends/sfe/ecm_sfe_ipv4.c
|
|
+++ b/frontends/sfe/ecm_sfe_ipv4.c
|
|
@@ -925,48 +925,27 @@ int ecm_sfe_ipv4_init(struct dentry *dentry)
|
|
}
|
|
|
|
#ifdef CONFIG_XFRM
|
|
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 reject_acceleration_for_ipsec file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec);
|
|
#endif
|
|
|
|
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_no_action_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 no_action_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_no_action_limit_default);
|
|
|
|
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 driver_fail_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default);
|
|
|
|
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_nack_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 nack_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_nack_limit_default);
|
|
|
|
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 accelerated_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_accelerated_count);
|
|
|
|
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_pending_accel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_accel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_pending_accel_count);
|
|
|
|
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
- (u32 *)&ecm_sfe_ipv4_pending_decel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_decel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv4_pending_decel_count);
|
|
|
|
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
|
NULL, &ecm_sfe_ipv4_accel_limit_mode_fops)) {
|
|
diff --git a/frontends/sfe/ecm_sfe_ipv6.c b/frontends/sfe/ecm_sfe_ipv6.c
|
|
index e8981ee..54fdbf3 100644
|
|
--- a/frontends/sfe/ecm_sfe_ipv6.c
|
|
+++ b/frontends/sfe/ecm_sfe_ipv6.c
|
|
@@ -917,48 +917,27 @@ int ecm_sfe_ipv6_init(struct dentry *dentry)
|
|
}
|
|
|
|
#ifdef CONFIG_XFRM
|
|
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 reject_acceleration_for_ipsec file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec);
|
|
#endif
|
|
|
|
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_no_action_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 no_action_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_no_action_limit_default);
|
|
|
|
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 driver_fail_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default);
|
|
|
|
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_nack_limit_default)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 nack_limit_default file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_nack_limit_default);
|
|
|
|
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 accelerated_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_accelerated_count);
|
|
|
|
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_pending_accel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_accel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_pending_accel_count);
|
|
|
|
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
- (u32 *)&ecm_sfe_ipv6_pending_decel_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_decel_count file in debugfs\n");
|
|
- goto task_cleanup;
|
|
- }
|
|
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
|
+ (u32 *)&ecm_sfe_ipv6_pending_decel_count);
|
|
|
|
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
|
NULL, &ecm_sfe_ipv6_accel_limit_mode_fops)) {
|
|
diff --git a/frontends/sfe/ecm_sfe_non_ported_ipv4.c b/frontends/sfe/ecm_sfe_non_ported_ipv4.c
|
|
index d7cad2a..696bd13 100644
|
|
--- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c
|
|
+++ b/frontends/sfe/ecm_sfe_non_ported_ipv4.c
|
|
@@ -1908,11 +1908,8 @@ struct ecm_front_end_connection_instance *ecm_sfe_non_ported_ipv4_connection_ins
|
|
*/
|
|
bool ecm_sfe_non_ported_ipv4_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 non_ported_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/sfe/ecm_sfe_non_ported_ipv6.c b/frontends/sfe/ecm_sfe_non_ported_ipv6.c
|
|
index a9fb637..fe06de4 100644
|
|
--- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c
|
|
+++ b/frontends/sfe/ecm_sfe_non_ported_ipv6.c
|
|
@@ -1726,11 +1726,8 @@ struct ecm_front_end_connection_instance *ecm_sfe_non_ported_ipv6_connection_ins
|
|
*/
|
|
bool ecm_sfe_non_ported_ipv6_debugfs_init(struct dentry *dentry)
|
|
{
|
|
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
- (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count)) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 non_ported_accelerated_count file in debugfs\n");
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
|
+ (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/sfe/ecm_sfe_ported_ipv4.c b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
|
index fc2c4ba..53f5b07 100644
|
|
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c
|
|
+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
|
@@ -2035,12 +2035,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(struct dentry *dentry)
|
|
return false;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_sfe_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv4 tcp_accelerated_count file in debugfs\n");
|
|
- debugfs_remove(udp_dentry);
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_sfe_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
|
|
|
|
return true;
|
|
}
|
|
diff --git a/frontends/sfe/ecm_sfe_ported_ipv6.c b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
|
index 90d642d..ae04cb4 100644
|
|
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c
|
|
+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
|
@@ -1982,12 +1982,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(struct dentry *dentry)
|
|
return false;
|
|
}
|
|
|
|
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
- &ecm_sfe_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) {
|
|
- DEBUG_ERROR("Failed to create ecm sfe ipv6 tcp_accelerated_count file in debugfs\n");
|
|
- debugfs_remove(udp_dentry);
|
|
- return false;
|
|
- }
|
|
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
|
+ &ecm_sfe_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
|
|
|
|
return true;
|
|
}
|