summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.18/621-sched_act_connmark.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-10-27 22:55:39 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2014-10-27 22:55:39 +0000
commita76ee3b1d5dee92a13ba357e9baf2ad155976604 (patch)
tree38745103e28135d9d7fc5fbfbc64a5eb7f6f49d3 /target/linux/generic/patches-3.18/621-sched_act_connmark.patch
parentcea2b5299b13fcfef7de2f194e833e545e9e0f2f (diff)
downloadmaster-31e0f0ae-a76ee3b1d5dee92a13ba357e9baf2ad155976604.tar.gz
master-31e0f0ae-a76ee3b1d5dee92a13ba357e9baf2ad155976604.tar.bz2
master-31e0f0ae-a76ee3b1d5dee92a13ba357e9baf2ad155976604.zip
kernel: make the kernel 3.18 patches apply and boot on arm.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 43095
Diffstat (limited to 'target/linux/generic/patches-3.18/621-sched_act_connmark.patch')
-rw-r--r--target/linux/generic/patches-3.18/621-sched_act_connmark.patch34
1 files changed, 8 insertions, 26 deletions
diff --git a/target/linux/generic/patches-3.18/621-sched_act_connmark.patch b/target/linux/generic/patches-3.18/621-sched_act_connmark.patch
index d8ca6666b8..945974981a 100644
--- a/target/linux/generic/patches-3.18/621-sched_act_connmark.patch
+++ b/target/linux/generic/patches-3.18/621-sched_act_connmark.patch
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/net/sched/act_connmark.c
-@@ -0,0 +1,144 @@
+@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org>
+ *
@@ -37,8 +37,6 @@
+
+#define CONNMARK_TAB_MASK 3
+
-+static struct tcf_hashinfo connmark_hash_info;
-+
+static int tcf_connmark(struct sk_buff *skb, const struct tc_action *a,
+ struct tcf_result *res)
+{
@@ -78,20 +76,18 @@
+ struct nlattr *est, struct tc_action *a,
+ int ovr, int bind)
+{
-+ struct tcf_common *pc;
+ int ret = 0;
+
-+ pc = tcf_hash_check(0, a, bind);
-+ if (!pc) {
-+ pc = tcf_hash_create(0, est, a, sizeof(*pc), bind);
-+ if (IS_ERR(pc))
-+ return PTR_ERR(pc);
++ if (!tcf_hash_check(0, a, bind)) {
++ ret = tcf_hash_create(0, est, a, sizeof(struct tcf_common), bind);
++ if (ret)
++ return ret;
+
-+ tcf_hash_insert(pc, &connmark_hash_info);
++ tcf_hash_insert(a);
+ ret = ACT_P_CREATED;
+ } else {
+ if (!ovr) {
-+ tcf_hash_release(pc, bind, &connmark_hash_info);
++ tcf_hash_release(a, bind);
+ return -EEXIST;
+ }
+ }
@@ -99,13 +95,6 @@
+ return ret;
+}
+
-+static inline int tcf_connmark_cleanup(struct tc_action *a, int bind)
-+{
-+ if (a->priv)
-+ return tcf_hash_release(a->priv, bind, &connmark_hash_info);
-+ return 0;
-+}
-+
+static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a,
+ int bind, int ref)
+{
@@ -114,12 +103,10 @@
+
+static struct tc_action_ops act_connmark_ops = {
+ .kind = "connmark",
-+ .hinfo = &connmark_hash_info,
+ .type = TCA_ACT_CONNMARK,
+ .owner = THIS_MODULE,
+ .act = tcf_connmark,
+ .dump = tcf_connmark_dump,
-+ .cleanup = tcf_connmark_cleanup,
+ .init = tcf_connmark_init,
+};
+
@@ -129,13 +116,8 @@
+
+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);
++ return tcf_register_action(&act_connmark_ops, CONNMARK_TAB_MASK);
+}
+
+static void __exit connmark_cleanup_module(void)