diff options
Diffstat (limited to 'net/sched/act_skbedit.c')
-rw-r--r-- | net/sched/act_skbedit.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c index cf20add1c3ff..aa0a4c056f31 100644 --- a/net/sched/act_skbedit.c +++ b/net/sched/act_skbedit.c | |||
@@ -28,15 +28,8 @@ | |||
28 | #include <net/tc_act/tc_skbedit.h> | 28 | #include <net/tc_act/tc_skbedit.h> |
29 | 29 | ||
30 | #define SKBEDIT_TAB_MASK 15 | 30 | #define SKBEDIT_TAB_MASK 15 |
31 | static struct tcf_common *tcf_skbedit_ht[SKBEDIT_TAB_MASK + 1]; | ||
32 | static u32 skbedit_idx_gen; | 31 | static u32 skbedit_idx_gen; |
33 | static DEFINE_RWLOCK(skbedit_lock); | 32 | static struct tcf_hashinfo skbedit_hash_info; |
34 | |||
35 | static struct tcf_hashinfo skbedit_hash_info = { | ||
36 | .htab = tcf_skbedit_ht, | ||
37 | .hmask = SKBEDIT_TAB_MASK, | ||
38 | .lock = &skbedit_lock, | ||
39 | }; | ||
40 | 33 | ||
41 | static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, | 34 | static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a, |
42 | struct tcf_result *res) | 35 | struct tcf_result *res) |
@@ -210,11 +203,15 @@ MODULE_LICENSE("GPL"); | |||
210 | 203 | ||
211 | static int __init skbedit_init_module(void) | 204 | static int __init skbedit_init_module(void) |
212 | { | 205 | { |
206 | int err = tcf_hashinfo_init(&skbedit_hash_info, SKBEDIT_TAB_MASK); | ||
207 | if (err) | ||
208 | return err; | ||
213 | return tcf_register_action(&act_skbedit_ops); | 209 | return tcf_register_action(&act_skbedit_ops); |
214 | } | 210 | } |
215 | 211 | ||
216 | static void __exit skbedit_cleanup_module(void) | 212 | static void __exit skbedit_cleanup_module(void) |
217 | { | 213 | { |
214 | tcf_hashinfo_destroy(&skbedit_hash_info); | ||
218 | tcf_unregister_action(&act_skbedit_ops); | 215 | tcf_unregister_action(&act_skbedit_ops); |
219 | } | 216 | } |
220 | 217 | ||