diff options
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/Makefile | 14 | ||||
-rw-r--r-- | net/sched/act_api.c | 4 | ||||
-rw-r--r-- | net/sched/act_gact.c (renamed from net/sched/gact.c) | 3 | ||||
-rw-r--r-- | net/sched/act_ipt.c (renamed from net/sched/ipt.c) | 6 | ||||
-rw-r--r-- | net/sched/act_mirred.c (renamed from net/sched/mirred.c) | 3 | ||||
-rw-r--r-- | net/sched/act_pedit.c (renamed from net/sched/pedit.c) | 5 | ||||
-rw-r--r-- | net/sched/act_police.c (renamed from net/sched/police.c) | 17 | ||||
-rw-r--r-- | net/sched/act_simple.c (renamed from net/sched/simple.c) | 3 | ||||
-rw-r--r-- | net/sched/sch_cbq.c | 4 | ||||
-rw-r--r-- | net/sched/sch_hfsc.c | 12 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 4 | ||||
-rw-r--r-- | net/sched/sch_prio.c | 7 | ||||
-rw-r--r-- | net/sched/sch_teql.c | 12 |
13 files changed, 43 insertions, 51 deletions
diff --git a/net/sched/Makefile b/net/sched/Makefile index e48d0d456b3e..0f06aec66094 100644 --- a/net/sched/Makefile +++ b/net/sched/Makefile | |||
@@ -7,13 +7,13 @@ obj-y := sch_generic.o | |||
7 | obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o sch_blackhole.o | 7 | obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o sch_blackhole.o |
8 | obj-$(CONFIG_NET_CLS) += cls_api.o | 8 | obj-$(CONFIG_NET_CLS) += cls_api.o |
9 | obj-$(CONFIG_NET_CLS_ACT) += act_api.o | 9 | obj-$(CONFIG_NET_CLS_ACT) += act_api.o |
10 | obj-$(CONFIG_NET_ACT_POLICE) += police.o | 10 | obj-$(CONFIG_NET_ACT_POLICE) += act_police.o |
11 | obj-$(CONFIG_NET_CLS_POLICE) += police.o | 11 | obj-$(CONFIG_NET_CLS_POLICE) += act_police.o |
12 | obj-$(CONFIG_NET_ACT_GACT) += gact.o | 12 | obj-$(CONFIG_NET_ACT_GACT) += act_gact.o |
13 | obj-$(CONFIG_NET_ACT_MIRRED) += mirred.o | 13 | obj-$(CONFIG_NET_ACT_MIRRED) += act_mirred.o |
14 | obj-$(CONFIG_NET_ACT_IPT) += ipt.o | 14 | obj-$(CONFIG_NET_ACT_IPT) += act_ipt.o |
15 | obj-$(CONFIG_NET_ACT_PEDIT) += pedit.o | 15 | obj-$(CONFIG_NET_ACT_PEDIT) += act_pedit.o |
16 | obj-$(CONFIG_NET_ACT_SIMP) += simple.o | 16 | obj-$(CONFIG_NET_ACT_SIMP) += act_simple.o |
17 | obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o | 17 | obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o |
18 | obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o | 18 | obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o |
19 | obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o | 19 | obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o |
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 2ce1cb2aa2ed..792ce59940ec 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -165,7 +165,7 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, | |||
165 | while ((a = act) != NULL) { | 165 | while ((a = act) != NULL) { |
166 | repeat: | 166 | repeat: |
167 | if (a->ops && a->ops->act) { | 167 | if (a->ops && a->ops->act) { |
168 | ret = a->ops->act(&skb, a, res); | 168 | ret = a->ops->act(skb, a, res); |
169 | if (TC_MUNGED & skb->tc_verd) { | 169 | if (TC_MUNGED & skb->tc_verd) { |
170 | /* copied already, allow trampling */ | 170 | /* copied already, allow trampling */ |
171 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); | 171 | skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); |
@@ -290,7 +290,7 @@ struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, | |||
290 | if (a_o == NULL) { | 290 | if (a_o == NULL) { |
291 | #ifdef CONFIG_KMOD | 291 | #ifdef CONFIG_KMOD |
292 | rtnl_unlock(); | 292 | rtnl_unlock(); |
293 | request_module(act_name); | 293 | request_module("act_%s", act_name); |
294 | rtnl_lock(); | 294 | rtnl_lock(); |
295 | 295 | ||
296 | a_o = tc_lookup_action_n(act_name); | 296 | a_o = tc_lookup_action_n(act_name); |
diff --git a/net/sched/gact.c b/net/sched/act_gact.c index d1c6d542912a..a1e68f78dcc2 100644 --- a/net/sched/gact.c +++ b/net/sched/act_gact.c | |||
@@ -135,10 +135,9 @@ tcf_gact_cleanup(struct tc_action *a, int bind) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | static int | 137 | static int |
138 | tcf_gact(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 138 | tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
139 | { | 139 | { |
140 | struct tcf_gact *p = PRIV(a, gact); | 140 | struct tcf_gact *p = PRIV(a, gact); |
141 | struct sk_buff *skb = *pskb; | ||
142 | int action = TC_ACT_SHOT; | 141 | int action = TC_ACT_SHOT; |
143 | 142 | ||
144 | spin_lock(&p->lock); | 143 | spin_lock(&p->lock); |
diff --git a/net/sched/ipt.c b/net/sched/act_ipt.c index f50136eed211..b5001939b74b 100644 --- a/net/sched/ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -201,11 +201,10 @@ tcf_ipt_cleanup(struct tc_action *a, int bind) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | static int | 203 | static int |
204 | tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 204 | tcf_ipt(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
205 | { | 205 | { |
206 | int ret = 0, result = 0; | 206 | int ret = 0, result = 0; |
207 | struct tcf_ipt *p = PRIV(a, ipt); | 207 | struct tcf_ipt *p = PRIV(a, ipt); |
208 | struct sk_buff *skb = *pskb; | ||
209 | 208 | ||
210 | if (skb_cloned(skb)) { | 209 | if (skb_cloned(skb)) { |
211 | if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) | 210 | if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) |
@@ -222,6 +221,9 @@ tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | |||
222 | worry later - danger - this API seems to have changed | 221 | worry later - danger - this API seems to have changed |
223 | from earlier kernels */ | 222 | from earlier kernels */ |
224 | 223 | ||
224 | /* iptables targets take a double skb pointer in case the skb | ||
225 | * needs to be replaced. We don't own the skb, so this must not | ||
226 | * happen. The pskb_expand_head above should make sure of this */ | ||
225 | ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, | 227 | ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, |
226 | p->hook, p->t->data, NULL); | 228 | p->hook, p->t->data, NULL); |
227 | switch (ret) { | 229 | switch (ret) { |
diff --git a/net/sched/mirred.c b/net/sched/act_mirred.c index 20d06916dc0b..4fcccbd50885 100644 --- a/net/sched/mirred.c +++ b/net/sched/act_mirred.c | |||
@@ -158,12 +158,11 @@ tcf_mirred_cleanup(struct tc_action *a, int bind) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | static int | 160 | static int |
161 | tcf_mirred(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 161 | tcf_mirred(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
162 | { | 162 | { |
163 | struct tcf_mirred *p = PRIV(a, mirred); | 163 | struct tcf_mirred *p = PRIV(a, mirred); |
164 | struct net_device *dev; | 164 | struct net_device *dev; |
165 | struct sk_buff *skb2 = NULL; | 165 | struct sk_buff *skb2 = NULL; |
166 | struct sk_buff *skb = *pskb; | ||
167 | u32 at = G_TC_AT(skb->tc_verd); | 166 | u32 at = G_TC_AT(skb->tc_verd); |
168 | 167 | ||
169 | spin_lock(&p->lock); | 168 | spin_lock(&p->lock); |
diff --git a/net/sched/pedit.c b/net/sched/act_pedit.c index 767d24f4610e..1742a68e0122 100644 --- a/net/sched/pedit.c +++ b/net/sched/act_pedit.c | |||
@@ -130,10 +130,9 @@ tcf_pedit_cleanup(struct tc_action *a, int bind) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | static int | 132 | static int |
133 | tcf_pedit(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 133 | tcf_pedit(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
134 | { | 134 | { |
135 | struct tcf_pedit *p = PRIV(a, pedit); | 135 | struct tcf_pedit *p = PRIV(a, pedit); |
136 | struct sk_buff *skb = *pskb; | ||
137 | int i, munged = 0; | 136 | int i, munged = 0; |
138 | u8 *pptr; | 137 | u8 *pptr; |
139 | 138 | ||
@@ -246,10 +245,12 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) | |||
246 | t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); | 245 | t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); |
247 | t.expires = jiffies_to_clock_t(p->tm.expires); | 246 | t.expires = jiffies_to_clock_t(p->tm.expires); |
248 | RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); | 247 | RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); |
248 | kfree(opt); | ||
249 | return skb->len; | 249 | return skb->len; |
250 | 250 | ||
251 | rtattr_failure: | 251 | rtattr_failure: |
252 | skb_trim(skb, b - skb->data); | 252 | skb_trim(skb, b - skb->data); |
253 | kfree(opt); | ||
253 | return -1; | 254 | return -1; |
254 | } | 255 | } |
255 | 256 | ||
diff --git a/net/sched/police.c b/net/sched/act_police.c index eb39fb2f39b6..fa877f8f652c 100644 --- a/net/sched/police.c +++ b/net/sched/act_police.c | |||
@@ -284,11 +284,10 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind) | |||
284 | return 0; | 284 | return 0; |
285 | } | 285 | } |
286 | 286 | ||
287 | static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a, | 287 | static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, |
288 | struct tcf_result *res) | 288 | struct tcf_result *res) |
289 | { | 289 | { |
290 | psched_time_t now; | 290 | psched_time_t now; |
291 | struct sk_buff *skb = *pskb; | ||
292 | struct tcf_police *p = PRIV(a); | 291 | struct tcf_police *p = PRIV(a); |
293 | long toks; | 292 | long toks; |
294 | long ptoks = 0; | 293 | long ptoks = 0; |
@@ -408,7 +407,7 @@ police_cleanup_module(void) | |||
408 | module_init(police_init_module); | 407 | module_init(police_init_module); |
409 | module_exit(police_cleanup_module); | 408 | module_exit(police_cleanup_module); |
410 | 409 | ||
411 | #endif | 410 | #else /* CONFIG_NET_CLS_ACT */ |
412 | 411 | ||
413 | struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) | 412 | struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) |
414 | { | 413 | { |
@@ -545,6 +544,7 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *p) | |||
545 | spin_unlock(&p->lock); | 544 | spin_unlock(&p->lock); |
546 | return p->action; | 545 | return p->action; |
547 | } | 546 | } |
547 | EXPORT_SYMBOL(tcf_police); | ||
548 | 548 | ||
549 | int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p) | 549 | int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p) |
550 | { | 550 | { |
@@ -601,13 +601,4 @@ errout: | |||
601 | return -1; | 601 | return -1; |
602 | } | 602 | } |
603 | 603 | ||
604 | 604 | #endif /* CONFIG_NET_CLS_ACT */ | |
605 | EXPORT_SYMBOL(tcf_police); | ||
606 | EXPORT_SYMBOL(tcf_police_destroy); | ||
607 | EXPORT_SYMBOL(tcf_police_dump); | ||
608 | EXPORT_SYMBOL(tcf_police_dump_stats); | ||
609 | EXPORT_SYMBOL(tcf_police_hash); | ||
610 | EXPORT_SYMBOL(tcf_police_ht); | ||
611 | EXPORT_SYMBOL(tcf_police_locate); | ||
612 | EXPORT_SYMBOL(tcf_police_lookup); | ||
613 | EXPORT_SYMBOL(tcf_police_new_index); | ||
diff --git a/net/sched/simple.c b/net/sched/act_simple.c index 8a6ae4f491e8..e5f2e1f431e2 100644 --- a/net/sched/simple.c +++ b/net/sched/act_simple.c | |||
@@ -44,9 +44,8 @@ static DEFINE_RWLOCK(simp_lock); | |||
44 | #include <net/pkt_act.h> | 44 | #include <net/pkt_act.h> |
45 | #include <net/act_generic.h> | 45 | #include <net/act_generic.h> |
46 | 46 | ||
47 | static int tcf_simp(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) | 47 | static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res) |
48 | { | 48 | { |
49 | struct sk_buff *skb = *pskb; | ||
50 | struct tcf_defact *p = PRIV(a, defact); | 49 | struct tcf_defact *p = PRIV(a, defact); |
51 | 50 | ||
52 | spin_lock(&p->lock); | 51 | spin_lock(&p->lock); |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 09453f997d8c..6cd81708bf71 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -257,7 +257,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
257 | (cl = cbq_class_lookup(q, prio)) != NULL) | 257 | (cl = cbq_class_lookup(q, prio)) != NULL) |
258 | return cl; | 258 | return cl; |
259 | 259 | ||
260 | *qerr = NET_XMIT_DROP; | 260 | *qerr = NET_XMIT_BYPASS; |
261 | for (;;) { | 261 | for (;;) { |
262 | int result = 0; | 262 | int result = 0; |
263 | defmap = head->defaults; | 263 | defmap = head->defaults; |
@@ -413,7 +413,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
413 | q->rx_class = cl; | 413 | q->rx_class = cl; |
414 | #endif | 414 | #endif |
415 | if (cl == NULL) { | 415 | if (cl == NULL) { |
416 | if (ret == NET_XMIT_DROP) | 416 | if (ret == NET_XMIT_BYPASS) |
417 | sch->qstats.drops++; | 417 | sch->qstats.drops++; |
418 | kfree_skb(skb); | 418 | kfree_skb(skb); |
419 | return ret; | 419 | return ret; |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index c26764bc4103..91132f6871d7 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -208,7 +208,7 @@ struct hfsc_sched | |||
208 | do { \ | 208 | do { \ |
209 | struct timeval tv; \ | 209 | struct timeval tv; \ |
210 | do_gettimeofday(&tv); \ | 210 | do_gettimeofday(&tv); \ |
211 | (stamp) = 1000000ULL * tv.tv_sec + tv.tv_usec; \ | 211 | (stamp) = 1ULL * USEC_PER_SEC * tv.tv_sec + tv.tv_usec; \ |
212 | } while (0) | 212 | } while (0) |
213 | #endif | 213 | #endif |
214 | 214 | ||
@@ -502,8 +502,8 @@ d2dx(u32 d) | |||
502 | u64 dx; | 502 | u64 dx; |
503 | 503 | ||
504 | dx = ((u64)d * PSCHED_JIFFIE2US(HZ)); | 504 | dx = ((u64)d * PSCHED_JIFFIE2US(HZ)); |
505 | dx += 1000000 - 1; | 505 | dx += USEC_PER_SEC - 1; |
506 | do_div(dx, 1000000); | 506 | do_div(dx, USEC_PER_SEC); |
507 | return dx; | 507 | return dx; |
508 | } | 508 | } |
509 | 509 | ||
@@ -523,7 +523,7 @@ dx2d(u64 dx) | |||
523 | { | 523 | { |
524 | u64 d; | 524 | u64 d; |
525 | 525 | ||
526 | d = dx * 1000000; | 526 | d = dx * USEC_PER_SEC; |
527 | do_div(d, PSCHED_JIFFIE2US(HZ)); | 527 | do_div(d, PSCHED_JIFFIE2US(HZ)); |
528 | return (u32)d; | 528 | return (u32)d; |
529 | } | 529 | } |
@@ -1227,7 +1227,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
1227 | if (cl->level == 0) | 1227 | if (cl->level == 0) |
1228 | return cl; | 1228 | return cl; |
1229 | 1229 | ||
1230 | *qerr = NET_XMIT_DROP; | 1230 | *qerr = NET_XMIT_BYPASS; |
1231 | tcf = q->root.filter_list; | 1231 | tcf = q->root.filter_list; |
1232 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { | 1232 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { |
1233 | #ifdef CONFIG_NET_CLS_ACT | 1233 | #ifdef CONFIG_NET_CLS_ACT |
@@ -1643,7 +1643,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
1643 | 1643 | ||
1644 | cl = hfsc_classify(skb, sch, &err); | 1644 | cl = hfsc_classify(skb, sch, &err); |
1645 | if (cl == NULL) { | 1645 | if (cl == NULL) { |
1646 | if (err == NET_XMIT_DROP) | 1646 | if (err == NET_XMIT_BYPASS) |
1647 | sch->qstats.drops++; | 1647 | sch->qstats.drops++; |
1648 | kfree_skb(skb); | 1648 | kfree_skb(skb); |
1649 | return err; | 1649 | return err; |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 558cc087e602..3ec95df4a85e 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -321,7 +321,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in | |||
321 | if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) | 321 | if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) |
322 | return cl; | 322 | return cl; |
323 | 323 | ||
324 | *qerr = NET_XMIT_DROP; | 324 | *qerr = NET_XMIT_BYPASS; |
325 | tcf = q->filter_list; | 325 | tcf = q->filter_list; |
326 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { | 326 | while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { |
327 | #ifdef CONFIG_NET_CLS_ACT | 327 | #ifdef CONFIG_NET_CLS_ACT |
@@ -724,7 +724,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
724 | } | 724 | } |
725 | #ifdef CONFIG_NET_CLS_ACT | 725 | #ifdef CONFIG_NET_CLS_ACT |
726 | } else if (!cl) { | 726 | } else if (!cl) { |
727 | if (ret == NET_XMIT_DROP) | 727 | if (ret == NET_XMIT_BYPASS) |
728 | sch->qstats.drops++; | 728 | sch->qstats.drops++; |
729 | kfree_skb (skb); | 729 | kfree_skb (skb); |
730 | return ret; | 730 | return ret; |
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 3ac0f495bad0..5b3a3e48ed92 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -54,7 +54,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
54 | u32 band = skb->priority; | 54 | u32 band = skb->priority; |
55 | struct tcf_result res; | 55 | struct tcf_result res; |
56 | 56 | ||
57 | *qerr = NET_XMIT_DROP; | 57 | *qerr = NET_XMIT_BYPASS; |
58 | if (TC_H_MAJ(skb->priority) != sch->handle) { | 58 | if (TC_H_MAJ(skb->priority) != sch->handle) { |
59 | #ifdef CONFIG_NET_CLS_ACT | 59 | #ifdef CONFIG_NET_CLS_ACT |
60 | switch (tc_classify(skb, q->filter_list, &res)) { | 60 | switch (tc_classify(skb, q->filter_list, &res)) { |
@@ -91,7 +91,8 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
91 | qdisc = prio_classify(skb, sch, &ret); | 91 | qdisc = prio_classify(skb, sch, &ret); |
92 | #ifdef CONFIG_NET_CLS_ACT | 92 | #ifdef CONFIG_NET_CLS_ACT |
93 | if (qdisc == NULL) { | 93 | if (qdisc == NULL) { |
94 | if (ret == NET_XMIT_DROP) | 94 | |
95 | if (ret == NET_XMIT_BYPASS) | ||
95 | sch->qstats.drops++; | 96 | sch->qstats.drops++; |
96 | kfree_skb(skb); | 97 | kfree_skb(skb); |
97 | return ret; | 98 | return ret; |
@@ -118,7 +119,7 @@ prio_requeue(struct sk_buff *skb, struct Qdisc* sch) | |||
118 | qdisc = prio_classify(skb, sch, &ret); | 119 | qdisc = prio_classify(skb, sch, &ret); |
119 | #ifdef CONFIG_NET_CLS_ACT | 120 | #ifdef CONFIG_NET_CLS_ACT |
120 | if (qdisc == NULL) { | 121 | if (qdisc == NULL) { |
121 | if (ret == NET_XMIT_DROP) | 122 | if (ret == NET_XMIT_BYPASS) |
122 | sch->qstats.drops++; | 123 | sch->qstats.drops++; |
123 | kfree_skb(skb); | 124 | kfree_skb(skb); |
124 | return ret; | 125 | return ret; |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index c4a2a8c4c339..79b8ef34c6e4 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -274,7 +274,7 @@ teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *de | |||
274 | 274 | ||
275 | static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) | 275 | static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) |
276 | { | 276 | { |
277 | struct teql_master *master = (void*)dev->priv; | 277 | struct teql_master *master = netdev_priv(dev); |
278 | struct Qdisc *start, *q; | 278 | struct Qdisc *start, *q; |
279 | int busy; | 279 | int busy; |
280 | int nores; | 280 | int nores; |
@@ -350,7 +350,7 @@ drop: | |||
350 | static int teql_master_open(struct net_device *dev) | 350 | static int teql_master_open(struct net_device *dev) |
351 | { | 351 | { |
352 | struct Qdisc * q; | 352 | struct Qdisc * q; |
353 | struct teql_master *m = (void*)dev->priv; | 353 | struct teql_master *m = netdev_priv(dev); |
354 | int mtu = 0xFFFE; | 354 | int mtu = 0xFFFE; |
355 | unsigned flags = IFF_NOARP|IFF_MULTICAST; | 355 | unsigned flags = IFF_NOARP|IFF_MULTICAST; |
356 | 356 | ||
@@ -397,13 +397,13 @@ static int teql_master_close(struct net_device *dev) | |||
397 | 397 | ||
398 | static struct net_device_stats *teql_master_stats(struct net_device *dev) | 398 | static struct net_device_stats *teql_master_stats(struct net_device *dev) |
399 | { | 399 | { |
400 | struct teql_master *m = (void*)dev->priv; | 400 | struct teql_master *m = netdev_priv(dev); |
401 | return &m->stats; | 401 | return &m->stats; |
402 | } | 402 | } |
403 | 403 | ||
404 | static int teql_master_mtu(struct net_device *dev, int new_mtu) | 404 | static int teql_master_mtu(struct net_device *dev, int new_mtu) |
405 | { | 405 | { |
406 | struct teql_master *m = (void*)dev->priv; | 406 | struct teql_master *m = netdev_priv(dev); |
407 | struct Qdisc *q; | 407 | struct Qdisc *q; |
408 | 408 | ||
409 | if (new_mtu < 68) | 409 | if (new_mtu < 68) |
@@ -423,7 +423,7 @@ static int teql_master_mtu(struct net_device *dev, int new_mtu) | |||
423 | 423 | ||
424 | static __init void teql_master_setup(struct net_device *dev) | 424 | static __init void teql_master_setup(struct net_device *dev) |
425 | { | 425 | { |
426 | struct teql_master *master = dev->priv; | 426 | struct teql_master *master = netdev_priv(dev); |
427 | struct Qdisc_ops *ops = &master->qops; | 427 | struct Qdisc_ops *ops = &master->qops; |
428 | 428 | ||
429 | master->dev = dev; | 429 | master->dev = dev; |
@@ -476,7 +476,7 @@ static int __init teql_init(void) | |||
476 | break; | 476 | break; |
477 | } | 477 | } |
478 | 478 | ||
479 | master = dev->priv; | 479 | master = netdev_priv(dev); |
480 | 480 | ||
481 | strlcpy(master->qops.id, dev->name, IFNAMSIZ); | 481 | strlcpy(master->qops.id, dev->name, IFNAMSIZ); |
482 | err = register_qdisc(&master->qops); | 482 | err = register_qdisc(&master->qops); |