mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
qca-nss-ecm: update to 12.4
This commit is contained in:
parent
f91a55312f
commit
26328421f0
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2023-04-26
|
||||
PKG_SOURCE_VERSION:=f9b52bfceedca844c61e2e3df2078be8ee736853
|
||||
PKG_MIRROR_HASH:=16d6d10b9544be68758736dee1c0e5c616fb1cf406646fbdf3e7a8db3844e7b3
|
||||
PKG_SOURCE_DATE:=2023-10-20
|
||||
PKG_SOURCE_VERSION:=82b27915fffdbe2cdb2d4eb70e5736ccf92e2560
|
||||
PKG_MIRROR_HASH:=643895cb187cacfcde337c19dc5a34512acc225c0db1813a15cc1b66523835c4
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
@ -14,7 +14,16 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -130,10 +130,18 @@ ccflags-$(ECM_INTERFACE_BOND_ENABLE) +=
|
||||
@@ -17,7 +17,7 @@
|
||||
# ###################################################
|
||||
# Makefile for the QCA NSS ECM
|
||||
# ###################################################
|
||||
-ifneq ($(findstring 6.1., $(KERNELVERSION)),)
|
||||
+ifneq ($(findstring 6.2., $(KERNELVERSION)),)
|
||||
include $(obj)/Makefile_61.mk
|
||||
else
|
||||
ifeq ($(ECM_FRONT_END_SFE_ENABLE), y)
|
||||
@@ -134,10 +134,18 @@ ccflags-$(ECM_INTERFACE_BOND_ENABLE) +=
|
||||
# Define ECM_INTERFACE_PPPOE_ENABLE=y in order
|
||||
# to enable support for PPPoE acceleration.
|
||||
# #############################################################################
|
||||
@ -34,7 +43,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
# Define ECM_INTERFACE_L2TPV2_ENABLE=y in order
|
||||
# to enable support for l2tpv2 acceleration.
|
||||
# #############################################################################
|
||||
@@ -160,6 +168,12 @@ endif
|
||||
@@ -164,6 +172,12 @@ endif
|
||||
ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -DECM_INTERFACE_PPP_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
@ -47,7 +56,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
# Define ECM_INTERFACE_GRE_TAP_ENABLE=y in order
|
||||
# to enable support for GRE TAP interface.
|
||||
# #############################################################################
|
||||
@@ -242,7 +256,9 @@ ccflags-$(ECM_INTERFACE_OVS_BRIDGE_ENABL
|
||||
@@ -246,7 +260,9 @@ ccflags-$(ECM_INTERFACE_OVS_BRIDGE_ENABL
|
||||
# #############################################################################
|
||||
# Define ECM_INTERFACE_VLAN_ENABLE=y in order to enable support for VLAN
|
||||
# #############################################################################
|
||||
@ -58,7 +67,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
@@ -284,7 +300,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) +=
|
||||
@@ -288,7 +304,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) +=
|
||||
# #############################################################################
|
||||
# Define ECM_CLASSIFIER_MARK_ENABLE=y in order to enable mark classifier.
|
||||
# #############################################################################
|
||||
@ -69,7 +78,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o
|
||||
ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE
|
||||
|
||||
@@ -308,7 +326,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -
|
||||
@@ -312,7 +330,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -
|
||||
# #############################################################################
|
||||
# Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier.
|
||||
# #############################################################################
|
||||
@ -80,7 +89,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
ecm-$(ECM_CLASSIFIER_DSCP_ENABLE) += ecm_classifier_dscp.o
|
||||
ccflags-$(ECM_CLASSIFIER_DSCP_ENABLE) += -DECM_CLASSIFIER_DSCP_ENABLE
|
||||
ccflags-$(ECM_CLASSIFIER_DSCP_IGS) += -DECM_CLASSIFIER_DSCP_IGS
|
||||
@@ -327,7 +347,9 @@ ccflags-$(ECM_CLASSIFIER_HYFI_ENABLE) +=
|
||||
@@ -331,7 +351,9 @@ ccflags-$(ECM_CLASSIFIER_HYFI_ENABLE) +=
|
||||
# the Parental Controls subsystem classifier in ECM. Currently disabled until
|
||||
# customers require it / if they need to integrate their Parental Controls with it.
|
||||
# #############################################################################
|
||||
@ -91,7 +100,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o
|
||||
ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE
|
||||
|
||||
@@ -368,27 +390,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE)
|
||||
@@ -372,27 +394,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE)
|
||||
# #############################################################################
|
||||
# Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output
|
||||
# #############################################################################
|
||||
@ -131,7 +140,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
@@ -396,14 +427,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE
|
||||
@@ -400,14 +431,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE
|
||||
# support for the database keeping lists of connections that are assigned
|
||||
# on a per TYPE of classifier basis.
|
||||
# #############################################################################
|
||||
@ -234,7 +243,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -1483,6 +1483,7 @@ struct neighbour *ecm_interface_ipv6_nei
|
||||
@@ -1509,6 +1509,7 @@ struct neighbour *ecm_interface_ipv6_nei
|
||||
*/
|
||||
bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out)
|
||||
{
|
||||
@ -242,7 +251,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
struct net_device *in;
|
||||
|
||||
/*
|
||||
@@ -1507,6 +1508,7 @@ bool ecm_interface_is_pptp(struct sk_buf
|
||||
@@ -1533,6 +1534,7 @@ bool ecm_interface_is_pptp(struct sk_buf
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
@ -250,7 +259,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1519,6 +1521,7 @@ bool ecm_interface_is_pptp(struct sk_buf
|
||||
@@ -1545,6 +1547,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)
|
||||
{
|
||||
@ -258,7 +267,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
uint32_t flag = 0;
|
||||
struct net_device *in;
|
||||
|
||||
@@ -1551,6 +1554,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
@@ -1577,6 +1580,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
@ -266,7 +275,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1563,6 +1567,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
@@ -1589,6 +1593,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
*/
|
||||
bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *out)
|
||||
{
|
||||
@ -274,7 +283,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
struct net_device *in;
|
||||
|
||||
/*
|
||||
@@ -1585,6 +1590,7 @@ bool ecm_interface_is_l2tp_pptp(struct s
|
||||
@@ -1611,6 +1616,7 @@ bool ecm_interface_is_l2tp_pptp(struct s
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
@ -282,7 +291,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7120,6 +7126,7 @@ static void ecm_interface_regenerate_con
|
||||
@@ -7127,6 +7133,7 @@ static void ecm_interface_regenerate_con
|
||||
return;
|
||||
}
|
||||
|
||||
@ -290,7 +299,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
for (dir = 0; dir < ECM_DB_OBJ_DIR_MAX; dir++) {
|
||||
/*
|
||||
* Re-generate all connections associated with this interface
|
||||
@@ -7135,6 +7142,7 @@ static void ecm_interface_regenerate_con
|
||||
@@ -7142,6 +7149,7 @@ static void ecm_interface_regenerate_con
|
||||
ci[dir] = cin;
|
||||
}
|
||||
}
|
||||
@ -300,15 +309,15 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
/*
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -491,6 +491,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
struct nf_conntrack_tuple *tuple,
|
||||
@@ -517,6 +517,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
struct nf_conntrack_tuple *reply_tuple,
|
||||
int ip_version, uint16_t offset)
|
||||
{
|
||||
+#ifdef ECM_INTERFACE_GRE_ENABLE
|
||||
struct net_device *dev;
|
||||
struct gre_base_hdr *greh;
|
||||
|
||||
@@ -502,10 +503,12 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
@@ -528,10 +529,12 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
/*
|
||||
* Case 1: PPTP locally terminated
|
||||
*/
|
||||
@ -321,9 +330,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
/*
|
||||
* Case 2: PPTP pass through
|
||||
@@ -613,6 +616,10 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
@@ -657,6 +660,10 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
*/
|
||||
DEBUG_TRACE("%px: GRE IPv%d pass through - allow acceleration\n", skb, ip_version);
|
||||
DEBUG_TRACE("%px: GRE IPv%d pass through non NAT - allow acceleration\n", skb, ip_version);
|
||||
return true;
|
||||
+#else
|
||||
+ DEBUG_TRACE("%px: GRE%d feature is disabled - do not allow acceleration\n", skb, ip_version);
|
||||
|
||||
@ -1,26 +1,32 @@
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -336,7 +336,7 @@ static struct net_device *ecm_interface_
|
||||
struct net_device *dev;
|
||||
@@ -339,9 +339,9 @@ static struct net_device *ecm_interface_
|
||||
|
||||
ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1);
|
||||
+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1);
|
||||
#else
|
||||
- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, NULL);
|
||||
+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1);
|
||||
#endif
|
||||
return dev;
|
||||
}
|
||||
#endif
|
||||
@@ -779,7 +779,7 @@ static bool ecm_interface_mac_addr_get_i
|
||||
* Get the MAC address that corresponds to IP address given.
|
||||
@@ -802,9 +802,9 @@ static bool ecm_interface_mac_addr_get_i
|
||||
*/
|
||||
ECM_IP_ADDR_TO_NIN6_ADDR(daddr, addr);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
- local_dev = ipv6_dev_find(&init_net, &daddr, 1);
|
||||
+ local_dev = ipv6_dev_find_and_hold(&init_net, &daddr, 1);
|
||||
#else
|
||||
- local_dev = ipv6_dev_find(&init_net, &daddr, NULL);
|
||||
+ local_dev = ipv6_dev_find_and_hold(&init_net, &daddr, 1);
|
||||
#endif
|
||||
if (local_dev) {
|
||||
DEBUG_TRACE("%pi6 is a local address\n", &daddr);
|
||||
memcpy(mac_addr, dev->dev_addr, ETH_ALEN);
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -102,6 +102,10 @@
|
||||
@@ -103,6 +103,10 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -28,24 +34,30 @@
|
||||
+#include "ecm_front_end_ipv6.h"
|
||||
+#endif
|
||||
+
|
||||
#ifdef ECM_FRONT_END_FSE_ENABLE
|
||||
/*
|
||||
* Sysctl table header
|
||||
*/
|
||||
@@ -578,7 +582,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
}
|
||||
* Callback object for ECM frontend interaction with wlan driver to add/delete FSE rules.
|
||||
@@ -614,9 +618,9 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
} else {
|
||||
#ifdef ECM_IPV6_ENABLE
|
||||
- dev = ipv6_dev_find(&init_net, &(tuple->src.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->src.u3.in6), 1);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
- dev = ipv6_dev_find(&init_net, &(orig_tuple->src.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(orig_tuple->src.u3.in6), 1);
|
||||
#else
|
||||
- dev = ipv6_dev_find(&init_net, &(orig_tuple->src.u3.in6), NULL);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(orig_tuple->src.u3.in6), 1);
|
||||
#endif
|
||||
if (dev) {
|
||||
/*
|
||||
* Source IP address is local
|
||||
@@ -588,7 +592,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
return false;
|
||||
@@ -628,9 +632,9 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
}
|
||||
|
||||
- dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
- dev = ipv6_dev_find(&init_net, &(orig_tuple->dst.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(orig_tuple->dst.u3.in6), 1);
|
||||
#else
|
||||
- dev = ipv6_dev_find(&init_net, &(orig_tuple->dst.u3.in6), NULL);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(orig_tuple->dst.u3.in6), 1);
|
||||
#endif
|
||||
if (dev) {
|
||||
/*
|
||||
* Destination IP address is local
|
||||
|
||||
@ -1,862 +0,0 @@
|
||||
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(-)
|
||||
|
||||
--- a/ecm_classifier_default.c
|
||||
+++ b/ecm_classifier_default.c
|
||||
@@ -760,26 +760,14 @@ int ecm_classifier_default_init(struct d
|
||||
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;
|
||||
}
|
||||
--- a/ecm_classifier_dscp.c
|
||||
+++ b/ecm_classifier_dscp.c
|
||||
@@ -816,12 +816,8 @@ int ecm_classifier_dscp_init(struct dent
|
||||
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;
|
||||
}
|
||||
--- a/ecm_classifier_emesh.c
|
||||
+++ b/ecm_classifier_emesh.c
|
||||
@@ -2059,33 +2059,17 @@ int ecm_classifier_emesh_sawf_init(struc
|
||||
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);
|
||||
|
||||
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)) {
|
||||
--- a/ecm_classifier_hyfi.c
|
||||
+++ b/ecm_classifier_hyfi.c
|
||||
@@ -1111,11 +1111,8 @@ int ecm_classifier_hyfi_rules_init(struc
|
||||
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)) {
|
||||
--- a/ecm_classifier_mark.c
|
||||
+++ b/ecm_classifier_mark.c
|
||||
@@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dent
|
||||
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;
|
||||
}
|
||||
--- a/ecm_classifier_ovs.c
|
||||
+++ b/ecm_classifier_ovs.c
|
||||
@@ -2265,12 +2265,8 @@ int ecm_classifier_ovs_init(struct dentr
|
||||
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;
|
||||
}
|
||||
--- a/ecm_classifier_pcc.c
|
||||
+++ b/ecm_classifier_pcc.c
|
||||
@@ -1246,12 +1246,8 @@ int ecm_classifier_pcc_init(struct dentr
|
||||
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;
|
||||
}
|
||||
--- a/ecm_conntrack_notifier.c
|
||||
+++ b/ecm_conntrack_notifier.c
|
||||
@@ -429,12 +429,8 @@ int ecm_conntrack_notifier_init(struct d
|
||||
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
|
||||
/*
|
||||
--- a/ecm_db/ecm_db_connection.c
|
||||
+++ b/ecm_db/ecm_db_connection.c
|
||||
@@ -4378,11 +4378,8 @@ static struct file_operations ecm_db_con
|
||||
*/
|
||||
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)) {
|
||||
--- 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) {
|
||||
--- 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;
|
||||
}
|
||||
--- 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) {
|
||||
--- 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) {
|
||||
--- 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
|
||||
--- 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
|
||||
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
|
||||
--- 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);
|
||||
}
|
||||
--- 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);
|
||||
}
|
||||
--- 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 *den
|
||||
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 *den
|
||||
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)) {
|
||||
--- 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 *den
|
||||
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 *den
|
||||
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)) {
|
||||
--- 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_u
|
||||
*/
|
||||
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
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
- }
|
||||
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_FRONT_END_PORTED_PROTO_TCP]);
|
||||
|
||||
- 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;
|
||||
- }
|
||||
-
|
||||
- return true;
|
||||
+ return true;
|
||||
}
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
--- a/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
|
||||
}
|
||||
|
||||
#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)) {
|
||||
--- a/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
|
||||
}
|
||||
|
||||
#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)) {
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
--- 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
|
||||
*/
|
||||
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;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
@@ -2070,12 +2070,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(st
|
||||
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;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
@@ -2018,12 +2018,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(st
|
||||
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;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
From 5a91820d390b36dafd29075b55504827b0123e62 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 8 May 2022 17:51:16 +0200
|
||||
Subject: [PATCH 06/12] ecm_interface: switch to kernel_recvmsg api
|
||||
|
||||
set/get_fs() got dropped in 5.11+ kernel. Convert it to kernel_recvmsg
|
||||
while fixing this deprecation.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
ecm_interface.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -8012,9 +8012,13 @@ static int ecm_interface_wifi_event_hand
|
||||
static int ecm_interface_wifi_event_rx(struct socket *sock, struct sockaddr_nl *addr, unsigned char *buf, int len)
|
||||
{
|
||||
struct msghdr msg;
|
||||
- struct iovec iov;
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||
+ struct iovec iov;
|
||||
mm_segment_t oldfs;
|
||||
int size;
|
||||
+#else
|
||||
+ struct kvec iov;
|
||||
+#endif
|
||||
|
||||
iov.iov_base = buf;
|
||||
iov.iov_len = len;
|
||||
@@ -8024,7 +8028,8 @@ static int ecm_interface_wifi_event_rx(s
|
||||
msg.msg_namelen = sizeof(struct sockaddr_nl);
|
||||
msg.msg_control = NULL;
|
||||
msg.msg_controllen = 0;
|
||||
- oldfs = get_fs();
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
|
||||
+ oldfs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
iov_iter_init(&msg.msg_iter, READ, &iov, 1, len);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0))
|
||||
@@ -8035,6 +8040,9 @@ static int ecm_interface_wifi_event_rx(s
|
||||
set_fs(oldfs);
|
||||
|
||||
return size;
|
||||
+#else
|
||||
+ return kernel_recvmsg(sock, &msg, &iov, 1, iov.iov_len, 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -55,7 +55,7 @@ Subject: [PATCH] treewide: rework notifier changes for 5.15
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -436,12 +423,16 @@ int ecm_conntrack_notifier_init(struct d
|
||||
@@ -440,12 +427,16 @@ int ecm_conntrack_notifier_init(struct d
|
||||
/*
|
||||
* Eventing subsystem is available so we register a notifier hook to get fast notifications of expired connections
|
||||
*/
|
||||
@ -73,7 +73,7 @@ Subject: [PATCH] treewide: rework notifier changes for 5.15
|
||||
|
||||
/*
|
||||
* Hold netns reference to keep the basic conntrack alive and
|
||||
@@ -483,7 +474,11 @@ void ecm_conntrack_notifier_exit(void)
|
||||
@@ -487,7 +478,11 @@ void ecm_conntrack_notifier_exit(void)
|
||||
#ifdef ECM_IPV6_ENABLE
|
||||
nf_ct_netns_put(&init_net, NFPROTO_IPV6);
|
||||
#endif
|
||||
|
||||
@ -1,141 +0,0 @@
|
||||
From 15530431f3ce3273b3cfc2da356d7fb71ed48020 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sun, 8 May 2022 16:16:34 +0200
|
||||
Subject: [PATCH 08/12] frontends: drop use of static be_liberal and
|
||||
no_window_check
|
||||
|
||||
Implementation changed, check these values indirectly instead of relying
|
||||
on an extern EXPORT_SYMBOL.
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
frontends/nss/ecm_nss_ported_ipv4.c | 14 ++++----------
|
||||
frontends/nss/ecm_nss_ported_ipv6.c | 14 ++++----------
|
||||
frontends/sfe/ecm_sfe_ported_ipv4.c | 6 ++++--
|
||||
frontends/sfe/ecm_sfe_ported_ipv6.c | 6 ++++--
|
||||
4 files changed, 16 insertions(+), 24 deletions(-)
|
||||
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
@@ -100,14 +100,6 @@ static int ecm_nss_ported_ipv4_accelerat
|
||||
/* Array of Number of TCP and UDP connections currently offloaded */
|
||||
|
||||
/*
|
||||
- * Expose what should be a static flag in the TCP connection tracker.
|
||||
- */
|
||||
-#ifdef ECM_OPENWRT_SUPPORT
|
||||
-extern int nf_ct_tcp_no_window_check;
|
||||
-#endif
|
||||
-extern int nf_ct_tcp_be_liberal;
|
||||
-
|
||||
-/*
|
||||
* ecm_nss_ported_ipv4_connection_callback()
|
||||
* Callback for handling create ack/nack calls.
|
||||
*/
|
||||
@@ -343,6 +335,8 @@ static void ecm_nss_ported_ipv4_connecti
|
||||
uint8_t dest_mac_xlate[ETH_ALEN];
|
||||
ecm_db_direction_t ecm_dir;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
|
||||
@@ -1213,9 +1207,9 @@ static void ecm_nss_ported_ipv4_connecti
|
||||
nircm->tcp_rule.return_end = ct->proto.tcp.seen[return_dir].td_end;
|
||||
nircm->tcp_rule.return_max_end = ct->proto.tcp.seen[return_dir].td_maxend;
|
||||
#ifdef ECM_OPENWRT_SUPPORT
|
||||
- if (nf_ct_tcp_be_liberal || nf_ct_tcp_no_window_check
|
||||
+ if (tn->tcp_be_liberal || tn->tcp_no_window_check
|
||||
#else
|
||||
- if (nf_ct_tcp_be_liberal
|
||||
+ if (tn->tcp_be_liberal
|
||||
#endif
|
||||
|| (ct->proto.tcp.seen[flow_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)
|
||||
|| (ct->proto.tcp.seen[return_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)) {
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
@@ -101,14 +101,6 @@ static int ecm_nss_ported_ipv6_accelerat
|
||||
/* Array of Number of TCP and UDP connections currently offloaded */
|
||||
|
||||
/*
|
||||
- * Expose what should be a static flag in the TCP connection tracker.
|
||||
- */
|
||||
-#ifdef ECM_OPENWRT_SUPPORT
|
||||
-extern int nf_ct_tcp_no_window_check;
|
||||
-#endif
|
||||
-extern int nf_ct_tcp_be_liberal;
|
||||
-
|
||||
-/*
|
||||
* ecm_nss_ported_ipv6_connection_callback()
|
||||
* Callback for handling create ack/nack calls.
|
||||
*/
|
||||
@@ -348,6 +340,8 @@ static void ecm_nss_ported_ipv6_connecti
|
||||
ip_addr_t src_ip;
|
||||
ip_addr_t dest_ip;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
|
||||
@@ -1139,9 +1133,9 @@ static void ecm_nss_ported_ipv6_connecti
|
||||
nircm->tcp_rule.return_end = ct->proto.tcp.seen[return_dir].td_end;
|
||||
nircm->tcp_rule.return_max_end = ct->proto.tcp.seen[return_dir].td_maxend;
|
||||
#ifdef ECM_OPENWRT_SUPPORT
|
||||
- if (nf_ct_tcp_be_liberal || nf_ct_tcp_no_window_check
|
||||
+ if (tn->tcp_be_liberal || tn->tcp_no_window_check
|
||||
#else
|
||||
- if (nf_ct_tcp_be_liberal
|
||||
+ if (tn->tcp_be_liberal
|
||||
#endif
|
||||
|| (ct->proto.tcp.seen[flow_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)
|
||||
|| (ct->proto.tcp.seen[return_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)) {
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
@@ -339,6 +339,8 @@ static void ecm_sfe_ported_ipv4_connecti
|
||||
uint8_t dest_mac_xlate[ETH_ALEN];
|
||||
ecm_db_direction_t ecm_dir;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
struct ecm_classifier_instance *aci;
|
||||
struct ecm_classifier_rule_create ecrc;
|
||||
uint32_t l2_accel_bits = (ECM_SFE_COMMON_FLOW_L2_ACCEL_ALLOWED | ECM_SFE_COMMON_RETURN_L2_ACCEL_ALLOWED);
|
||||
@@ -1310,9 +1312,9 @@ static void ecm_sfe_ported_ipv4_connecti
|
||||
nircm->tcp_rule.return_end = ct->proto.tcp.seen[return_dir].td_end;
|
||||
nircm->tcp_rule.return_max_end = ct->proto.tcp.seen[return_dir].td_maxend;
|
||||
#ifdef ECM_OPENWRT_SUPPORT
|
||||
- if (nf_ct_tcp_be_liberal || nf_ct_tcp_no_window_check
|
||||
+ if (tn->tcp_be_liberal || tn->tcp_no_window_check)
|
||||
#else
|
||||
- if (nf_ct_tcp_be_liberal
|
||||
+ if (tn->tcp_be_liberal)
|
||||
#endif
|
||||
|| (ct->proto.tcp.seen[flow_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)
|
||||
|| (ct->proto.tcp.seen[return_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)) {
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
@@ -345,7 +345,9 @@ static void ecm_sfe_ported_ipv6_connecti
|
||||
struct ecm_classifier_instance *aci;
|
||||
struct ecm_classifier_rule_create ecrc;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
- uint32_t l2_accel_bits = (ECM_SFE_COMMON_FLOW_L2_ACCEL_ALLOWED | ECM_SFE_COMMON_RETURN_L2_ACCEL_ALLOWED);
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
+ uint32_t l2_accel_bits = (ECM_SFE_COMMON_FLOW_L2_ACCEL_ALLOWED | ECM_SFE_COMMON_RETURN_L2_ACCEL_ALLOWED);
|
||||
ecm_sfe_common_l2_accel_check_callback_t l2_accel_check;
|
||||
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
@@ -1272,9 +1274,9 @@ static void ecm_sfe_ported_ipv6_connecti
|
||||
nircm->tcp_rule.return_end = ct->proto.tcp.seen[return_dir].td_end;
|
||||
nircm->tcp_rule.return_max_end = ct->proto.tcp.seen[return_dir].td_maxend;
|
||||
#ifdef ECM_OPENWRT_SUPPORT
|
||||
- if (nf_ct_tcp_be_liberal || nf_ct_tcp_no_window_check
|
||||
+ if (tn->tcp_be_liberal || tn->tcp_no_window_check)
|
||||
#else
|
||||
- if (nf_ct_tcp_be_liberal
|
||||
+ if (tn->tcp_be_liberal)
|
||||
#endif
|
||||
|| (ct->proto.tcp.seen[flow_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)
|
||||
|| (ct->proto.tcp.seen[return_dir].flags & IP_CT_TCP_FLAG_BE_LIBERAL)) {
|
||||
@ -51,7 +51,7 @@ instead or relying on a downstream api not present upstream.
|
||||
spin_lock_bh(&ct->lock);
|
||||
--- a/frontends/sfe/ecm_sfe_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ipv6.c
|
||||
@@ -554,7 +554,8 @@ sync_conntrack:
|
||||
@@ -556,7 +556,8 @@ sync_conntrack:
|
||||
#else
|
||||
timeouts = nf_ct_timeout_lookup(ct);
|
||||
if (!timeouts) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -3612,7 +3612,7 @@ identifier_update:
|
||||
@@ -3606,7 +3606,7 @@ identifier_update:
|
||||
if (skb && (skb->skb_iif == dev->ifindex)) {
|
||||
struct pppol2tp_common_addr info;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
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;
|
||||
|
||||
@@ -3622,7 +3622,7 @@ identifier_update:
|
||||
@@ -3616,7 +3616,7 @@ identifier_update:
|
||||
ii = ecm_interface_unknown_interface_establish(&type_info.unknown, dev_name, dev_interface_num, ae_interface_num, dev_mtu);
|
||||
return ii;
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
+EXPORT_SYMBOL(ecm_nss_ipv4_is_conn_limit_reached);
|
||||
--- a/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
|
||||
@@ -1831,6 +1831,7 @@ struct ecm_front_end_connection_instance
|
||||
|
||||
return feci;
|
||||
}
|
||||
@ -36,7 +36,7 @@
|
||||
struct ecm_db_connection_instance **nci);
|
||||
--- a/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
|
||||
@@ -1657,6 +1657,7 @@ struct ecm_front_end_connection_instance
|
||||
|
||||
return feci;
|
||||
}
|
||||
@ -57,7 +57,7 @@
|
||||
struct ecm_db_connection_instance **nci);
|
||||
--- a/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
|
||||
@@ -1906,6 +1906,7 @@ struct ecm_front_end_connection_instance
|
||||
|
||||
return feci;
|
||||
}
|
||||
@ -78,7 +78,7 @@
|
||||
struct ecm_db_connection_instance **nci);
|
||||
--- a/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
|
||||
@@ -1812,6 +1812,7 @@ struct ecm_front_end_connection_instance
|
||||
|
||||
return feci;
|
||||
}
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
@@ -335,8 +335,12 @@ static void ecm_nss_ported_ipv4_connecti
|
||||
uint8_t dest_mac_xlate[ETH_ALEN];
|
||||
ecm_db_direction_t ecm_dir;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
- struct net *net = nf_ct_net(ct);
|
||||
- struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
+ struct nf_tcp_net *tn;
|
||||
+
|
||||
+ if (ct) {
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ tn = nf_tcp_pernet(net);
|
||||
+ }
|
||||
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
@@ -340,8 +340,12 @@ static void ecm_nss_ported_ipv6_connecti
|
||||
ip_addr_t src_ip;
|
||||
ip_addr_t dest_ip;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
- struct net *net = nf_ct_net(ct);
|
||||
- struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
+ struct nf_tcp_net *tn;
|
||||
+
|
||||
+ if (ct) {
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ tn = nf_tcp_pernet(net);
|
||||
+ }
|
||||
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
@@ -339,10 +339,14 @@ static void ecm_sfe_ported_ipv4_connecti
|
||||
uint8_t dest_mac_xlate[ETH_ALEN];
|
||||
ecm_db_direction_t ecm_dir;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
- struct net *net = nf_ct_net(ct);
|
||||
- struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
+ struct nf_tcp_net *tn;
|
||||
struct ecm_classifier_instance *aci;
|
||||
struct ecm_classifier_rule_create ecrc;
|
||||
+ if (ct) {
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ tn = nf_tcp_pernet(net);
|
||||
+ }
|
||||
+
|
||||
uint32_t l2_accel_bits = (ECM_SFE_COMMON_FLOW_L2_ACCEL_ALLOWED | ECM_SFE_COMMON_RETURN_L2_ACCEL_ALLOWED);
|
||||
ecm_sfe_common_l2_accel_check_callback_t l2_accel_check;
|
||||
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
@@ -345,11 +345,15 @@ static void ecm_sfe_ported_ipv6_connecti
|
||||
struct ecm_classifier_instance *aci;
|
||||
struct ecm_classifier_rule_create ecrc;
|
||||
ecm_front_end_acceleration_mode_t result_mode;
|
||||
- struct net *net = nf_ct_net(ct);
|
||||
- struct nf_tcp_net *tn = nf_tcp_pernet(net);
|
||||
+ struct nf_tcp_net *tn;
|
||||
uint32_t l2_accel_bits = (ECM_SFE_COMMON_FLOW_L2_ACCEL_ALLOWED | ECM_SFE_COMMON_RETURN_L2_ACCEL_ALLOWED);
|
||||
ecm_sfe_common_l2_accel_check_callback_t l2_accel_check;
|
||||
|
||||
+ if (ct) {
|
||||
+ struct net *net = nf_ct_net(ct);
|
||||
+ tn = nf_tcp_pernet(net);
|
||||
+ }
|
||||
+
|
||||
DEBUG_CHECK_MAGIC(feci, ECM_FRONT_END_CONNECTION_INSTANCE_MAGIC, "%px: magic failed", feci);
|
||||
|
||||
/*
|
||||
Loading…
Reference in New Issue
Block a user