aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:43:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:43:13 -0400
commit951cc93a7493a81a47e20231441bc6cf17c98a37 (patch)
treef53934f0f225e0215a85c8c59af4c6513e89e3f1 /net/sched
parenta7e1aabb28e8154ce987b622fd78d80a1ca39361 (diff)
parent415b3334a21aa67806c52d1acf4e72e14f7f402f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1287 commits) icmp: Fix regression in nexthop resolution during replies. net: Fix ppc64 BPF JIT dependencies. acenic: include NET_SKB_PAD headroom to incoming skbs ixgbe: convert to ndo_fix_features ixgbe: only enable WoL for magic packet by default ixgbe: remove ifdef check for non-existent define ixgbe: Pass staterr instead of re-reading status and error bits from descriptor ixgbe: Move interrupt related values out of ring and into q_vector ixgbe: add structure for containing RX/TX rings to q_vector ixgbe: inline the ixgbe_maybe_stop_tx function ixgbe: Update ATR to use recorded TX queues instead of CPU for routing igb: Fix for DH89xxCC near end loopback test e1000: always call e1000_check_for_link() on e1000_ce4100 MACs. netxen: add fw version compatibility check be2net: request native mode each time the card is reset ipv4: Constrain UFO fragment sizes to multiples of 8 bytes virtio_net: Fix panic in virtnet_remove ipv6: make fragment identifications less predictable ipv6: unshare inetpeers can: make function can_get_bittiming static ...
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_api.c11
-rw-r--r--net/sched/act_csum.c2
-rw-r--r--net/sched/act_gact.c3
-rw-r--r--net/sched/act_ipt.c2
-rw-r--r--net/sched/act_mirred.c2
-rw-r--r--net/sched/act_nat.c2
-rw-r--r--net/sched/act_pedit.c2
-rw-r--r--net/sched/act_police.c2
-rw-r--r--net/sched/act_simple.c3
-rw-r--r--net/sched/act_skbedit.c2
-rw-r--r--net/sched/cls_api.c12
-rw-r--r--net/sched/cls_basic.c2
-rw-r--r--net/sched/cls_cgroup.c2
-rw-r--r--net/sched/cls_flow.c6
-rw-r--r--net/sched/cls_fw.c2
-rw-r--r--net/sched/cls_route.c2
-rw-r--r--net/sched/cls_rsvp.h4
-rw-r--r--net/sched/cls_tcindex.c2
-rw-r--r--net/sched/cls_u32.c2
-rw-r--r--net/sched/em_meta.c7
-rw-r--r--net/sched/sch_api.c18
-rw-r--r--net/sched/sch_atm.c1
-rw-r--r--net/sched/sch_choke.c2
-rw-r--r--net/sched/sch_generic.c10
-rw-r--r--net/sched/sch_netem.c1
-rw-r--r--net/sched/sch_sfq.c2
-rw-r--r--net/sched/sch_teql.c4
27 files changed, 54 insertions, 56 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index a606025814a..f2fb67e701a 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -365,10 +365,10 @@ static struct tc_action_ops *tc_lookup_action_id(u32 type)
365} 365}
366#endif 366#endif
367 367
368int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, 368int tcf_action_exec(struct sk_buff *skb, const struct tc_action *act,
369 struct tcf_result *res) 369 struct tcf_result *res)
370{ 370{
371 struct tc_action *a; 371 const struct tc_action *a;
372 int ret = -1; 372 int ret = -1;
373 373
374 if (skb->tc_verd & TC_NCLS) { 374 if (skb->tc_verd & TC_NCLS) {
@@ -1115,9 +1115,10 @@ nlmsg_failure:
1115 1115
1116static int __init tc_action_init(void) 1116static int __init tc_action_init(void)
1117{ 1117{
1118 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL); 1118 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL, NULL);
1119 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL); 1119 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL, NULL);
1120 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action); 1120 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action,
1121 NULL);
1121 1122
1122 return 0; 1123 return 0;
1123} 1124}
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index 6cdf9abe475..453a73431ac 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -500,7 +500,7 @@ fail:
500} 500}
501 501
502static int tcf_csum(struct sk_buff *skb, 502static int tcf_csum(struct sk_buff *skb,
503 struct tc_action *a, struct tcf_result *res) 503 const struct tc_action *a, struct tcf_result *res)
504{ 504{
505 struct tcf_csum *p = a->priv; 505 struct tcf_csum *p = a->priv;
506 int action; 506 int action;
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index 2b4ab4b05ce..b77f5a06a65 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -125,7 +125,8 @@ static int tcf_gact_cleanup(struct tc_action *a, int bind)
125 return 0; 125 return 0;
126} 126}
127 127
128static int tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) 128static int tcf_gact(struct sk_buff *skb, const struct tc_action *a,
129 struct tcf_result *res)
129{ 130{
130 struct tcf_gact *gact = a->priv; 131 struct tcf_gact *gact = a->priv;
131 int action = TC_ACT_SHOT; 132 int action = TC_ACT_SHOT;
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 9fc211a1b20..60f8f616e8f 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -195,7 +195,7 @@ static int tcf_ipt_cleanup(struct tc_action *a, int bind)
195 return tcf_ipt_release(ipt, bind); 195 return tcf_ipt_release(ipt, bind);
196} 196}
197 197
198static int tcf_ipt(struct sk_buff *skb, struct tc_action *a, 198static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
199 struct tcf_result *res) 199 struct tcf_result *res)
200{ 200{
201 int ret = 0, result = 0; 201 int ret = 0, result = 0;
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 961386e2f2c..102fc212cd6 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -154,7 +154,7 @@ static int tcf_mirred_cleanup(struct tc_action *a, int bind)
154 return 0; 154 return 0;
155} 155}
156 156
157static int tcf_mirred(struct sk_buff *skb, struct tc_action *a, 157static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
158 struct tcf_result *res) 158 struct tcf_result *res)
159{ 159{
160 struct tcf_mirred *m = a->priv; 160 struct tcf_mirred *m = a->priv;
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 762b027650a..001d1b35486 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -102,7 +102,7 @@ static int tcf_nat_cleanup(struct tc_action *a, int bind)
102 return tcf_hash_release(&p->common, bind, &nat_hash_info); 102 return tcf_hash_release(&p->common, bind, &nat_hash_info);
103} 103}
104 104
105static int tcf_nat(struct sk_buff *skb, struct tc_action *a, 105static int tcf_nat(struct sk_buff *skb, const struct tc_action *a,
106 struct tcf_result *res) 106 struct tcf_result *res)
107{ 107{
108 struct tcf_nat *p = a->priv; 108 struct tcf_nat *p = a->priv;
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 7affe9a9275..10d3aed8656 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -120,7 +120,7 @@ static int tcf_pedit_cleanup(struct tc_action *a, int bind)
120 return 0; 120 return 0;
121} 121}
122 122
123static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, 123static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a,
124 struct tcf_result *res) 124 struct tcf_result *res)
125{ 125{
126 struct tcf_pedit *p = a->priv; 126 struct tcf_pedit *p = a->priv;
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index b3b9b32f4e0..6fb3f5af0f8 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -282,7 +282,7 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind)
282 return ret; 282 return ret;
283} 283}
284 284
285static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, 285static int tcf_act_police(struct sk_buff *skb, const struct tc_action *a,
286 struct tcf_result *res) 286 struct tcf_result *res)
287{ 287{
288 struct tcf_police *police = a->priv; 288 struct tcf_police *police = a->priv;
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index a34a22de60b..73e0a3ab4d5 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -36,7 +36,8 @@ static struct tcf_hashinfo simp_hash_info = {
36}; 36};
37 37
38#define SIMP_MAX_DATA 32 38#define SIMP_MAX_DATA 32
39static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) 39static int tcf_simp(struct sk_buff *skb, const struct tc_action *a,
40 struct tcf_result *res)
40{ 41{
41 struct tcf_defact *d = a->priv; 42 struct tcf_defact *d = a->priv;
42 43
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index 5f6f0c7c390..35dbbe91027 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched/act_skbedit.c
@@ -39,7 +39,7 @@ static struct tcf_hashinfo skbedit_hash_info = {
39 .lock = &skbedit_lock, 39 .lock = &skbedit_lock,
40}; 40};
41 41
42static int tcf_skbedit(struct sk_buff *skb, struct tc_action *a, 42static int tcf_skbedit(struct sk_buff *skb, const struct tc_action *a,
43 struct tcf_result *res) 43 struct tcf_result *res)
44{ 44{
45 struct tcf_skbedit *d = a->priv; 45 struct tcf_skbedit *d = a->priv;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index bb2c523f815..a69d44f1dac 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -40,9 +40,9 @@ static DEFINE_RWLOCK(cls_mod_lock);
40 40
41/* Find classifier type by string name */ 41/* Find classifier type by string name */
42 42
43static struct tcf_proto_ops *tcf_proto_lookup_ops(struct nlattr *kind) 43static const struct tcf_proto_ops *tcf_proto_lookup_ops(struct nlattr *kind)
44{ 44{
45 struct tcf_proto_ops *t = NULL; 45 const struct tcf_proto_ops *t = NULL;
46 46
47 if (kind) { 47 if (kind) {
48 read_lock(&cls_mod_lock); 48 read_lock(&cls_mod_lock);
@@ -132,7 +132,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
132 struct Qdisc *q; 132 struct Qdisc *q;
133 struct tcf_proto **back, **chain; 133 struct tcf_proto **back, **chain;
134 struct tcf_proto *tp; 134 struct tcf_proto *tp;
135 struct tcf_proto_ops *tp_ops; 135 const struct tcf_proto_ops *tp_ops;
136 const struct Qdisc_class_ops *cops; 136 const struct Qdisc_class_ops *cops;
137 unsigned long cl; 137 unsigned long cl;
138 unsigned long fh; 138 unsigned long fh;
@@ -610,10 +610,10 @@ EXPORT_SYMBOL(tcf_exts_dump_stats);
610 610
611static int __init tc_filter_init(void) 611static int __init tc_filter_init(void)
612{ 612{
613 rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL); 613 rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL, NULL);
614 rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL); 614 rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL, NULL);
615 rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter, 615 rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter,
616 tc_dump_tfilter); 616 tc_dump_tfilter, NULL);
617 617
618 return 0; 618 return 0;
619} 619}
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 8be8872dd57..ea1f70b5a5f 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -39,7 +39,7 @@ static const struct tcf_ext_map basic_ext_map = {
39 .police = TCA_BASIC_POLICE 39 .police = TCA_BASIC_POLICE
40}; 40};
41 41
42static int basic_classify(struct sk_buff *skb, struct tcf_proto *tp, 42static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp,
43 struct tcf_result *res) 43 struct tcf_result *res)
44{ 44{
45 int r; 45 int r;
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
index 32a335194ca..f84fdc3a7f2 100644
--- a/net/sched/cls_cgroup.c
+++ b/net/sched/cls_cgroup.c
@@ -101,7 +101,7 @@ struct cls_cgroup_head {
101 struct tcf_ematch_tree ematches; 101 struct tcf_ematch_tree ematches;
102}; 102};
103 103
104static int cls_cgroup_classify(struct sk_buff *skb, struct tcf_proto *tp, 104static int cls_cgroup_classify(struct sk_buff *skb, const struct tcf_proto *tp,
105 struct tcf_result *res) 105 struct tcf_result *res)
106{ 106{
107 struct cls_cgroup_head *head = tp->root; 107 struct cls_cgroup_head *head = tp->root;
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c
index 8ec01391d98..6994214db8f 100644
--- a/net/sched/cls_flow.c
+++ b/net/sched/cls_flow.c
@@ -121,7 +121,7 @@ static u32 flow_get_proto_src(struct sk_buff *skb)
121 if (!pskb_network_may_pull(skb, sizeof(*iph))) 121 if (!pskb_network_may_pull(skb, sizeof(*iph)))
122 break; 122 break;
123 iph = ip_hdr(skb); 123 iph = ip_hdr(skb);
124 if (iph->frag_off & htons(IP_MF | IP_OFFSET)) 124 if (ip_is_fragment(iph))
125 break; 125 break;
126 poff = proto_ports_offset(iph->protocol); 126 poff = proto_ports_offset(iph->protocol);
127 if (poff >= 0 && 127 if (poff >= 0 &&
@@ -163,7 +163,7 @@ static u32 flow_get_proto_dst(struct sk_buff *skb)
163 if (!pskb_network_may_pull(skb, sizeof(*iph))) 163 if (!pskb_network_may_pull(skb, sizeof(*iph)))
164 break; 164 break;
165 iph = ip_hdr(skb); 165 iph = ip_hdr(skb);
166 if (iph->frag_off & htons(IP_MF | IP_OFFSET)) 166 if (ip_is_fragment(iph))
167 break; 167 break;
168 poff = proto_ports_offset(iph->protocol); 168 poff = proto_ports_offset(iph->protocol);
169 if (poff >= 0 && 169 if (poff >= 0 &&
@@ -356,7 +356,7 @@ static u32 flow_key_get(struct sk_buff *skb, int key)
356 } 356 }
357} 357}
358 358
359static int flow_classify(struct sk_buff *skb, struct tcf_proto *tp, 359static int flow_classify(struct sk_buff *skb, const struct tcf_proto *tp,
360 struct tcf_result *res) 360 struct tcf_result *res)
361{ 361{
362 struct flow_head *head = tp->root; 362 struct flow_head *head = tp->root;
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 26e7bc4ffb7..389af152ec4 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -77,7 +77,7 @@ static inline int fw_hash(u32 handle)
77 return handle & (HTSIZE - 1); 77 return handle & (HTSIZE - 1);
78} 78}
79 79
80static int fw_classify(struct sk_buff *skb, struct tcf_proto *tp, 80static int fw_classify(struct sk_buff *skb, const struct tcf_proto *tp,
81 struct tcf_result *res) 81 struct tcf_result *res)
82{ 82{
83 struct fw_head *head = (struct fw_head *)tp->root; 83 struct fw_head *head = (struct fw_head *)tp->root;
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index a907905376d..13ab66e9df5 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -125,7 +125,7 @@ static inline int route4_hash_wild(void)
125 return 0; \ 125 return 0; \
126} 126}
127 127
128static int route4_classify(struct sk_buff *skb, struct tcf_proto *tp, 128static int route4_classify(struct sk_buff *skb, const struct tcf_proto *tp,
129 struct tcf_result *res) 129 struct tcf_result *res)
130{ 130{
131 struct route4_head *head = (struct route4_head *)tp->root; 131 struct route4_head *head = (struct route4_head *)tp->root;
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index 402c44b241a..be4505ee67a 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -130,7 +130,7 @@ static struct tcf_ext_map rsvp_ext_map = {
130 return r; \ 130 return r; \
131} 131}
132 132
133static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, 133static int rsvp_classify(struct sk_buff *skb, const struct tcf_proto *tp,
134 struct tcf_result *res) 134 struct tcf_result *res)
135{ 135{
136 struct rsvp_session **sht = ((struct rsvp_head *)tp->root)->ht; 136 struct rsvp_session **sht = ((struct rsvp_head *)tp->root)->ht;
@@ -167,7 +167,7 @@ restart:
167 dst = &nhptr->daddr; 167 dst = &nhptr->daddr;
168 protocol = nhptr->protocol; 168 protocol = nhptr->protocol;
169 xprt = ((u8 *)nhptr) + (nhptr->ihl<<2); 169 xprt = ((u8 *)nhptr) + (nhptr->ihl<<2);
170 if (nhptr->frag_off & htons(IP_MF | IP_OFFSET)) 170 if (ip_is_fragment(nhptr))
171 return -1; 171 return -1;
172#endif 172#endif
173 173
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 36667fa6423..dbe199234c6 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -79,7 +79,7 @@ tcindex_lookup(struct tcindex_data *p, u16 key)
79} 79}
80 80
81 81
82static int tcindex_classify(struct sk_buff *skb, struct tcf_proto *tp, 82static int tcindex_classify(struct sk_buff *skb, const struct tcf_proto *tp,
83 struct tcf_result *res) 83 struct tcf_result *res)
84{ 84{
85 struct tcindex_data *p = PRIV(tp); 85 struct tcindex_data *p = PRIV(tp);
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 3b93fc0c895..939b627b479 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -93,7 +93,7 @@ static inline unsigned int u32_hash_fold(__be32 key,
93 return h; 93 return h;
94} 94}
95 95
96static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_result *res) 96static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp, struct tcf_result *res)
97{ 97{
98 struct { 98 struct {
99 struct tc_u_knode *knode; 99 struct tc_u_knode *knode;
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 49130e8abff..1363bf14e61 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -404,12 +404,6 @@ META_COLLECTOR(int_sk_alloc)
404 dst->value = (__force int) skb->sk->sk_allocation; 404 dst->value = (__force int) skb->sk->sk_allocation;
405} 405}
406 406
407META_COLLECTOR(int_sk_route_caps)
408{
409 SKIP_NONLOCAL(skb);
410 dst->value = skb->sk->sk_route_caps;
411}
412
413META_COLLECTOR(int_sk_hash) 407META_COLLECTOR(int_sk_hash)
414{ 408{
415 SKIP_NONLOCAL(skb); 409 SKIP_NONLOCAL(skb);
@@ -530,7 +524,6 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX + 1][TCF_META_ID_MAX + 1] =
530 [META_ID(SK_ERR_QLEN)] = META_FUNC(int_sk_err_qlen), 524 [META_ID(SK_ERR_QLEN)] = META_FUNC(int_sk_err_qlen),
531 [META_ID(SK_FORWARD_ALLOCS)] = META_FUNC(int_sk_fwd_alloc), 525 [META_ID(SK_FORWARD_ALLOCS)] = META_FUNC(int_sk_fwd_alloc),
532 [META_ID(SK_ALLOCS)] = META_FUNC(int_sk_alloc), 526 [META_ID(SK_ALLOCS)] = META_FUNC(int_sk_alloc),
533 [META_ID(SK_ROUTE_CAPS)] = META_FUNC(int_sk_route_caps),
534 [META_ID(SK_HASH)] = META_FUNC(int_sk_hash), 527 [META_ID(SK_HASH)] = META_FUNC(int_sk_hash),
535 [META_ID(SK_LINGERTIME)] = META_FUNC(int_sk_lingertime), 528 [META_ID(SK_LINGERTIME)] = META_FUNC(int_sk_lingertime),
536 [META_ID(SK_ACK_BACKLOG)] = META_FUNC(int_sk_ack_bl), 529 [META_ID(SK_ACK_BACKLOG)] = META_FUNC(int_sk_ack_bl),
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 6b8627661c9..dca6c1a576f 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1644,7 +1644,7 @@ done:
1644 * to this qdisc, (optionally) tests for protocol and asks 1644 * to this qdisc, (optionally) tests for protocol and asks
1645 * specific classifiers. 1645 * specific classifiers.
1646 */ 1646 */
1647int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp, 1647int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp,
1648 struct tcf_result *res) 1648 struct tcf_result *res)
1649{ 1649{
1650 __be16 protocol = skb->protocol; 1650 __be16 protocol = skb->protocol;
@@ -1668,12 +1668,12 @@ int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp,
1668} 1668}
1669EXPORT_SYMBOL(tc_classify_compat); 1669EXPORT_SYMBOL(tc_classify_compat);
1670 1670
1671int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, 1671int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp,
1672 struct tcf_result *res) 1672 struct tcf_result *res)
1673{ 1673{
1674 int err = 0; 1674 int err = 0;
1675#ifdef CONFIG_NET_CLS_ACT 1675#ifdef CONFIG_NET_CLS_ACT
1676 struct tcf_proto *otp = tp; 1676 const struct tcf_proto *otp = tp;
1677reclassify: 1677reclassify:
1678#endif 1678#endif
1679 1679
@@ -1792,12 +1792,12 @@ static int __init pktsched_init(void)
1792 register_qdisc(&pfifo_head_drop_qdisc_ops); 1792 register_qdisc(&pfifo_head_drop_qdisc_ops);
1793 register_qdisc(&mq_qdisc_ops); 1793 register_qdisc(&mq_qdisc_ops);
1794 1794
1795 rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL); 1795 rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL, NULL);
1796 rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL); 1796 rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL, NULL);
1797 rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc); 1797 rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc, NULL);
1798 rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL); 1798 rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL, NULL);
1799 rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL); 1799 rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL, NULL);
1800 rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass); 1800 rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass, NULL);
1801 1801
1802 return 0; 1802 return 0;
1803} 1803}
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 3f08158b868..e25e49061a0 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -5,6 +5,7 @@
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/slab.h> 6#include <linux/slab.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/interrupt.h>
8#include <linux/string.h> 9#include <linux/string.h>
9#include <linux/errno.h> 10#include <linux/errno.h>
10#include <linux/skbuff.h> 11#include <linux/skbuff.h>
diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c
index 06afbaeb4c8..3422b25df9e 100644
--- a/net/sched/sch_choke.c
+++ b/net/sched/sch_choke.c
@@ -181,7 +181,7 @@ static bool choke_match_flow(struct sk_buff *skb1,
181 ip1->saddr != ip2->saddr || ip1->daddr != ip2->daddr) 181 ip1->saddr != ip2->saddr || ip1->daddr != ip2->daddr)
182 return false; 182 return false;
183 183
184 if ((ip1->frag_off | ip2->frag_off) & htons(IP_MF | IP_OFFSET)) 184 if (ip_is_fragment(ip1) | ip_is_fragment(ip2))
185 ip_proto = 0; 185 ip_proto = 0;
186 off1 += ip1->ihl * 4; 186 off1 += ip1->ihl * 4;
187 off2 += ip2->ihl * 4; 187 off2 += ip2->ihl * 4;
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index b4c680900d7..69fca279880 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -189,15 +189,15 @@ static inline int qdisc_restart(struct Qdisc *q)
189 189
190void __qdisc_run(struct Qdisc *q) 190void __qdisc_run(struct Qdisc *q)
191{ 191{
192 unsigned long start_time = jiffies; 192 int quota = weight_p;
193 193
194 while (qdisc_restart(q)) { 194 while (qdisc_restart(q)) {
195 /* 195 /*
196 * Postpone processing if 196 * Ordered by possible occurrence: Postpone processing if
197 * 1. another process needs the CPU; 197 * 1. we've exceeded packet quota
198 * 2. we've been doing it for too long. 198 * 2. another process needs the CPU;
199 */ 199 */
200 if (need_resched() || jiffies != start_time) { 200 if (--quota <= 0 || need_resched()) {
201 __netif_schedule(q); 201 __netif_schedule(q);
202 break; 202 break;
203 } 203 }
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 69c35f6cd13..eb3b9a86c6e 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -13,6 +13,7 @@
13 * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> 13 * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro>
14 */ 14 */
15 15
16#include <linux/mm.h>
16#include <linux/module.h> 17#include <linux/module.h>
17#include <linux/slab.h> 18#include <linux/slab.h>
18#include <linux/types.h> 19#include <linux/types.h>
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index b6ea6afa55b..4536ee64383 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -157,7 +157,7 @@ static unsigned int sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
157 iph = ip_hdr(skb); 157 iph = ip_hdr(skb);
158 h = (__force u32)iph->daddr; 158 h = (__force u32)iph->daddr;
159 h2 = (__force u32)iph->saddr ^ iph->protocol; 159 h2 = (__force u32)iph->saddr ^ iph->protocol;
160 if (iph->frag_off & htons(IP_MF | IP_OFFSET)) 160 if (ip_is_fragment(iph))
161 break; 161 break;
162 poff = proto_ports_offset(iph->protocol); 162 poff = proto_ports_offset(iph->protocol);
163 if (poff >= 0 && 163 if (poff >= 0 &&
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 45cd30098e3..a3b7120fcc7 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -229,7 +229,7 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
229{ 229{
230 struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0); 230 struct netdev_queue *dev_queue = netdev_get_tx_queue(dev, 0);
231 struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc); 231 struct teql_sched_data *q = qdisc_priv(dev_queue->qdisc);
232 struct neighbour *mn = skb_dst(skb)->neighbour; 232 struct neighbour *mn = dst_get_neighbour(skb_dst(skb));
233 struct neighbour *n = q->ncache; 233 struct neighbour *n = q->ncache;
234 234
235 if (mn->tbl == NULL) 235 if (mn->tbl == NULL)
@@ -270,7 +270,7 @@ static inline int teql_resolve(struct sk_buff *skb,
270 270
271 if (dev->header_ops == NULL || 271 if (dev->header_ops == NULL ||
272 skb_dst(skb) == NULL || 272 skb_dst(skb) == NULL ||
273 skb_dst(skb)->neighbour == NULL) 273 dst_get_neighbour(skb_dst(skb)) == NULL)
274 return 0; 274 return 0;
275 return __teql_resolve(skb, skb_res, dev); 275 return __teql_resolve(skb, skb_res, dev);
276} 276}