This commit is contained in:
AgustinLorenzo 2023-08-23 00:32:08 +02:00 committed by dimfish
parent bf12b39e94
commit b2820eb3e2
12 changed files with 166 additions and 165 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=qca-nss-ecm PKG_NAME:=qca-nss-ecm
PKG_RELEASE=1 PKG_RELEASE:=1
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git

View File

@ -23,7 +23,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_INTERFACE_PPPOE_ENABLE=y + ECM_INTERFACE_PPPOE_ENABLE=y
+endif +endif
ccflags-$(ECM_INTERFACE_PPPOE_ENABLE) += -DECM_INTERFACE_PPPOE_ENABLE ccflags-$(ECM_INTERFACE_PPPOE_ENABLE) += -DECM_INTERFACE_PPPOE_ENABLE
# ############################################################################# # #############################################################################
+# Define ECM_INTERFACE_L2TPV2_PPTP_ENABLE=y in order +# Define ECM_INTERFACE_L2TPV2_PPTP_ENABLE=y in order
+# to enable support for l2tpv2 or PPTP detection. +# to enable support for l2tpv2 or PPTP detection.
@ -36,7 +36,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
# ############################################################################# # #############################################################################
@@ -160,6 +168,12 @@ endif @@ -160,6 +168,12 @@ endif
ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -DECM_INTERFACE_PPP_ENABLE ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -DECM_INTERFACE_PPP_ENABLE
# ############################################################################# # #############################################################################
+# Define ECM_INTERFACE_GRE_ENABLE=y in order +# Define ECM_INTERFACE_GRE_ENABLE=y in order
+# to enable support for GRE detection. +# to enable support for GRE detection.
@ -56,7 +56,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_INTERFACE_VLAN_ENABLE=y + ECM_INTERFACE_VLAN_ENABLE=y
+endif +endif
ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE
# ############################################################################# # #############################################################################
@@ -284,7 +300,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) += @@ -284,7 +300,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) +=
# ############################################################################# # #############################################################################
@ -68,7 +68,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+endif +endif
ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o
ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE
@@ -308,7 +326,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += - @@ -308,7 +326,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -
# ############################################################################# # #############################################################################
# Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier. # Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier.
@ -90,7 +90,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+endif +endif
ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o
ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE
@@ -368,27 +390,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE) @@ -368,27 +390,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE)
# ############################################################################# # #############################################################################
# Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output # Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output
@ -101,7 +101,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+endif +endif
ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o
ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE
# ############################################################################# # #############################################################################
# Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output # Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output
# ############################################################################# # #############################################################################
@ -110,7 +110,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_DB_ADVANCED_STATS_ENABLE=y + ECM_DB_ADVANCED_STATS_ENABLE=y
+endif +endif
ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE
# ############################################################################# # #############################################################################
# Define ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y in order to enable # Define ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y in order to enable
# the database to track relationships between objects. # the database to track relationships between objects.
@ -120,7 +120,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y + ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y
+endif +endif
ccflags-$(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) += -DECM_DB_XREF_ENABLE ccflags-$(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) += -DECM_DB_XREF_ENABLE
# ############################################################################# # #############################################################################
# Define ECM_TRACKER_DPI_SUPPORT_ENABLE=y in order to enable support for # Define ECM_TRACKER_DPI_SUPPORT_ENABLE=y in order to enable support for
# deep packet inspection and tracking of data with the trackers. # deep packet inspection and tracking of data with the trackers.
@ -129,7 +129,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_TRACKER_DPI_SUPPORT_ENABLE=y + ECM_TRACKER_DPI_SUPPORT_ENABLE=y
+endif +endif
ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE
# ############################################################################# # #############################################################################
@@ -396,14 +427,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE @@ -396,14 +427,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE
# support for the database keeping lists of connections that are assigned # support for the database keeping lists of connections that are assigned
@ -140,7 +140,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y + ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y
+endif +endif
ccflags-$(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) += -DECM_DB_CTA_TRACK_ENABLE ccflags-$(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) += -DECM_DB_CTA_TRACK_ENABLE
# ############################################################################# # #############################################################################
# Define ECM_BAND_STEERING_ENABLE=y in order to enable # Define ECM_BAND_STEERING_ENABLE=y in order to enable
# band steering feature. # band steering feature.
@ -150,7 +150,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ ECM_BAND_STEERING_ENABLE=y + ECM_BAND_STEERING_ENABLE=y
+endif +endif
ccflags-$(ECM_BAND_STEERING_ENABLE) += -DECM_BAND_STEERING_ENABLE ccflags-$(ECM_BAND_STEERING_ENABLE) += -DECM_BAND_STEERING_ENABLE
# ############################################################################# # #############################################################################
--- a/ecm_db/ecm_db_connection.c --- a/ecm_db/ecm_db_connection.c
+++ b/ecm_db/ecm_db_connection.c +++ b/ecm_db/ecm_db_connection.c
@ -161,9 +161,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#ifdef ECM_DB_ADVANCED_STATS_ENABLE +#ifdef ECM_DB_ADVANCED_STATS_ENABLE
int32_t i; int32_t i;
+#endif +#endif
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci); DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci);
@@ -545,7 +547,9 @@ EXPORT_SYMBOL(ecm_db_connection_data_tot @@ -545,7 +547,9 @@ EXPORT_SYMBOL(ecm_db_connection_data_tot
*/ */
void ecm_db_connection_data_totals_update_dropped(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets) void ecm_db_connection_data_totals_update_dropped(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets)
@ -171,13 +171,13 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#ifdef ECM_DB_ADVANCED_STATS_ENABLE +#ifdef ECM_DB_ADVANCED_STATS_ENABLE
int32_t i; int32_t i;
+#endif +#endif
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci); DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci);
@@ -1539,6 +1543,7 @@ void ecm_db_connection_defunct_all(void) @@ -1539,6 +1543,7 @@ void ecm_db_connection_defunct_all(void)
} }
EXPORT_SYMBOL(ecm_db_connection_defunct_all); EXPORT_SYMBOL(ecm_db_connection_defunct_all);
+#ifdef ECM_INTERFACE_OVS_BRIDGE_ENABLE +#ifdef ECM_INTERFACE_OVS_BRIDGE_ENABLE
/* /*
* ecm_db_connection_defunct_by_classifier() * ecm_db_connection_defunct_by_classifier()
@ -187,13 +187,13 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
} }
} }
+#endif +#endif
/* /*
* ecm_db_connection_defunct_by_port() * ecm_db_connection_defunct_by_port()
@@ -1994,6 +2000,7 @@ struct ecm_db_node_instance *ecm_db_conn @@ -1994,6 +2000,7 @@ struct ecm_db_node_instance *ecm_db_conn
} }
EXPORT_SYMBOL(ecm_db_connection_node_get_and_ref); EXPORT_SYMBOL(ecm_db_connection_node_get_and_ref);
+#ifdef ECM_DB_XREF_ENABLE +#ifdef ECM_DB_XREF_ENABLE
/* /*
* ecm_db_connection_mapping_get_and_ref_next() * ecm_db_connection_mapping_get_and_ref_next()
@ -203,7 +203,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
} }
EXPORT_SYMBOL(ecm_db_connection_iface_get_and_ref_next); EXPORT_SYMBOL(ecm_db_connection_iface_get_and_ref_next);
+#endif +#endif
/* /*
* ecm_db_connection_mapping_get_and_ref() * ecm_db_connection_mapping_get_and_ref()
--- a/ecm_db/ecm_db_node.c --- a/ecm_db/ecm_db_node.c
@ -218,7 +218,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
#endif #endif
+#endif +#endif
DEBUG_CHECK_MAGIC(ni, ECM_DB_NODE_INSTANCE_MAGIC, "%px: magic failed\n", ni); DEBUG_CHECK_MAGIC(ni, ECM_DB_NODE_INSTANCE_MAGIC, "%px: magic failed\n", ni);
spin_lock_bh(&ecm_db_lock); spin_lock_bh(&ecm_db_lock);
@@ -489,9 +491,11 @@ EXPORT_SYMBOL(ecm_db_node_iface_get_and_ @@ -489,9 +491,11 @@ EXPORT_SYMBOL(ecm_db_node_iface_get_and_
void ecm_db_node_add(struct ecm_db_node_instance *ni, struct ecm_db_iface_instance *ii, uint8_t *address, void ecm_db_node_add(struct ecm_db_node_instance *ni, struct ecm_db_iface_instance *ii, uint8_t *address,
@ -231,7 +231,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#endif +#endif
ecm_db_node_hash_t hash_index; ecm_db_node_hash_t hash_index;
struct ecm_db_listener_instance *li; struct ecm_db_listener_instance *li;
--- a/ecm_interface.c --- a/ecm_interface.c
+++ b/ecm_interface.c +++ b/ecm_interface.c
@@ -1483,6 +1483,7 @@ struct neighbour *ecm_interface_ipv6_nei @@ -1483,6 +1483,7 @@ struct neighbour *ecm_interface_ipv6_nei
@ -240,16 +240,16 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
{ {
+#ifdef ECM_INTERFACE_PPTP_ENABLE +#ifdef ECM_INTERFACE_PPTP_ENABLE
struct net_device *in; struct net_device *in;
/* /*
@@ -1507,6 +1508,7 @@ bool ecm_interface_is_pptp(struct sk_buf @@ -1507,6 +1508,7 @@ bool ecm_interface_is_pptp(struct sk_buf
} }
dev_put(in); dev_put(in);
+#endif +#endif
return false; return false;
} }
@@ -1519,6 +1521,7 @@ bool ecm_interface_is_pptp(struct sk_buf @@ -1519,6 +1521,7 @@ bool ecm_interface_is_pptp(struct sk_buf
*/ */
bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct net_device *out, int ver) bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct net_device *out, int ver)
@ -257,35 +257,35 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE +#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE
uint32_t flag = 0; uint32_t flag = 0;
struct net_device *in; struct net_device *in;
@@ -1551,6 +1554,7 @@ bool ecm_interface_is_l2tp_packet_by_ver @@ -1551,6 +1554,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
} }
dev_put(in); dev_put(in);
+#endif +#endif
return false; return false;
} }
@@ -1563,6 +1567,7 @@ bool ecm_interface_is_l2tp_packet_by_ver @@ -1563,6 +1567,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
*/ */
bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *out) bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *out)
{ {
+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE +#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE
struct net_device *in; struct net_device *in;
/* /*
@@ -1585,6 +1590,7 @@ bool ecm_interface_is_l2tp_pptp(struct s @@ -1585,6 +1590,7 @@ bool ecm_interface_is_l2tp_pptp(struct s
} }
dev_put(in); dev_put(in);
+#endif +#endif
return false; return false;
} }
@@ -7120,6 +7126,7 @@ static void ecm_interface_regenerate_con @@ -7120,6 +7126,7 @@ static void ecm_interface_regenerate_con
return; return;
} }
+#ifdef ECM_DB_XREF_ENABLE +#ifdef ECM_DB_XREF_ENABLE
for (dir = 0; dir < ECM_DB_OBJ_DIR_MAX; dir++) { for (dir = 0; dir < ECM_DB_OBJ_DIR_MAX; dir++) {
/* /*
@ -295,7 +295,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
} }
} }
+#endif +#endif
#ifdef ECM_MULTICAST_ENABLE #ifdef ECM_MULTICAST_ENABLE
/* /*
--- a/frontends/ecm_front_end_common.c --- a/frontends/ecm_front_end_common.c
@ -307,7 +307,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#ifdef ECM_INTERFACE_GRE_ENABLE +#ifdef ECM_INTERFACE_GRE_ENABLE
struct net_device *dev; struct net_device *dev;
struct gre_base_hdr *greh; struct gre_base_hdr *greh;
@@ -502,10 +503,12 @@ bool ecm_front_end_gre_proto_is_accel_al @@ -502,10 +503,12 @@ bool ecm_front_end_gre_proto_is_accel_al
/* /*
* Case 1: PPTP locally terminated * Case 1: PPTP locally terminated
@ -318,7 +318,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
return true; return true;
} }
+#endif +#endif
/* /*
* Case 2: PPTP pass through * Case 2: PPTP pass through
@@ -613,6 +616,10 @@ bool ecm_front_end_gre_proto_is_accel_al @@ -613,6 +616,10 @@ bool ecm_front_end_gre_proto_is_accel_al
@ -330,5 +330,5 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ return false; + return false;
+#endif +#endif
} }
#ifdef ECM_CLASSIFIER_DSCP_ENABLE #ifdef ECM_CLASSIFIER_DSCP_ENABLE

View File

@ -2,7 +2,7 @@
+++ b/ecm_interface.c +++ b/ecm_interface.c
@@ -336,7 +336,7 @@ static struct net_device *ecm_interface_ @@ -336,7 +336,7 @@ static struct net_device *ecm_interface_
struct net_device *dev; struct net_device *dev;
ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr); ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr);
- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1); - dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1);
+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1); + dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1);
@ -23,7 +23,7 @@
@@ -102,6 +102,10 @@ @@ -102,6 +102,10 @@
#endif #endif
#endif #endif
+#ifdef ECM_IPV6_ENABLE +#ifdef ECM_IPV6_ENABLE
+#include "ecm_front_end_ipv6.h" +#include "ecm_front_end_ipv6.h"
+#endif +#endif
@ -43,7 +43,7 @@
@@ -588,7 +592,7 @@ bool ecm_front_end_gre_proto_is_accel_al @@ -588,7 +592,7 @@ bool ecm_front_end_gre_proto_is_accel_al
return false; return false;
} }
- dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1); - dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1);
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1); + dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1);
if (dev) { if (dev) {

View File

@ -43,7 +43,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -760,26 +760,14 @@ int ecm_classifier_default_init(struct d @@ -760,26 +760,14 @@ int ecm_classifier_default_init(struct d
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
- (u32 *)&ecm_classifier_default_enabled)) { - (u32 *)&ecm_classifier_default_enabled)) {
- DEBUG_ERROR("Failed to create ecm deafult classifier enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm deafult classifier enabled file in debugfs\n");
@ -52,7 +52,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
+ (u32 *)&ecm_classifier_default_enabled); + (u32 *)&ecm_classifier_default_enabled);
- if (!debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, - if (!debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
- (u32 *)&ecm_classifier_default_accel_mode)) { - (u32 *)&ecm_classifier_default_accel_mode)) {
- DEBUG_ERROR("Failed to create ecm deafult classifier accel_mode file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm deafult classifier accel_mode file in debugfs\n");
@ -61,7 +61,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, + debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
+ (u32 *)&ecm_classifier_default_accel_mode); + (u32 *)&ecm_classifier_default_accel_mode);
- if (!debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, - if (!debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
- (u32 *)&ecm_classifier_accel_delay_pkts)) { - (u32 *)&ecm_classifier_accel_delay_pkts)) {
- DEBUG_ERROR("Failed to create accel delay packet counts in debugfs\n"); - DEBUG_ERROR("Failed to create accel delay packet counts in debugfs\n");
@ -70,7 +70,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry, + debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
+ (u32 *)&ecm_classifier_accel_delay_pkts); + (u32 *)&ecm_classifier_accel_delay_pkts);
return 0; return 0;
} }
--- a/ecm_classifier_dscp.c --- a/ecm_classifier_dscp.c
@ -78,7 +78,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -816,12 +816,8 @@ int ecm_classifier_dscp_init(struct dent @@ -816,12 +816,8 @@ int ecm_classifier_dscp_init(struct dent
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
- (u32 *)&ecm_classifier_dscp_enabled)) { - (u32 *)&ecm_classifier_dscp_enabled)) {
- DEBUG_ERROR("Failed to create dscp enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create dscp enabled file in debugfs\n");
@ -87,7 +87,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
+ (u32 *)&ecm_classifier_dscp_enabled); + (u32 *)&ecm_classifier_dscp_enabled);
return 0; return 0;
} }
--- a/ecm_classifier_emesh.c --- a/ecm_classifier_emesh.c
@ -95,7 +95,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -2059,33 +2059,17 @@ int ecm_classifier_emesh_sawf_init(struc @@ -2059,33 +2059,17 @@ int ecm_classifier_emesh_sawf_init(struc
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
- (u32 *)&ecm_classifier_emesh_enabled)) { - (u32 *)&ecm_classifier_emesh_enabled)) {
- DEBUG_ERROR("Failed to create ecm emesh classifier enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm emesh classifier enabled file in debugfs\n");
@ -104,7 +104,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
+ (u32 *)&ecm_classifier_emesh_enabled); + (u32 *)&ecm_classifier_emesh_enabled);
- if (!debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, - if (!debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
- (u32 *)&ecm_classifier_emesh_latency_config_enabled)) { - (u32 *)&ecm_classifier_emesh_latency_config_enabled)) {
- DEBUG_ERROR("Failed to create ecm emesh classifier latency config enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm emesh classifier latency config enabled file in debugfs\n");
@ -113,7 +113,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, + debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
+ (u32 *)&ecm_classifier_emesh_latency_config_enabled); + (u32 *)&ecm_classifier_emesh_latency_config_enabled);
- if (!debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, - if (!debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
- (u32 *)&ecm_classifier_sawf_enabled)) { - (u32 *)&ecm_classifier_sawf_enabled)) {
- DEBUG_ERROR("Failed to create ecm sawf classifier enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sawf classifier enabled file in debugfs\n");
@ -122,7 +122,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, + debugfs_create_u32("sawf_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
+ (u32 *)&ecm_classifier_sawf_enabled); + (u32 *)&ecm_classifier_sawf_enabled);
- if (!debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, - if (!debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
- (u32 *)&ecm_classifier_sawf_cake_enabled)) { - (u32 *)&ecm_classifier_sawf_cake_enabled)) {
- DEBUG_ERROR("Failed to create ecm sawf cake enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sawf cake enabled file in debugfs\n");
@ -131,7 +131,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, + debugfs_create_u32("cake_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
+ (u32 *)&ecm_classifier_sawf_cake_enabled); + (u32 *)&ecm_classifier_sawf_cake_enabled);
if (!debugfs_create_file("udp_ipsec_port", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry, if (!debugfs_create_file("udp_ipsec_port", S_IRUGO | S_IWUSR, ecm_classifier_emesh_sawf_dentry,
NULL, &ecm_classifier_sawf_emesh_udp_ipsec_port_fops)) { NULL, &ecm_classifier_sawf_emesh_udp_ipsec_port_fops)) {
--- a/ecm_classifier_hyfi.c --- a/ecm_classifier_hyfi.c
@ -139,7 +139,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -1111,11 +1111,8 @@ int ecm_classifier_hyfi_rules_init(struc @@ -1111,11 +1111,8 @@ int ecm_classifier_hyfi_rules_init(struc
goto classifier_task_cleanup; goto classifier_task_cleanup;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
- (u32 *)&ecm_classifier_hyfi_enabled)) { - (u32 *)&ecm_classifier_hyfi_enabled)) {
- DEBUG_ERROR("Failed to create ecm hyfi classifier enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm hyfi classifier enabled file in debugfs\n");
@ -147,7 +147,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
+ (u32 *)&ecm_classifier_hyfi_enabled); + (u32 *)&ecm_classifier_hyfi_enabled);
if (!debugfs_create_file("cmd", S_IWUSR, ecm_classifier_hyfi_dentry, if (!debugfs_create_file("cmd", S_IWUSR, ecm_classifier_hyfi_dentry,
NULL, &ecm_classifier_hyfi_cmd_fops)) { NULL, &ecm_classifier_hyfi_cmd_fops)) {
--- a/ecm_classifier_mark.c --- a/ecm_classifier_mark.c
@ -155,7 +155,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dent @@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dent
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
- (u32 *)&ecm_classifier_mark_enabled)) { - (u32 *)&ecm_classifier_mark_enabled)) {
- DEBUG_ERROR("Failed to create mark enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create mark enabled file in debugfs\n");
@ -164,7 +164,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
+ (u32 *)&ecm_classifier_mark_enabled); + (u32 *)&ecm_classifier_mark_enabled);
return 0; return 0;
} }
--- a/ecm_classifier_ovs.c --- a/ecm_classifier_ovs.c
@ -172,7 +172,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -2265,12 +2265,8 @@ int ecm_classifier_ovs_init(struct dentr @@ -2265,12 +2265,8 @@ int ecm_classifier_ovs_init(struct dentr
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
- (u32 *)&ecm_classifier_ovs_enabled)) { - (u32 *)&ecm_classifier_ovs_enabled)) {
- DEBUG_ERROR("Failed to create ovs enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create ovs enabled file in debugfs\n");
@ -181,7 +181,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry, + debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
+ (u32 *)&ecm_classifier_ovs_enabled); + (u32 *)&ecm_classifier_ovs_enabled);
return 0; return 0;
} }
--- a/ecm_classifier_pcc.c --- a/ecm_classifier_pcc.c
@ -189,7 +189,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -1246,12 +1246,8 @@ int ecm_classifier_pcc_init(struct dentr @@ -1246,12 +1246,8 @@ int ecm_classifier_pcc_init(struct dentr
return -1; return -1;
} }
- if (!debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry, - if (!debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
- (u32 *)&ecm_classifier_pcc_enabled)) { - (u32 *)&ecm_classifier_pcc_enabled)) {
- DEBUG_ERROR("Failed to create pcc enabled file in debugfs\n"); - DEBUG_ERROR("Failed to create pcc enabled file in debugfs\n");
@ -198,7 +198,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry, + debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
+ (u32 *)&ecm_classifier_pcc_enabled); + (u32 *)&ecm_classifier_pcc_enabled);
return 0; return 0;
} }
--- a/ecm_conntrack_notifier.c --- a/ecm_conntrack_notifier.c
@ -206,7 +206,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -429,12 +429,8 @@ int ecm_conntrack_notifier_init(struct d @@ -429,12 +429,8 @@ int ecm_conntrack_notifier_init(struct d
return -1; return -1;
} }
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry, - if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
- (u32 *)&ecm_conntrack_notifier_stopped)) { - (u32 *)&ecm_conntrack_notifier_stopped)) {
- DEBUG_ERROR("Failed to create ecm conntrack notifier stopped file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm conntrack notifier stopped file in debugfs\n");
@ -215,7 +215,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry, + debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
+ (u32 *)&ecm_conntrack_notifier_stopped); + (u32 *)&ecm_conntrack_notifier_stopped);
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS
/* /*
--- a/ecm_db/ecm_db_connection.c --- a/ecm_db/ecm_db_connection.c
@ -231,7 +231,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("connection_count", S_IRUGO, dentry, + debugfs_create_u32("connection_count", S_IRUGO, dentry,
+ (u32 *)&ecm_db_connection_count); + (u32 *)&ecm_db_connection_count);
if (!debugfs_create_file("connection_count_simple", S_IRUGO, dentry, if (!debugfs_create_file("connection_count_simple", S_IRUGO, dentry,
NULL, &ecm_db_connection_count_simple_fops)) { NULL, &ecm_db_connection_count_simple_fops)) {
--- a/ecm_db/ecm_db_host.c --- a/ecm_db/ecm_db_host.c
@ -239,7 +239,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -771,11 +771,8 @@ EXPORT_SYMBOL(ecm_db_host_alloc); @@ -771,11 +771,8 @@ EXPORT_SYMBOL(ecm_db_host_alloc);
bool ecm_db_host_init(struct dentry *dentry) bool ecm_db_host_init(struct dentry *dentry)
{ {
- if (!debugfs_create_u32("host_count", S_IRUGO, dentry, - if (!debugfs_create_u32("host_count", S_IRUGO, dentry,
- (u32 *)&ecm_db_host_count)) { - (u32 *)&ecm_db_host_count)) {
- DEBUG_ERROR("Failed to create ecm db host count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm db host count file in debugfs\n");
@ -247,7 +247,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("host_count", S_IRUGO, dentry, + debugfs_create_u32("host_count", S_IRUGO, dentry,
+ (u32 *)&ecm_db_host_count); + (u32 *)&ecm_db_host_count);
ecm_db_host_table = vzalloc(sizeof(struct ecm_db_host_instance *) * ECM_DB_HOST_HASH_SLOTS); ecm_db_host_table = vzalloc(sizeof(struct ecm_db_host_instance *) * ECM_DB_HOST_HASH_SLOTS);
if (!ecm_db_host_table) { if (!ecm_db_host_table) {
--- a/ecm_db/ecm_db_iface.c --- a/ecm_db/ecm_db_iface.c
@ -263,7 +263,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("iface_count", S_IRUGO, dentry, + debugfs_create_u32("iface_count", S_IRUGO, dentry,
+ (u32 *)&ecm_db_iface_count); + (u32 *)&ecm_db_iface_count);
return true; return true;
} }
--- a/ecm_db/ecm_db_mapping.c --- a/ecm_db/ecm_db_mapping.c
@ -279,7 +279,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("mapping_count", S_IRUGO, dentry, + debugfs_create_u32("mapping_count", S_IRUGO, dentry,
+ (u32 *)&ecm_db_mapping_count); + (u32 *)&ecm_db_mapping_count);
ecm_db_mapping_table = vzalloc(sizeof(struct ecm_db_mapping_instance *) * ECM_DB_MAPPING_HASH_SLOTS); ecm_db_mapping_table = vzalloc(sizeof(struct ecm_db_mapping_instance *) * ECM_DB_MAPPING_HASH_SLOTS);
if (!ecm_db_mapping_table) { if (!ecm_db_mapping_table) {
--- a/ecm_db/ecm_db_node.c --- a/ecm_db/ecm_db_node.c
@ -295,7 +295,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("node_count", S_IRUGO, dentry, + debugfs_create_u32("node_count", S_IRUGO, dentry,
+ (u32 *)&ecm_db_node_count); + (u32 *)&ecm_db_node_count);
ecm_db_node_table = vzalloc(sizeof(struct ecm_db_node_instance *) * ECM_DB_NODE_HASH_SLOTS); ecm_db_node_table = vzalloc(sizeof(struct ecm_db_node_instance *) * ECM_DB_NODE_HASH_SLOTS);
if (!ecm_db_node_table) { if (!ecm_db_node_table) {
--- a/ecm_state.c --- a/ecm_state.c
@ -303,7 +303,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -894,17 +894,11 @@ int ecm_state_init(struct dentry *dentry @@ -894,17 +894,11 @@ int ecm_state_init(struct dentry *dentry
return -1; return -1;
} }
- if (!debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry, - if (!debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
- (u32 *)&ecm_state_dev_major_id)) { - (u32 *)&ecm_state_dev_major_id)) {
- DEBUG_ERROR("Failed to create ecm state dev major file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm state dev major file in debugfs\n");
@ -311,7 +311,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry, + debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
+ (u32 *)&ecm_state_dev_major_id); + (u32 *)&ecm_state_dev_major_id);
- if (!debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry, - if (!debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
- (u32 *)&ecm_state_file_output_mask)) { - (u32 *)&ecm_state_file_output_mask)) {
- DEBUG_ERROR("Failed to create ecm state output mask file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm state output mask file in debugfs\n");
@ -319,7 +319,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry, + debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
+ (u32 *)&ecm_state_file_output_mask); + (u32 *)&ecm_state_file_output_mask);
/* /*
* Register a char device that we will use to provide a dump of our state * Register a char device that we will use to provide a dump of our state
--- a/frontends/cmn/ecm_bond_notifier.c --- a/frontends/cmn/ecm_bond_notifier.c
@ -327,7 +327,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -241,12 +241,8 @@ int ecm_bond_notifier_init(struct dentry @@ -241,12 +241,8 @@ int ecm_bond_notifier_init(struct dentry
return -1; return -1;
} }
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry, - if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry,
- (u32 *)&ecm_bond_notifier_stopped)) { - (u32 *)&ecm_bond_notifier_stopped)) {
- DEBUG_ERROR("Failed to create ecm bond notifier stopped file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm bond notifier stopped file in debugfs\n");
@ -336,7 +336,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry, + debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_bond_notifier_dentry,
+ (u32 *)&ecm_bond_notifier_stopped); + (u32 *)&ecm_bond_notifier_stopped);
/* /*
* Register Link Aggregation callbacks with the bonding driver * Register Link Aggregation callbacks with the bonding driver
--- a/frontends/ecm_front_end_ipv4.c --- a/frontends/ecm_front_end_ipv4.c
@ -352,7 +352,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry, + debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
+ (u32 *)&ecm_front_end_ipv4_stopped); + (u32 *)&ecm_front_end_ipv4_stopped);
return ecm_ipv4_init(dentry); return ecm_ipv4_init(dentry);
} }
--- a/frontends/ecm_front_end_ipv6.c --- a/frontends/ecm_front_end_ipv6.c
@ -368,7 +368,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry, + debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
+ (u32 *)&ecm_front_end_ipv6_stopped); + (u32 *)&ecm_front_end_ipv6_stopped);
return ecm_ipv6_init(dentry); return ecm_ipv6_init(dentry);
} }
--- a/frontends/nss/ecm_nss_ipv4.c --- a/frontends/nss/ecm_nss_ipv4.c
@ -376,7 +376,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -1009,41 +1009,23 @@ int ecm_nss_ipv4_init(struct dentry *den @@ -1009,41 +1009,23 @@ int ecm_nss_ipv4_init(struct dentry *den
return result; return result;
} }
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_no_action_limit_default)) { - (u32 *)&ecm_nss_ipv4_no_action_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 no_action_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 no_action_limit_default file in debugfs\n");
@ -384,7 +384,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, + debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_no_action_limit_default); + (u32 *)&ecm_nss_ipv4_no_action_limit_default);
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_driver_fail_limit_default)) { - (u32 *)&ecm_nss_ipv4_driver_fail_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 driver_fail_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 driver_fail_limit_default file in debugfs\n");
@ -392,7 +392,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, + debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_driver_fail_limit_default); + (u32 *)&ecm_nss_ipv4_driver_fail_limit_default);
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_nack_limit_default)) { - (u32 *)&ecm_nss_ipv4_nack_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 nack_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 nack_limit_default file in debugfs\n");
@ -400,7 +400,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, + debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_nack_limit_default); + (u32 *)&ecm_nss_ipv4_nack_limit_default);
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_accelerated_count)) { - (u32 *)&ecm_nss_ipv4_accelerated_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 accelerated_count file in debugfs\n");
@ -408,7 +408,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry, + debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_accelerated_count); + (u32 *)&ecm_nss_ipv4_accelerated_count);
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_pending_accel_count)) { - (u32 *)&ecm_nss_ipv4_pending_accel_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_accel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 pending_accel_count file in debugfs\n");
@ -416,7 +416,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry, + debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_pending_accel_count); + (u32 *)&ecm_nss_ipv4_pending_accel_count);
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_pending_decel_count)) { - (u32 *)&ecm_nss_ipv4_pending_decel_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_decel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 pending_decel_count file in debugfs\n");
@ -424,13 +424,13 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry, + debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_pending_decel_count); + (u32 *)&ecm_nss_ipv4_pending_decel_count);
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
NULL, &ecm_nss_ipv4_accel_limit_mode_fops)) { NULL, &ecm_nss_ipv4_accel_limit_mode_fops)) {
@@ -1074,11 +1056,8 @@ int ecm_nss_ipv4_init(struct dentry *den @@ -1074,11 +1056,8 @@ int ecm_nss_ipv4_init(struct dentry *den
goto task_cleanup; goto task_cleanup;
} }
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, - if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
- (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable)) { - (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable)) {
- DEBUG_ERROR("Failed to create ecm nss ipv4 vlan passthrough file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 vlan passthrough file in debugfs\n");
@ -438,7 +438,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry, + debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
+ (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable); + (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable);
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE #ifdef ECM_NON_PORTED_SUPPORT_ENABLE
if (!ecm_nss_non_ported_ipv4_debugfs_init(ecm_nss_ipv4_dentry)) { if (!ecm_nss_non_ported_ipv4_debugfs_init(ecm_nss_ipv4_dentry)) {
--- a/frontends/nss/ecm_nss_ipv6.c --- a/frontends/nss/ecm_nss_ipv6.c
@ -446,7 +446,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -986,41 +986,23 @@ int ecm_nss_ipv6_init(struct dentry *den @@ -986,41 +986,23 @@ int ecm_nss_ipv6_init(struct dentry *den
return result; return result;
} }
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_no_action_limit_default)) { - (u32 *)&ecm_nss_ipv6_no_action_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 no_action_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 no_action_limit_default file in debugfs\n");
@ -454,7 +454,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, + debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_no_action_limit_default); + (u32 *)&ecm_nss_ipv6_no_action_limit_default);
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_driver_fail_limit_default)) { - (u32 *)&ecm_nss_ipv6_driver_fail_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 driver_fail_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 driver_fail_limit_default file in debugfs\n");
@ -462,7 +462,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, + debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_driver_fail_limit_default); + (u32 *)&ecm_nss_ipv6_driver_fail_limit_default);
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_nack_limit_default)) { - (u32 *)&ecm_nss_ipv6_nack_limit_default)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 nack_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 nack_limit_default file in debugfs\n");
@ -470,7 +470,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, + debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_nack_limit_default); + (u32 *)&ecm_nss_ipv6_nack_limit_default);
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_accelerated_count)) { - (u32 *)&ecm_nss_ipv6_accelerated_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 accelerated_count file in debugfs\n");
@ -478,7 +478,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry, + debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_accelerated_count); + (u32 *)&ecm_nss_ipv6_accelerated_count);
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_pending_accel_count)) { - (u32 *)&ecm_nss_ipv6_pending_accel_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_accel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 pending_accel_count file in debugfs\n");
@ -486,7 +486,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry, + debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_pending_accel_count); + (u32 *)&ecm_nss_ipv6_pending_accel_count);
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_pending_decel_count)) { - (u32 *)&ecm_nss_ipv6_pending_decel_count)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_decel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 pending_decel_count file in debugfs\n");
@ -494,13 +494,13 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry, + debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_pending_decel_count); + (u32 *)&ecm_nss_ipv6_pending_decel_count);
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
NULL, &ecm_nss_ipv6_accel_limit_mode_fops)) { NULL, &ecm_nss_ipv6_accel_limit_mode_fops)) {
@@ -1051,11 +1033,8 @@ int ecm_nss_ipv6_init(struct dentry *den @@ -1051,11 +1033,8 @@ int ecm_nss_ipv6_init(struct dentry *den
goto task_cleanup; goto task_cleanup;
} }
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, - if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
- (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable)) { - (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable)) {
- DEBUG_ERROR("Failed to create ecm nss ipv6 vlan passthrough file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 vlan passthrough file in debugfs\n");
@ -508,7 +508,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry, + debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
+ (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable); + (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable);
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE #ifdef ECM_NON_PORTED_SUPPORT_ENABLE
if (!ecm_nss_non_ported_ipv6_debugfs_init(ecm_nss_ipv6_dentry)) { if (!ecm_nss_non_ported_ipv6_debugfs_init(ecm_nss_ipv6_dentry)) {
--- a/frontends/nss/ecm_nss_multicast_ipv4.c --- a/frontends/nss/ecm_nss_multicast_ipv4.c
@ -526,7 +526,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- DEBUG_ERROR("Failed to create ecm nss ipv4 multicast_accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv4 multicast_accelerated_count file in debugfs\n");
- return false; - return false;
- } - }
return true; return true;
} }
@@ -2645,11 +2639,8 @@ void ecm_nss_multicast_ipv4_stop(int num @@ -2645,11 +2639,8 @@ void ecm_nss_multicast_ipv4_stop(int num
@ -540,7 +540,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry, + debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
+ (u32 *)&ecm_front_end_ipv4_mc_stopped); + (u32 *)&ecm_front_end_ipv4_mc_stopped);
/* /*
* Register multicast update callback to MCS snooper * Register multicast update callback to MCS snooper
--- a/frontends/nss/ecm_nss_multicast_ipv6.c --- a/frontends/nss/ecm_nss_multicast_ipv6.c
@ -558,7 +558,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- DEBUG_ERROR("Failed to create ecm nss ipv6 multicast_accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm nss ipv6 multicast_accelerated_count file in debugfs\n");
- return false; - return false;
- } - }
return true; return true;
} }
@@ -2580,11 +2574,8 @@ void ecm_nss_multicast_ipv6_stop(int num @@ -2580,11 +2574,8 @@ void ecm_nss_multicast_ipv6_stop(int num
@ -572,7 +572,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry, + debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
+ (u32 *)&ecm_front_end_ipv6_mc_stopped); + (u32 *)&ecm_front_end_ipv6_mc_stopped);
/* /*
* Register multicast update callback to MCS snooper * Register multicast update callback to MCS snooper
--- a/frontends/nss/ecm_nss_non_ported_ipv4.c --- a/frontends/nss/ecm_nss_non_ported_ipv4.c
@ -588,7 +588,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
+ (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count); + (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count);
return true; return true;
} }
--- a/frontends/nss/ecm_nss_non_ported_ipv6.c --- a/frontends/nss/ecm_nss_non_ported_ipv6.c
@ -604,7 +604,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
+ (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count); + (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count);
return true; return true;
} }
--- a/frontends/nss/ecm_nss_ported_ipv4.c --- a/frontends/nss/ecm_nss_ported_ipv4.c
@ -616,7 +616,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- struct dentry *udp_dentry; - struct dentry *udp_dentry;
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]); + &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, - udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
- &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]); - &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
- if (!udp_dentry) { - if (!udp_dentry) {
@ -625,7 +625,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]); + &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, - if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
- &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) { - &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"); - DEBUG_ERROR("Failed to create ecm nss ipv4 tcp_accelerated_count file in debugfs\n");
@ -645,7 +645,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- struct dentry *udp_dentry; - struct dentry *udp_dentry;
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
+ &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]); + &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry, - udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
- &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]); - &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_UDP]);
- if (!udp_dentry) { - if (!udp_dentry) {
@ -661,14 +661,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
+ &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]); + &ecm_nss_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
return true; return true;
} }
--- a/frontends/sfe/ecm_sfe_ipv4.c --- a/frontends/sfe/ecm_sfe_ipv4.c
+++ b/frontends/sfe/ecm_sfe_ipv4.c +++ b/frontends/sfe/ecm_sfe_ipv4.c
@@ -949,48 +949,27 @@ int ecm_sfe_ipv4_init(struct dentry *den @@ -949,48 +949,27 @@ int ecm_sfe_ipv4_init(struct dentry *den
} }
#ifdef CONFIG_XFRM #ifdef CONFIG_XFRM
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec)) { - (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec)) {
@ -678,7 +678,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, + debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec); + (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec);
#endif #endif
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_no_action_limit_default)) { - (u32 *)&ecm_sfe_ipv4_no_action_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 no_action_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 no_action_limit_default file in debugfs\n");
@ -686,7 +686,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, + debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_no_action_limit_default); + (u32 *)&ecm_sfe_ipv4_no_action_limit_default);
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default)) { - (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 driver_fail_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 driver_fail_limit_default file in debugfs\n");
@ -694,7 +694,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, + debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default); + (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default);
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_nack_limit_default)) { - (u32 *)&ecm_sfe_ipv4_nack_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 nack_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 nack_limit_default file in debugfs\n");
@ -702,7 +702,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, + debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_nack_limit_default); + (u32 *)&ecm_sfe_ipv4_nack_limit_default);
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_accelerated_count)) { - (u32 *)&ecm_sfe_ipv4_accelerated_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 accelerated_count file in debugfs\n");
@ -710,7 +710,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry, + debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_accelerated_count); + (u32 *)&ecm_sfe_ipv4_accelerated_count);
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_pending_accel_count)) { - (u32 *)&ecm_sfe_ipv4_pending_accel_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_accel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_accel_count file in debugfs\n");
@ -718,7 +718,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry, + debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_pending_accel_count); + (u32 *)&ecm_sfe_ipv4_pending_accel_count);
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry, - if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
- (u32 *)&ecm_sfe_ipv4_pending_decel_count)) { - (u32 *)&ecm_sfe_ipv4_pending_decel_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_decel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_decel_count file in debugfs\n");
@ -726,14 +726,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry, + debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
+ (u32 *)&ecm_sfe_ipv4_pending_decel_count); + (u32 *)&ecm_sfe_ipv4_pending_decel_count);
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry, if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
NULL, &ecm_sfe_ipv4_accel_limit_mode_fops)) { NULL, &ecm_sfe_ipv4_accel_limit_mode_fops)) {
--- a/frontends/sfe/ecm_sfe_ipv6.c --- a/frontends/sfe/ecm_sfe_ipv6.c
+++ b/frontends/sfe/ecm_sfe_ipv6.c +++ b/frontends/sfe/ecm_sfe_ipv6.c
@@ -944,48 +944,27 @@ int ecm_sfe_ipv6_init(struct dentry *den @@ -944,48 +944,27 @@ int ecm_sfe_ipv6_init(struct dentry *den
} }
#ifdef CONFIG_XFRM #ifdef CONFIG_XFRM
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec)) { - (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec)) {
@ -743,7 +743,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, + debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec); + (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec);
#endif #endif
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_no_action_limit_default)) { - (u32 *)&ecm_sfe_ipv6_no_action_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 no_action_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 no_action_limit_default file in debugfs\n");
@ -751,7 +751,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, + debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_no_action_limit_default); + (u32 *)&ecm_sfe_ipv6_no_action_limit_default);
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default)) { - (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 driver_fail_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 driver_fail_limit_default file in debugfs\n");
@ -759,7 +759,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, + debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default); + (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default);
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_nack_limit_default)) { - (u32 *)&ecm_sfe_ipv6_nack_limit_default)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 nack_limit_default file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 nack_limit_default file in debugfs\n");
@ -767,7 +767,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, + debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_nack_limit_default); + (u32 *)&ecm_sfe_ipv6_nack_limit_default);
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_accelerated_count)) { - (u32 *)&ecm_sfe_ipv6_accelerated_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 accelerated_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 accelerated_count file in debugfs\n");
@ -775,7 +775,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry, + debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_accelerated_count); + (u32 *)&ecm_sfe_ipv6_accelerated_count);
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_pending_accel_count)) { - (u32 *)&ecm_sfe_ipv6_pending_accel_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_accel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_accel_count file in debugfs\n");
@ -783,7 +783,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry, + debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_pending_accel_count); + (u32 *)&ecm_sfe_ipv6_pending_accel_count);
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry, - if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
- (u32 *)&ecm_sfe_ipv6_pending_decel_count)) { - (u32 *)&ecm_sfe_ipv6_pending_decel_count)) {
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_decel_count file in debugfs\n"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_decel_count file in debugfs\n");
@ -791,7 +791,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry, + debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
+ (u32 *)&ecm_sfe_ipv6_pending_decel_count); + (u32 *)&ecm_sfe_ipv6_pending_decel_count);
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry, if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
NULL, &ecm_sfe_ipv6_accel_limit_mode_fops)) { NULL, &ecm_sfe_ipv6_accel_limit_mode_fops)) {
--- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c --- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c
@ -807,7 +807,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
+ (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count); + (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count);
return true; return true;
} }
--- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c --- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c
@ -823,7 +823,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
+ (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count); + (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count);
return true; return true;
} }
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c --- a/frontends/sfe/ecm_sfe_ported_ipv4.c
@ -831,7 +831,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -2070,12 +2070,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(st @@ -2070,12 +2070,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(st
return false; return false;
} }
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, - if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
- &ecm_sfe_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) { - &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"); - DEBUG_ERROR("Failed to create ecm sfe ipv4 tcp_accelerated_count file in debugfs\n");
@ -840,7 +840,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
+ &ecm_sfe_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]); + &ecm_sfe_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
return true; return true;
} }
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c --- a/frontends/sfe/ecm_sfe_ported_ipv6.c
@ -848,7 +848,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
@@ -2018,12 +2018,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(st @@ -2018,12 +2018,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(st
return false; return false;
} }
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, - if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
- &ecm_sfe_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP])) { - &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"); - DEBUG_ERROR("Failed to create ecm sfe ipv6 tcp_accelerated_count file in debugfs\n");
@ -857,6 +857,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- } - }
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry, + debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
+ &ecm_sfe_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]); + &ecm_sfe_ported_ipv6_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
return true; return true;
} }

View File

@ -18,15 +18,15 @@ Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
@@ -700,7 +700,7 @@ static void ecm_nss_ipv4_stats_sync_req_ @@ -700,7 +700,7 @@ static void ecm_nss_ipv4_stats_sync_req_
} }
spin_unlock_bh(&ecm_nss_ipv4_lock); spin_unlock_bh(&ecm_nss_ipv4_lock);
- usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY); - usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY);
+ msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000); + msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000);
/* /*
* If index is 0, we are starting a new round, but if we still have time remain * If index is 0, we are starting a new round, but if we still have time remain
@@ -714,7 +714,7 @@ static void ecm_nss_ipv4_stats_sync_req_ @@ -714,7 +714,7 @@ static void ecm_nss_ipv4_stats_sync_req_
} }
if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) { if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) {
- msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); - msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies)); + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
@ -38,15 +38,15 @@ Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
@@ -676,7 +676,7 @@ static void ecm_nss_ipv6_stats_sync_req_ @@ -676,7 +676,7 @@ static void ecm_nss_ipv6_stats_sync_req_
} }
spin_unlock_bh(&ecm_nss_ipv6_lock); spin_unlock_bh(&ecm_nss_ipv6_lock);
- usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY); - usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY);
+ msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000); + msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000);
/* /*
* If index is 0, we are starting a new round, but if we still have time remain * If index is 0, we are starting a new round, but if we still have time remain
@@ -690,7 +690,7 @@ static void ecm_nss_ipv6_stats_sync_req_ @@ -690,7 +690,7 @@ static void ecm_nss_ipv6_stats_sync_req_
} }
if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) { if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) {
- msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); - msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies)); + msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));

View File

@ -25,7 +25,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+#else +#else
+ struct kvec iov; + struct kvec iov;
+#endif +#endif
iov.iov_base = buf; iov.iov_base = buf;
iov.iov_len = len; iov.iov_len = len;
@@ -8024,7 +8028,8 @@ static int ecm_interface_wifi_event_rx(s @@ -8024,7 +8028,8 @@ static int ecm_interface_wifi_event_rx(s
@ -40,11 +40,11 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
@@ -8035,6 +8040,9 @@ static int ecm_interface_wifi_event_rx(s @@ -8035,6 +8040,9 @@ static int ecm_interface_wifi_event_rx(s
set_fs(oldfs); set_fs(oldfs);
return size; return size;
+#else +#else
+ return kernel_recvmsg(sock, &msg, &iov, 1, iov.iov_len, 0); + return kernel_recvmsg(sock, &msg, &iov, 1, iov.iov_len, 0);
+#endif +#endif
} }
/* /*

View File

@ -24,12 +24,12 @@ Subject: [PATCH] treewide: rework notifier changes for 5.15
- struct nf_ct_event *item = (struct nf_ct_event *)ptr; - struct nf_ct_event *item = (struct nf_ct_event *)ptr;
-#endif -#endif
struct nf_conn *ct = item->ct; struct nf_conn *ct = item->ct;
/* /*
@@ -387,23 +380,17 @@ static int ecm_conntrack_event(unsigned @@ -387,23 +380,17 @@ static int ecm_conntrack_event(unsigned
return NOTIFY_DONE; return NOTIFY_DONE;
} }
-#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS -#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
-/* -/*
- * struct notifier_block ecm_conntrack_notifier - * struct notifier_block ecm_conntrack_notifier
@ -53,7 +53,7 @@ Subject: [PATCH] treewide: rework notifier changes for 5.15
#endif #endif
+}; +};
#endif #endif
/* /*
@@ -436,12 +423,16 @@ int ecm_conntrack_notifier_init(struct d @@ -436,12 +423,16 @@ int ecm_conntrack_notifier_init(struct d
/* /*
@ -70,7 +70,7 @@ Subject: [PATCH] treewide: rework notifier changes for 5.15
+#else +#else
+ nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier); + nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier);
+#endif +#endif
/* /*
* Hold netns reference to keep the basic conntrack alive and * Hold netns reference to keep the basic conntrack alive and
@@ -483,7 +474,11 @@ void ecm_conntrack_notifier_exit(void) @@ -483,7 +474,11 @@ void ecm_conntrack_notifier_exit(void)

View File

@ -29,7 +29,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
+int32_t ecm_tracker_datagram_datagram_size_get(struct ecm_tracker_datagram_instance *uti, ecm_tracker_sender_type_t sender, int32_t i) +int32_t ecm_tracker_datagram_datagram_size_get(struct ecm_tracker_datagram_instance *uti, ecm_tracker_sender_type_t sender, int32_t i)
{ {
struct ecm_tracker_datagram_internal_instance *dtii = (struct ecm_tracker_datagram_internal_instance *)uti; struct ecm_tracker_datagram_internal_instance *dtii = (struct ecm_tracker_datagram_internal_instance *)uti;
@@ -412,7 +412,7 @@ static int32_t ecm_tracker_datagram_data @@ -412,7 +412,7 @@ static int32_t ecm_tracker_datagram_data
* ecm_tracker_datagram_datagram_read() * ecm_tracker_datagram_datagram_read()
* Read size bytes from datagram at index i into the buffer * Read size bytes from datagram at index i into the buffer

View File

@ -23,7 +23,7 @@ instead or relying on a downstream api not present upstream.
+ struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct));
+ timeouts = un->timeouts; + timeouts = un->timeouts;
} }
spin_lock_bh(&ct->lock); spin_lock_bh(&ct->lock);
--- a/frontends/nss/ecm_nss_ipv6.c --- a/frontends/nss/ecm_nss_ipv6.c
+++ b/frontends/nss/ecm_nss_ipv6.c +++ b/frontends/nss/ecm_nss_ipv6.c
@ -35,7 +35,7 @@ instead or relying on a downstream api not present upstream.
+ struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct));
+ timeouts = un->timeouts; + timeouts = un->timeouts;
} }
spin_lock_bh(&ct->lock); spin_lock_bh(&ct->lock);
--- a/frontends/sfe/ecm_sfe_ipv4.c --- a/frontends/sfe/ecm_sfe_ipv4.c
+++ b/frontends/sfe/ecm_sfe_ipv4.c +++ b/frontends/sfe/ecm_sfe_ipv4.c
@ -47,7 +47,7 @@ instead or relying on a downstream api not present upstream.
+ struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct));
+ timeouts = un->timeouts; + timeouts = un->timeouts;
} }
spin_lock_bh(&ct->lock); spin_lock_bh(&ct->lock);
--- a/frontends/sfe/ecm_sfe_ipv6.c --- a/frontends/sfe/ecm_sfe_ipv6.c
+++ b/frontends/sfe/ecm_sfe_ipv6.c +++ b/frontends/sfe/ecm_sfe_ipv6.c
@ -59,5 +59,5 @@ instead or relying on a downstream api not present upstream.
+ struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct)); + struct nf_udp_net *un = nf_udp_pernet(nf_ct_net(ct));
+ timeouts = un->timeouts; + timeouts = un->timeouts;
} }
spin_lock_bh(&ct->lock); spin_lock_bh(&ct->lock);

View File

@ -3,12 +3,12 @@
@@ -3612,7 +3612,7 @@ identifier_update: @@ -3612,7 +3612,7 @@ identifier_update:
if (skb && (skb->skb_iif == dev->ifindex)) { if (skb && (skb->skb_iif == dev->ifindex)) {
struct pppol2tp_common_addr info; struct pppol2tp_common_addr info;
- if (__ppp_is_multilink(dev) > 0) { - if (__ppp_is_multilink(dev) > 0) {
+ if (ppp_is_multilink(dev) > 0) { + if (ppp_is_multilink(dev) > 0) {
DEBUG_TRACE("%px: Net device: %px is MULTILINK PPP - Unknown to the ECM\n", feci, dev); DEBUG_TRACE("%px: Net device: %px is MULTILINK PPP - Unknown to the ECM\n", feci, dev);
type_info.unknown.os_specific_ident = dev_interface_num; type_info.unknown.os_specific_ident = dev_interface_num;
@@ -3622,7 +3622,7 @@ identifier_update: @@ -3622,7 +3622,7 @@ identifier_update:
ii = ecm_interface_unknown_interface_establish(&type_info.unknown, dev_name, dev_interface_num, ae_interface_num, dev_mtu); ii = ecm_interface_unknown_interface_establish(&type_info.unknown, dev_name, dev_interface_num, ae_interface_num, dev_mtu);
return ii; return ii;

View File

@ -1,34 +1,34 @@
--- a/frontends/nss/ecm_nss_common.c --- a/frontends/nss/ecm_nss_common.c
+++ b/frontends/nss/ecm_nss_common.c +++ b/frontends/nss/ecm_nss_common.c
@@ -67,6 +67,7 @@ bool ecm_nss_ipv6_is_conn_limit_reached( @@ -67,6 +67,7 @@ bool ecm_nss_ipv6_is_conn_limit_reached(
return false; return false;
} }
+EXPORT_SYMBOL(ecm_nss_ipv6_is_conn_limit_reached); +EXPORT_SYMBOL(ecm_nss_ipv6_is_conn_limit_reached);
#endif #endif
/* /*
@@ -116,3 +117,4 @@ bool ecm_nss_ipv4_is_conn_limit_reached( @@ -116,3 +117,4 @@ bool ecm_nss_ipv4_is_conn_limit_reached(
return false; return false;
} }
+EXPORT_SYMBOL(ecm_nss_ipv4_is_conn_limit_reached); +EXPORT_SYMBOL(ecm_nss_ipv4_is_conn_limit_reached);
--- a/frontends/nss/ecm_nss_non_ported_ipv4.c --- a/frontends/nss/ecm_nss_non_ported_ipv4.c
+++ b/frontends/nss/ecm_nss_non_ported_ipv4.c +++ b/frontends/nss/ecm_nss_non_ported_ipv4.c
@@ -1824,6 +1824,7 @@ struct ecm_front_end_connection_instance @@ -1824,6 +1824,7 @@ struct ecm_front_end_connection_instance
return feci; return feci;
} }
+EXPORT_SYMBOL(ecm_nss_non_ported_ipv4_connection_instance_alloc); +EXPORT_SYMBOL(ecm_nss_non_ported_ipv4_connection_instance_alloc);
/* /*
* ecm_nss_non_ported_ipv4_debugfs_init() * ecm_nss_non_ported_ipv4_debugfs_init()
--- a/frontends/nss/ecm_nss_non_ported_ipv4.h --- a/frontends/nss/ecm_nss_non_ported_ipv4.h
+++ b/frontends/nss/ecm_nss_non_ported_ipv4.h +++ b/frontends/nss/ecm_nss_non_ported_ipv4.h
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
extern bool ecm_nss_non_ported_ipv4_debugfs_init(struct dentry *dentry); extern bool ecm_nss_non_ported_ipv4_debugfs_init(struct dentry *dentry);
-extern struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv4_connection_instance_alloc( -extern struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv4_connection_instance_alloc(
+struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv4_connection_instance_alloc( +struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv4_connection_instance_alloc(
uint32_t accel_flags, uint32_t accel_flags,
@ -37,19 +37,19 @@
--- a/frontends/nss/ecm_nss_non_ported_ipv6.c --- a/frontends/nss/ecm_nss_non_ported_ipv6.c
+++ b/frontends/nss/ecm_nss_non_ported_ipv6.c +++ b/frontends/nss/ecm_nss_non_ported_ipv6.c
@@ -1650,6 +1650,7 @@ struct ecm_front_end_connection_instance @@ -1650,6 +1650,7 @@ struct ecm_front_end_connection_instance
return feci; return feci;
} }
+EXPORT_SYMBOL(ecm_nss_non_ported_ipv6_connection_instance_alloc); +EXPORT_SYMBOL(ecm_nss_non_ported_ipv6_connection_instance_alloc);
/* /*
* ecm_nss_non_ported_ipv6_debugfs_init() * ecm_nss_non_ported_ipv6_debugfs_init()
--- a/frontends/nss/ecm_nss_non_ported_ipv6.h --- a/frontends/nss/ecm_nss_non_ported_ipv6.h
+++ b/frontends/nss/ecm_nss_non_ported_ipv6.h +++ b/frontends/nss/ecm_nss_non_ported_ipv6.h
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
extern bool ecm_nss_non_ported_ipv6_debugfs_init(struct dentry *dentry); extern bool ecm_nss_non_ported_ipv6_debugfs_init(struct dentry *dentry);
-extern struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv6_connection_instance_alloc( -extern struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv6_connection_instance_alloc(
+struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv6_connection_instance_alloc( +struct ecm_front_end_connection_instance *ecm_nss_non_ported_ipv6_connection_instance_alloc(
uint32_t accel_flags, uint32_t accel_flags,
@ -58,19 +58,19 @@
--- a/frontends/nss/ecm_nss_ported_ipv4.c --- a/frontends/nss/ecm_nss_ported_ipv4.c
+++ b/frontends/nss/ecm_nss_ported_ipv4.c +++ b/frontends/nss/ecm_nss_ported_ipv4.c
@@ -1884,6 +1884,7 @@ struct ecm_front_end_connection_instance @@ -1884,6 +1884,7 @@ struct ecm_front_end_connection_instance
return feci; return feci;
} }
+EXPORT_SYMBOL(ecm_nss_ported_ipv4_connection_instance_alloc); +EXPORT_SYMBOL(ecm_nss_ported_ipv4_connection_instance_alloc);
/* /*
* ecm_nss_ported_ipv4_debugfs_init() * ecm_nss_ported_ipv4_debugfs_init()
--- a/frontends/nss/ecm_nss_ported_ipv4.h --- a/frontends/nss/ecm_nss_ported_ipv4.h
+++ b/frontends/nss/ecm_nss_ported_ipv4.h +++ b/frontends/nss/ecm_nss_ported_ipv4.h
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
extern bool ecm_nss_ported_ipv4_debugfs_init(struct dentry *dentry); extern bool ecm_nss_ported_ipv4_debugfs_init(struct dentry *dentry);
-extern struct ecm_front_end_connection_instance *ecm_nss_ported_ipv4_connection_instance_alloc( -extern struct ecm_front_end_connection_instance *ecm_nss_ported_ipv4_connection_instance_alloc(
+struct ecm_front_end_connection_instance *ecm_nss_ported_ipv4_connection_instance_alloc( +struct ecm_front_end_connection_instance *ecm_nss_ported_ipv4_connection_instance_alloc(
uint32_t accel_flags, uint32_t accel_flags,
@ -79,19 +79,19 @@
--- a/frontends/nss/ecm_nss_ported_ipv6.c --- a/frontends/nss/ecm_nss_ported_ipv6.c
+++ b/frontends/nss/ecm_nss_ported_ipv6.c +++ b/frontends/nss/ecm_nss_ported_ipv6.c
@@ -1797,6 +1797,7 @@ struct ecm_front_end_connection_instance @@ -1797,6 +1797,7 @@ struct ecm_front_end_connection_instance
return feci; return feci;
} }
+EXPORT_SYMBOL(ecm_nss_ported_ipv6_connection_instance_alloc); +EXPORT_SYMBOL(ecm_nss_ported_ipv6_connection_instance_alloc);
/* /*
* ecm_nss_ported_ipv6_debugfs_init() * ecm_nss_ported_ipv6_debugfs_init()
--- a/frontends/nss/ecm_nss_ported_ipv6.h --- a/frontends/nss/ecm_nss_ported_ipv6.h
+++ b/frontends/nss/ecm_nss_ported_ipv6.h +++ b/frontends/nss/ecm_nss_ported_ipv6.h
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
extern bool ecm_nss_ported_ipv6_debugfs_init(struct dentry *dentry); extern bool ecm_nss_ported_ipv6_debugfs_init(struct dentry *dentry);
-extern struct ecm_front_end_connection_instance *ecm_nss_ported_ipv6_connection_instance_alloc( -extern struct ecm_front_end_connection_instance *ecm_nss_ported_ipv6_connection_instance_alloc(
+struct ecm_front_end_connection_instance *ecm_nss_ported_ipv6_connection_instance_alloc( +struct ecm_front_end_connection_instance *ecm_nss_ported_ipv6_connection_instance_alloc(
uint32_t accel_flags, uint32_t accel_flags,

View File

@ -48,14 +48,15 @@ Signed-off-By: Francis Le Bourse <francis.lebourse@sfr.fr>
*/ */
- ipv6_addr_prefix(&prefix_addr, &ecm_in6, cfg->fc_dst_len); - ipv6_addr_prefix(&prefix_addr, &ecm_in6, cfg->fc_dst_len);
+ ipv6_addr_prefix(&prefix_addr, &ecm_in6, min(128, cfg->fc_dst_len)); + ipv6_addr_prefix(&prefix_addr, &ecm_in6, min(128, cfg->fc_dst_len));
DEBUG_TRACE("dest addr prefix: %pI6 prefix_len: %d ecm_in6: %pI6\n", &prefix_addr, cfg->fc_dst_len, &ecm_in6); DEBUG_TRACE("dest addr prefix: %pI6 prefix_len: %d ecm_in6: %pI6\n", &prefix_addr, cfg->fc_dst_len, &ecm_in6);
@@ -326,7 +326,7 @@ static int ecm_db_ipv6_route_table_updat @@ -326,7 +326,7 @@ static int ecm_db_ipv6_route_table_updat
* Compute ECM connection's prefix source address by masking it with the * Compute ECM connection's prefix source address by masking it with the
* route config's destination address prefix length. * route config's destination address prefix length.
*/ */
- ipv6_addr_prefix(&prefix_addr, &ecm_in6, cfg->fc_dst_len); - ipv6_addr_prefix(&prefix_addr, &ecm_in6, cfg->fc_dst_len);
+ ipv6_addr_prefix(&prefix_addr, &ecm_in6, min(128, cfg->fc_dst_len)); + ipv6_addr_prefix(&prefix_addr, &ecm_in6, min(128, cfg->fc_dst_len));
DEBUG_TRACE("src addr prefix: %pI6 prefix_len: %d ecm_in6: %pI6\n", &prefix_addr, cfg->fc_dst_len, &ecm_in6); DEBUG_TRACE("src addr prefix: %pI6 prefix_len: %d ecm_in6: %pI6\n", &prefix_addr, cfg->fc_dst_len, &ecm_in6);