diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /net/sched/cls_basic.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r-- | net/sched/cls_basic.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index efd4f95fd050..8be8872dd571 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -21,14 +21,12 @@ | |||
21 | #include <net/act_api.h> | 21 | #include <net/act_api.h> |
22 | #include <net/pkt_cls.h> | 22 | #include <net/pkt_cls.h> |
23 | 23 | ||
24 | struct basic_head | 24 | struct basic_head { |
25 | { | ||
26 | u32 hgenerator; | 25 | u32 hgenerator; |
27 | struct list_head flist; | 26 | struct list_head flist; |
28 | }; | 27 | }; |
29 | 28 | ||
30 | struct basic_filter | 29 | struct basic_filter { |
31 | { | ||
32 | u32 handle; | 30 | u32 handle; |
33 | struct tcf_exts exts; | 31 | struct tcf_exts exts; |
34 | struct tcf_ematch_tree ematches; | 32 | struct tcf_ematch_tree ematches; |
@@ -92,8 +90,7 @@ static int basic_init(struct tcf_proto *tp) | |||
92 | return 0; | 90 | return 0; |
93 | } | 91 | } |
94 | 92 | ||
95 | static inline void basic_delete_filter(struct tcf_proto *tp, | 93 | static void basic_delete_filter(struct tcf_proto *tp, struct basic_filter *f) |
96 | struct basic_filter *f) | ||
97 | { | 94 | { |
98 | tcf_unbind_filter(tp, &f->res); | 95 | tcf_unbind_filter(tp, &f->res); |
99 | tcf_exts_destroy(tp, &f->exts); | 96 | tcf_exts_destroy(tp, &f->exts); |
@@ -135,9 +132,9 @@ static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = { | |||
135 | [TCA_BASIC_EMATCHES] = { .type = NLA_NESTED }, | 132 | [TCA_BASIC_EMATCHES] = { .type = NLA_NESTED }, |
136 | }; | 133 | }; |
137 | 134 | ||
138 | static inline int basic_set_parms(struct tcf_proto *tp, struct basic_filter *f, | 135 | static int basic_set_parms(struct tcf_proto *tp, struct basic_filter *f, |
139 | unsigned long base, struct nlattr **tb, | 136 | unsigned long base, struct nlattr **tb, |
140 | struct nlattr *est) | 137 | struct nlattr *est) |
141 | { | 138 | { |
142 | int err = -EINVAL; | 139 | int err = -EINVAL; |
143 | struct tcf_exts e; | 140 | struct tcf_exts e; |
@@ -203,7 +200,7 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
203 | } while (--i > 0 && basic_get(tp, head->hgenerator)); | 200 | } while (--i > 0 && basic_get(tp, head->hgenerator)); |
204 | 201 | ||
205 | if (i <= 0) { | 202 | if (i <= 0) { |
206 | printk(KERN_ERR "Insufficient number of handles\n"); | 203 | pr_err("Insufficient number of handles\n"); |
207 | goto errout; | 204 | goto errout; |
208 | } | 205 | } |
209 | 206 | ||
@@ -268,6 +265,10 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh, | |||
268 | goto nla_put_failure; | 265 | goto nla_put_failure; |
269 | 266 | ||
270 | nla_nest_end(skb, nest); | 267 | nla_nest_end(skb, nest); |
268 | |||
269 | if (tcf_exts_dump_stats(skb, &f->exts, &basic_ext_map) < 0) | ||
270 | goto nla_put_failure; | ||
271 | |||
271 | return skb->len; | 272 | return skb->len; |
272 | 273 | ||
273 | nla_put_failure: | 274 | nla_put_failure: |