aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-04-04 10:16:49 +0000
committerJonas Gorski <jogo@openwrt.org>2014-04-04 10:16:49 +0000
commita8363fadcd32c687ec5b0902e8dbde7317c4a0f9 (patch)
treed5176fbd12236dd502acd544edefae48a4939fc2 /target/linux
parent96c4e3eed0493d3fdf28fd75e977e4f02c3b87f5 (diff)
downloadupstream-a8363fadcd32c687ec5b0902e8dbde7317c4a0f9.tar.gz
upstream-a8363fadcd32c687ec5b0902e8dbde7317c4a0f9.tar.bz2
upstream-a8363fadcd32c687ec5b0902e8dbde7317c4a0f9.zip
kernel: make sched_act_connmark compile for 3.14
The upstream API changed, which allowed to simplify the code a bit. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 40376
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/patches-3.14/621-sched_act_connmark.patch26
1 files changed, 11 insertions, 15 deletions
diff --git a/target/linux/generic/patches-3.14/621-sched_act_connmark.patch b/target/linux/generic/patches-3.14/621-sched_act_connmark.patch
index 00aa21ae76..d8ca6666b8 100644
--- a/target/linux/generic/patches-3.14/621-sched_act_connmark.patch
+++ b/target/linux/generic/patches-3.14/621-sched_act_connmark.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/net/sched/act_connmark.c
-@@ -0,0 +1,148 @@
+@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org>
+ *
@@ -36,15 +36,8 @@
+#define TCA_ACT_CONNMARK 20
+
+#define CONNMARK_TAB_MASK 3
-+static struct tcf_common *tcf_connmark_ht[CONNMARK_TAB_MASK + 1];
-+static u32 connmark_idx_gen;
-+static DEFINE_RWLOCK(connmark_lock);
-+
-+static struct tcf_hashinfo connmark_hash_info = {
-+ .htab = tcf_connmark_ht,
-+ .hmask = CONNMARK_TAB_MASK,
-+ .lock = &connmark_lock,
-+};
++
++static struct tcf_hashinfo connmark_hash_info;
+
+static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
+ struct tcf_result *res)
@@ -88,10 +81,9 @@
+ struct tcf_common *pc;
+ int ret = 0;
+
-+ pc = tcf_hash_check(0, a, bind, &connmark_hash_info);
++ pc = tcf_hash_check(0, a, bind);
+ if (!pc) {
-+ pc = tcf_hash_create(0, est, a, sizeof(*pc), bind,
-+ &connmark_idx_gen, &connmark_hash_info);
++ pc = tcf_hash_create(0, est, a, sizeof(*pc), bind);
+ if (IS_ERR(pc))
+ return PTR_ERR(pc);
+
@@ -124,13 +116,11 @@
+ .kind = "connmark",
+ .hinfo = &connmark_hash_info,
+ .type = TCA_ACT_CONNMARK,
-+ .capab = TCA_CAP_NONE,
+ .owner = THIS_MODULE,
+ .act = tcf_connmark,
+ .dump = tcf_connmark_dump,
+ .cleanup = tcf_connmark_cleanup,
+ .init = tcf_connmark_init,
-+ .walk = tcf_generic_walker,
+};
+
+MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>");
@@ -139,6 +129,12 @@
+
+static int __init connmark_init_module(void)
+{
++ int ret;
++
++ ret = tcf_hashinfo_init(&connmark_hash_info, CONNMARK_TAB_MASK);
++ if (ret)
++ return ret;
++
+ return tcf_register_action(&act_connmark_ops);
+}
+