diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:25:16 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:20:08 -0500 |
commit | 10297b99315e5e08fe623ba56da35db1fee69ba9 (patch) | |
tree | 06cfd5434ad5d4cb9dd8e0715716da0abd52849c | |
parent | 7612713fb69a17b79ca7d757df4446700f4afe6c (diff) |
[NET] SCHED: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
33 files changed, 207 insertions, 207 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 835070e9169c..dd0868dfbd90 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -65,7 +65,7 @@ int tcf_hash_release(struct tcf_common *p, int bind, | |||
65 | p->tcfc_bindcnt--; | 65 | p->tcfc_bindcnt--; |
66 | 66 | ||
67 | p->tcfc_refcnt--; | 67 | p->tcfc_refcnt--; |
68 | if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) { | 68 | if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) { |
69 | tcf_hash_destroy(p, hinfo); | 69 | tcf_hash_destroy(p, hinfo); |
70 | ret = 1; | 70 | ret = 1; |
71 | } | 71 | } |
@@ -362,7 +362,7 @@ static struct tc_action_ops *tc_lookup_action_id(u32 type) | |||
362 | #endif | 362 | #endif |
363 | 363 | ||
364 | int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, | 364 | int tcf_action_exec(struct sk_buff *skb, struct tc_action *act, |
365 | struct tcf_result *res) | 365 | struct tcf_result *res) |
366 | { | 366 | { |
367 | struct tc_action *a; | 367 | struct tc_action *a; |
368 | int ret = -1; | 368 | int ret = -1; |
@@ -473,7 +473,7 @@ errout: | |||
473 | } | 473 | } |
474 | 474 | ||
475 | struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, | 475 | struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est, |
476 | char *name, int ovr, int bind, int *err) | 476 | char *name, int ovr, int bind, int *err) |
477 | { | 477 | { |
478 | struct tc_action *a; | 478 | struct tc_action *a; |
479 | struct tc_action_ops *a_o; | 479 | struct tc_action_ops *a_o; |
@@ -553,7 +553,7 @@ err_out: | |||
553 | } | 553 | } |
554 | 554 | ||
555 | struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est, | 555 | struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est, |
556 | char *name, int ovr, int bind, int *err) | 556 | char *name, int ovr, int bind, int *err) |
557 | { | 557 | { |
558 | struct rtattr *tb[TCA_ACT_MAX_PRIO+1]; | 558 | struct rtattr *tb[TCA_ACT_MAX_PRIO+1]; |
559 | struct tc_action *head = NULL, *act, *act_prev = NULL; | 559 | struct tc_action *head = NULL, *act, *act_prev = NULL; |
@@ -590,7 +590,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, | |||
590 | int err = 0; | 590 | int err = 0; |
591 | struct gnet_dump d; | 591 | struct gnet_dump d; |
592 | struct tcf_act_hdr *h = a->priv; | 592 | struct tcf_act_hdr *h = a->priv; |
593 | 593 | ||
594 | if (h == NULL) | 594 | if (h == NULL) |
595 | goto errout; | 595 | goto errout; |
596 | 596 | ||
@@ -632,7 +632,7 @@ errout: | |||
632 | 632 | ||
633 | static int | 633 | static int |
634 | tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | 634 | tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, |
635 | u16 flags, int event, int bind, int ref) | 635 | u16 flags, int event, int bind, int ref) |
636 | { | 636 | { |
637 | struct tcamsg *t; | 637 | struct tcamsg *t; |
638 | struct nlmsghdr *nlh; | 638 | struct nlmsghdr *nlh; |
@@ -645,7 +645,7 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | |||
645 | t->tca_family = AF_UNSPEC; | 645 | t->tca_family = AF_UNSPEC; |
646 | t->tca__pad1 = 0; | 646 | t->tca__pad1 = 0; |
647 | t->tca__pad2 = 0; | 647 | t->tca__pad2 = 0; |
648 | 648 | ||
649 | x = (struct rtattr*) skb->tail; | 649 | x = (struct rtattr*) skb->tail; |
650 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); | 650 | RTA_PUT(skb, TCA_ACT_TAB, 0, NULL); |
651 | 651 | ||
@@ -653,7 +653,7 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | |||
653 | goto rtattr_failure; | 653 | goto rtattr_failure; |
654 | 654 | ||
655 | x->rta_len = skb->tail - (u8*)x; | 655 | x->rta_len = skb->tail - (u8*)x; |
656 | 656 | ||
657 | nlh->nlmsg_len = skb->tail - b; | 657 | nlh->nlmsg_len = skb->tail - b; |
658 | return skb->len; | 658 | return skb->len; |
659 | 659 | ||
@@ -852,7 +852,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event) | |||
852 | } | 852 | } |
853 | 853 | ||
854 | if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event, | 854 | if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event, |
855 | 0, 1) <= 0) { | 855 | 0, 1) <= 0) { |
856 | kfree_skb(skb); | 856 | kfree_skb(skb); |
857 | ret = -EINVAL; | 857 | ret = -EINVAL; |
858 | goto err; | 858 | goto err; |
@@ -861,7 +861,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event) | |||
861 | /* now do the delete */ | 861 | /* now do the delete */ |
862 | tcf_action_destroy(head, 0); | 862 | tcf_action_destroy(head, 0); |
863 | ret = rtnetlink_send(skb, pid, RTNLGRP_TC, | 863 | ret = rtnetlink_send(skb, pid, RTNLGRP_TC, |
864 | n->nlmsg_flags&NLM_F_ECHO); | 864 | n->nlmsg_flags&NLM_F_ECHO); |
865 | if (ret > 0) | 865 | if (ret > 0) |
866 | return 0; | 866 | return 0; |
867 | return ret; | 867 | return ret; |
@@ -872,7 +872,7 @@ err: | |||
872 | } | 872 | } |
873 | 873 | ||
874 | static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | 874 | static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, |
875 | u16 flags) | 875 | u16 flags) |
876 | { | 876 | { |
877 | struct tcamsg *t; | 877 | struct tcamsg *t; |
878 | struct nlmsghdr *nlh; | 878 | struct nlmsghdr *nlh; |
@@ -900,10 +900,10 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
900 | goto rtattr_failure; | 900 | goto rtattr_failure; |
901 | 901 | ||
902 | x->rta_len = skb->tail - (u8*)x; | 902 | x->rta_len = skb->tail - (u8*)x; |
903 | 903 | ||
904 | nlh->nlmsg_len = skb->tail - b; | 904 | nlh->nlmsg_len = skb->tail - b; |
905 | NETLINK_CB(skb).dst_group = RTNLGRP_TC; | 905 | NETLINK_CB(skb).dst_group = RTNLGRP_TC; |
906 | 906 | ||
907 | err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO); | 907 | err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO); |
908 | if (err > 0) | 908 | if (err > 0) |
909 | err = 0; | 909 | err = 0; |
@@ -915,7 +915,7 @@ nlmsg_failure: | |||
915 | return -1; | 915 | return -1; |
916 | } | 916 | } |
917 | 917 | ||
918 | 918 | ||
919 | static int | 919 | static int |
920 | tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr) | 920 | tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr) |
921 | { | 921 | { |
@@ -999,13 +999,13 @@ find_dump_kind(struct nlmsghdr *n) | |||
999 | return NULL; | 999 | return NULL; |
1000 | 1000 | ||
1001 | if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1), | 1001 | if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1), |
1002 | NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0) | 1002 | NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0) |
1003 | return NULL; | 1003 | return NULL; |
1004 | if (tb[0] == NULL) | 1004 | if (tb[0] == NULL) |
1005 | return NULL; | 1005 | return NULL; |
1006 | 1006 | ||
1007 | if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]), | 1007 | if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]), |
1008 | RTA_PAYLOAD(tb[0])) < 0) | 1008 | RTA_PAYLOAD(tb[0])) < 0) |
1009 | return NULL; | 1009 | return NULL; |
1010 | kind = tb2[TCA_ACT_KIND-1]; | 1010 | kind = tb2[TCA_ACT_KIND-1]; |
1011 | 1011 | ||
@@ -1043,7 +1043,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb) | |||
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, | 1045 | nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, |
1046 | cb->nlh->nlmsg_type, sizeof(*t)); | 1046 | cb->nlh->nlmsg_type, sizeof(*t)); |
1047 | t = NLMSG_DATA(nlh); | 1047 | t = NLMSG_DATA(nlh); |
1048 | t->tca_family = AF_UNSPEC; | 1048 | t->tca_family = AF_UNSPEC; |
1049 | t->tca__pad1 = 0; | 1049 | t->tca__pad1 = 0; |
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index 85de7efd5fea..60095d86fd8f 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c | |||
@@ -65,7 +65,7 @@ static g_rand gact_rand[MAX_RAND]= { NULL, gact_net_rand, gact_determ }; | |||
65 | #endif /* CONFIG_GACT_PROB */ | 65 | #endif /* CONFIG_GACT_PROB */ |
66 | 66 | ||
67 | static int tcf_gact_init(struct rtattr *rta, struct rtattr *est, | 67 | static int tcf_gact_init(struct rtattr *rta, struct rtattr *est, |
68 | struct tc_action *a, int ovr, int bind) | 68 | struct tc_action *a, int ovr, int bind) |
69 | { | 69 | { |
70 | struct rtattr *tb[TCA_GACT_MAX]; | 70 | struct rtattr *tb[TCA_GACT_MAX]; |
71 | struct tc_gact *parm; | 71 | struct tc_gact *parm; |
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 4c68c718f5ec..0fdabfa9f4bf 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -70,7 +70,7 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int | |||
70 | } | 70 | } |
71 | if (t->u.kernel.target->checkentry | 71 | if (t->u.kernel.target->checkentry |
72 | && !t->u.kernel.target->checkentry(table, NULL, | 72 | && !t->u.kernel.target->checkentry(table, NULL, |
73 | t->u.kernel.target, t->data, | 73 | t->u.kernel.target, t->data, |
74 | hook)) { | 74 | hook)) { |
75 | module_put(t->u.kernel.target->me); | 75 | module_put(t->u.kernel.target->me); |
76 | ret = -EINVAL; | 76 | ret = -EINVAL; |
@@ -83,7 +83,7 @@ static void ipt_destroy_target(struct ipt_entry_target *t) | |||
83 | { | 83 | { |
84 | if (t->u.kernel.target->destroy) | 84 | if (t->u.kernel.target->destroy) |
85 | t->u.kernel.target->destroy(t->u.kernel.target, t->data); | 85 | t->u.kernel.target->destroy(t->u.kernel.target, t->data); |
86 | module_put(t->u.kernel.target->me); | 86 | module_put(t->u.kernel.target->me); |
87 | } | 87 | } |
88 | 88 | ||
89 | static int tcf_ipt_release(struct tcf_ipt *ipt, int bind) | 89 | static int tcf_ipt_release(struct tcf_ipt *ipt, int bind) |
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 8ac65c219b98..53aa96cd579b 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c | |||
@@ -153,8 +153,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, | |||
153 | if (tkey->offmask) { | 153 | if (tkey->offmask) { |
154 | if (skb->len > tkey->at) { | 154 | if (skb->len > tkey->at) { |
155 | char *j = pptr + tkey->at; | 155 | char *j = pptr + tkey->at; |
156 | offset += ((*j & tkey->offmask) >> | 156 | offset += ((*j & tkey->offmask) >> |
157 | tkey->shift); | 157 | tkey->shift); |
158 | } else { | 158 | } else { |
159 | goto bad; | 159 | goto bad; |
160 | } | 160 | } |
@@ -176,7 +176,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a, | |||
176 | *ptr = ((*ptr & tkey->mask) ^ tkey->val); | 176 | *ptr = ((*ptr & tkey->mask) ^ tkey->val); |
177 | munged++; | 177 | munged++; |
178 | } | 178 | } |
179 | 179 | ||
180 | if (munged) | 180 | if (munged) |
181 | skb->tc_verd = SET_TC_MUNGED(skb->tc_verd); | 181 | skb->tc_verd = SET_TC_MUNGED(skb->tc_verd); |
182 | goto done; | 182 | goto done; |
@@ -200,8 +200,8 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a, | |||
200 | struct tcf_pedit *p = a->priv; | 200 | struct tcf_pedit *p = a->priv; |
201 | struct tc_pedit *opt; | 201 | struct tc_pedit *opt; |
202 | struct tcf_t t; | 202 | struct tcf_t t; |
203 | int s; | 203 | int s; |
204 | 204 | ||
205 | s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key); | 205 | s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key); |
206 | 206 | ||
207 | /* netlink spinlocks held above us - must use ATOMIC */ | 207 | /* netlink spinlocks held above us - must use ATOMIC */ |
diff --git a/net/sched/act_police.c b/net/sched/act_police.c index af68e1e83251..6ffe35da22b1 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c | |||
@@ -62,7 +62,7 @@ struct tc_police_compat | |||
62 | 62 | ||
63 | #ifdef CONFIG_NET_CLS_ACT | 63 | #ifdef CONFIG_NET_CLS_ACT |
64 | static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *cb, | 64 | static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *cb, |
65 | int type, struct tc_action *a) | 65 | int type, struct tc_action *a) |
66 | { | 66 | { |
67 | struct tcf_common *p; | 67 | struct tcf_common *p; |
68 | int err = 0, index = -1, i = 0, s_i = 0, n_i = 0; | 68 | int err = 0, index = -1, i = 0, s_i = 0, n_i = 0; |
@@ -112,7 +112,7 @@ void tcf_police_destroy(struct tcf_police *p) | |||
112 | { | 112 | { |
113 | unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK); | 113 | unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK); |
114 | struct tcf_common **p1p; | 114 | struct tcf_common **p1p; |
115 | 115 | ||
116 | for (p1p = &tcf_police_ht[h]; *p1p; p1p = &(*p1p)->tcfc_next) { | 116 | for (p1p = &tcf_police_ht[h]; *p1p; p1p = &(*p1p)->tcfc_next) { |
117 | if (*p1p == &p->common) { | 117 | if (*p1p == &p->common) { |
118 | write_lock_bh(&police_lock); | 118 | write_lock_bh(&police_lock); |
@@ -135,7 +135,7 @@ void tcf_police_destroy(struct tcf_police *p) | |||
135 | 135 | ||
136 | #ifdef CONFIG_NET_CLS_ACT | 136 | #ifdef CONFIG_NET_CLS_ACT |
137 | static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, | 137 | static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, |
138 | struct tc_action *a, int ovr, int bind) | 138 | struct tc_action *a, int ovr, int bind) |
139 | { | 139 | { |
140 | unsigned h; | 140 | unsigned h; |
141 | int ret = 0, err; | 141 | int ret = 0, err; |
@@ -269,7 +269,7 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind) | |||
269 | } | 269 | } |
270 | 270 | ||
271 | static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, | 271 | static int tcf_act_police(struct sk_buff *skb, struct tc_action *a, |
272 | struct tcf_result *res) | 272 | struct tcf_result *res) |
273 | { | 273 | { |
274 | struct tcf_police *police = a->priv; | 274 | struct tcf_police *police = a->priv; |
275 | psched_time_t now; | 275 | psched_time_t now; |
@@ -606,12 +606,12 @@ rtattr_failure: | |||
606 | int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *police) | 606 | int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *police) |
607 | { | 607 | { |
608 | struct gnet_dump d; | 608 | struct gnet_dump d; |
609 | 609 | ||
610 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, | 610 | if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, |
611 | TCA_XSTATS, police->tcf_stats_lock, | 611 | TCA_XSTATS, police->tcf_stats_lock, |
612 | &d) < 0) | 612 | &d) < 0) |
613 | goto errout; | 613 | goto errout; |
614 | 614 | ||
615 | if (gnet_stats_copy_basic(&d, &police->tcf_bstats) < 0 || | 615 | if (gnet_stats_copy_basic(&d, &police->tcf_bstats) < 0 || |
616 | #ifdef CONFIG_NET_ESTIMATOR | 616 | #ifdef CONFIG_NET_ESTIMATOR |
617 | gnet_stats_copy_rate_est(&d, &police->tcf_rate_est) < 0 || | 617 | gnet_stats_copy_rate_est(&d, &police->tcf_rate_est) < 0 || |
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c index 5fe80854ca91..c7971182af07 100644 --- a/net/sched/act_simple.c +++ b/net/sched/act_simple.c | |||
@@ -43,9 +43,9 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result | |||
43 | d->tcf_bstats.bytes += skb->len; | 43 | d->tcf_bstats.bytes += skb->len; |
44 | d->tcf_bstats.packets++; | 44 | d->tcf_bstats.packets++; |
45 | 45 | ||
46 | /* print policy string followed by _ then packet count | 46 | /* print policy string followed by _ then packet count |
47 | * Example if this was the 3rd packet and the string was "hello" | 47 | * Example if this was the 3rd packet and the string was "hello" |
48 | * then it would look like "hello_3" (without quotes) | 48 | * then it would look like "hello_3" (without quotes) |
49 | **/ | 49 | **/ |
50 | printk("simple: %s_%d\n", | 50 | printk("simple: %s_%d\n", |
51 | (char *)d->tcfd_defdata, d->tcf_bstats.packets); | 51 | (char *)d->tcfd_defdata, d->tcf_bstats.packets); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index edb8fc97ae11..f41f4ee0587a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -286,7 +286,7 @@ replay: | |||
286 | goto errout; | 286 | goto errout; |
287 | } else { | 287 | } else { |
288 | switch (n->nlmsg_type) { | 288 | switch (n->nlmsg_type) { |
289 | case RTM_NEWTFILTER: | 289 | case RTM_NEWTFILTER: |
290 | err = -EEXIST; | 290 | err = -EEXIST; |
291 | if (n->nlmsg_flags&NLM_F_EXCL) | 291 | if (n->nlmsg_flags&NLM_F_EXCL) |
292 | goto errout; | 292 | goto errout; |
@@ -481,11 +481,11 @@ tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts) | |||
481 | 481 | ||
482 | int | 482 | int |
483 | tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb, | 483 | tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb, |
484 | struct rtattr *rate_tlv, struct tcf_exts *exts, | 484 | struct rtattr *rate_tlv, struct tcf_exts *exts, |
485 | struct tcf_ext_map *map) | 485 | struct tcf_ext_map *map) |
486 | { | 486 | { |
487 | memset(exts, 0, sizeof(*exts)); | 487 | memset(exts, 0, sizeof(*exts)); |
488 | 488 | ||
489 | #ifdef CONFIG_NET_CLS_ACT | 489 | #ifdef CONFIG_NET_CLS_ACT |
490 | { | 490 | { |
491 | int err; | 491 | int err; |
@@ -511,7 +511,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb, | |||
511 | #elif defined CONFIG_NET_CLS_POLICE | 511 | #elif defined CONFIG_NET_CLS_POLICE |
512 | if (map->police && tb[map->police-1]) { | 512 | if (map->police && tb[map->police-1]) { |
513 | struct tcf_police *p; | 513 | struct tcf_police *p; |
514 | 514 | ||
515 | p = tcf_police_locate(tb[map->police-1], rate_tlv); | 515 | p = tcf_police_locate(tb[map->police-1], rate_tlv); |
516 | if (p == NULL) | 516 | if (p == NULL) |
517 | return -EINVAL; | 517 | return -EINVAL; |
@@ -530,7 +530,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb, | |||
530 | 530 | ||
531 | void | 531 | void |
532 | tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, | 532 | tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst, |
533 | struct tcf_exts *src) | 533 | struct tcf_exts *src) |
534 | { | 534 | { |
535 | #ifdef CONFIG_NET_CLS_ACT | 535 | #ifdef CONFIG_NET_CLS_ACT |
536 | if (src->action) { | 536 | if (src->action) { |
@@ -597,7 +597,7 @@ rtattr_failure: __attribute__ ((unused)) | |||
597 | 597 | ||
598 | int | 598 | int |
599 | tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, | 599 | tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts, |
600 | struct tcf_ext_map *map) | 600 | struct tcf_ext_map *map) |
601 | { | 601 | { |
602 | #ifdef CONFIG_NET_CLS_ACT | 602 | #ifdef CONFIG_NET_CLS_ACT |
603 | if (exts->action) | 603 | if (exts->action) |
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 09fda68c8b39..ea13c2c5b061 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -98,7 +98,7 @@ static void basic_destroy(struct tcf_proto *tp) | |||
98 | { | 98 | { |
99 | struct basic_head *head = (struct basic_head *) xchg(&tp->root, NULL); | 99 | struct basic_head *head = (struct basic_head *) xchg(&tp->root, NULL); |
100 | struct basic_filter *f, *n; | 100 | struct basic_filter *f, *n; |
101 | 101 | ||
102 | list_for_each_entry_safe(f, n, &head->flist, link) { | 102 | list_for_each_entry_safe(f, n, &head->flist, link) { |
103 | list_del(&f->link); | 103 | list_del(&f->link); |
104 | basic_delete_filter(tp, f); | 104 | basic_delete_filter(tp, f); |
@@ -157,7 +157,7 @@ errout: | |||
157 | } | 157 | } |
158 | 158 | ||
159 | static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, | 159 | static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, |
160 | struct rtattr **tca, unsigned long *arg) | 160 | struct rtattr **tca, unsigned long *arg) |
161 | { | 161 | { |
162 | int err = -EINVAL; | 162 | int err = -EINVAL; |
163 | struct basic_head *head = (struct basic_head *) tp->root; | 163 | struct basic_head *head = (struct basic_head *) tp->root; |
@@ -292,7 +292,7 @@ static int __init init_basic(void) | |||
292 | return register_tcf_proto_ops(&cls_basic_ops); | 292 | return register_tcf_proto_ops(&cls_basic_ops); |
293 | } | 293 | } |
294 | 294 | ||
295 | static void __exit exit_basic(void) | 295 | static void __exit exit_basic(void) |
296 | { | 296 | { |
297 | unregister_tcf_proto_ops(&cls_basic_ops); | 297 | unregister_tcf_proto_ops(&cls_basic_ops); |
298 | } | 298 | } |
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index c797d6ada7de..2ce3ce5c66eb 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -91,7 +91,7 @@ static __inline__ int fw_hash(u32 handle) | |||
91 | else if (HTSIZE == 256) { | 91 | else if (HTSIZE == 256) { |
92 | u8 *t = (u8 *) &handle; | 92 | u8 *t = (u8 *) &handle; |
93 | return t[0] ^ t[1] ^ t[2] ^ t[3]; | 93 | return t[0] ^ t[1] ^ t[2] ^ t[3]; |
94 | } else | 94 | } else |
95 | return handle & (HTSIZE - 1); | 95 | return handle & (HTSIZE - 1); |
96 | } | 96 | } |
97 | 97 | ||
@@ -407,7 +407,7 @@ static int __init init_fw(void) | |||
407 | return register_tcf_proto_ops(&cls_fw_ops); | 407 | return register_tcf_proto_ops(&cls_fw_ops); |
408 | } | 408 | } |
409 | 409 | ||
410 | static void __exit exit_fw(void) | 410 | static void __exit exit_fw(void) |
411 | { | 411 | { |
412 | unregister_tcf_proto_ops(&cls_fw_ops); | 412 | unregister_tcf_proto_ops(&cls_fw_ops); |
413 | } | 413 | } |
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index 587b9adab38c..7853621a04cc 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 | else if (r > 0) \ | 130 | else if (r > 0) \ |
131 | return r; \ | 131 | return r; \ |
132 | } | 132 | } |
133 | 133 | ||
134 | static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, | 134 | static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp, |
135 | struct tcf_result *res) | 135 | struct tcf_result *res) |
136 | { | 136 | { |
@@ -347,7 +347,7 @@ static int tunnel_bts(struct rsvp_head *data) | |||
347 | { | 347 | { |
348 | int n = data->tgenerator>>5; | 348 | int n = data->tgenerator>>5; |
349 | u32 b = 1<<(data->tgenerator&0x1F); | 349 | u32 b = 1<<(data->tgenerator&0x1F); |
350 | 350 | ||
351 | if (data->tmap[n]&b) | 351 | if (data->tmap[n]&b) |
352 | return 0; | 352 | return 0; |
353 | data->tmap[n] |= b; | 353 | data->tmap[n] |= b; |
@@ -547,7 +547,7 @@ insert: | |||
547 | s->next = *sp; | 547 | s->next = *sp; |
548 | wmb(); | 548 | wmb(); |
549 | *sp = s; | 549 | *sp = s; |
550 | 550 | ||
551 | goto insert; | 551 | goto insert; |
552 | 552 | ||
553 | errout: | 553 | errout: |
@@ -654,7 +654,7 @@ static int __init init_rsvp(void) | |||
654 | return register_tcf_proto_ops(&RSVP_OPS); | 654 | return register_tcf_proto_ops(&RSVP_OPS); |
655 | } | 655 | } |
656 | 656 | ||
657 | static void __exit exit_rsvp(void) | 657 | static void __exit exit_rsvp(void) |
658 | { | 658 | { |
659 | unregister_tcf_proto_ops(&RSVP_OPS); | 659 | unregister_tcf_proto_ops(&RSVP_OPS); |
660 | } | 660 | } |
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index 5af8a59e1503..040e2d2d281a 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c | |||
@@ -222,7 +222,7 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
222 | err = tcf_exts_validate(tp, tb, est, &e, &tcindex_ext_map); | 222 | err = tcf_exts_validate(tp, tb, est, &e, &tcindex_ext_map); |
223 | if (err < 0) | 223 | if (err < 0) |
224 | return err; | 224 | return err; |
225 | 225 | ||
226 | memcpy(&cp, p, sizeof(cp)); | 226 | memcpy(&cp, p, sizeof(cp)); |
227 | memset(&new_filter_result, 0, sizeof(new_filter_result)); | 227 | memset(&new_filter_result, 0, sizeof(new_filter_result)); |
228 | 228 | ||
@@ -316,12 +316,12 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
316 | f = kzalloc(sizeof(*f), GFP_KERNEL); | 316 | f = kzalloc(sizeof(*f), GFP_KERNEL); |
317 | if (!f) | 317 | if (!f) |
318 | goto errout_alloc; | 318 | goto errout_alloc; |
319 | } | 319 | } |
320 | 320 | ||
321 | if (tb[TCA_TCINDEX_CLASSID-1]) { | 321 | if (tb[TCA_TCINDEX_CLASSID-1]) { |
322 | cr.res.classid = *(u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]); | 322 | cr.res.classid = *(u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]); |
323 | tcf_bind_filter(tp, &cr.res, base); | 323 | tcf_bind_filter(tp, &cr.res, base); |
324 | } | 324 | } |
325 | 325 | ||
326 | tcf_exts_change(tp, &cr.exts, &e); | 326 | tcf_exts_change(tp, &cr.exts, &e); |
327 | 327 | ||
@@ -341,7 +341,7 @@ tcindex_set_parms(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
341 | for (fp = p->h+(handle % p->hash); *fp; fp = &(*fp)->next) | 341 | for (fp = p->h+(handle % p->hash); *fp; fp = &(*fp)->next) |
342 | /* nothing */; | 342 | /* nothing */; |
343 | *fp = f; | 343 | *fp = f; |
344 | } | 344 | } |
345 | tcf_tree_unlock(tp); | 345 | tcf_tree_unlock(tp); |
346 | 346 | ||
347 | return 0; | 347 | return 0; |
@@ -491,7 +491,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh, | |||
491 | if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0) | 491 | if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0) |
492 | goto rtattr_failure; | 492 | goto rtattr_failure; |
493 | } | 493 | } |
494 | 494 | ||
495 | return skb->len; | 495 | return skb->len; |
496 | 496 | ||
497 | rtattr_failure: | 497 | rtattr_failure: |
@@ -519,7 +519,7 @@ static int __init init_tcindex(void) | |||
519 | return register_tcf_proto_ops(&cls_tcindex_ops); | 519 | return register_tcf_proto_ops(&cls_tcindex_ops); |
520 | } | 520 | } |
521 | 521 | ||
522 | static void __exit exit_tcindex(void) | 522 | static void __exit exit_tcindex(void) |
523 | { | 523 | { |
524 | unregister_tcf_proto_ops(&cls_tcindex_ops); | 524 | unregister_tcf_proto_ops(&cls_tcindex_ops); |
525 | } | 525 | } |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 8b5194801995..a232671cfa4e 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -760,7 +760,7 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh, | |||
760 | RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev); | 760 | RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev); |
761 | #endif | 761 | #endif |
762 | #ifdef CONFIG_CLS_U32_PERF | 762 | #ifdef CONFIG_CLS_U32_PERF |
763 | RTA_PUT(skb, TCA_U32_PCNT, | 763 | RTA_PUT(skb, TCA_U32_PCNT, |
764 | sizeof(struct tc_u32_pcnt) + n->sel.nkeys*sizeof(u64), | 764 | sizeof(struct tc_u32_pcnt) + n->sel.nkeys*sizeof(u64), |
765 | n->pf); | 765 | n->pf); |
766 | #endif | 766 | #endif |
@@ -810,7 +810,7 @@ static int __init init_u32(void) | |||
810 | return register_tcf_proto_ops(&cls_u32_ops); | 810 | return register_tcf_proto_ops(&cls_u32_ops); |
811 | } | 811 | } |
812 | 812 | ||
813 | static void __exit exit_u32(void) | 813 | static void __exit exit_u32(void) |
814 | { | 814 | { |
815 | unregister_tcf_proto_ops(&cls_u32_ops); | 815 | unregister_tcf_proto_ops(&cls_u32_ops); |
816 | } | 816 | } |
diff --git a/net/sched/em_cmp.c b/net/sched/em_cmp.c index 8ed93c39b4ea..8d6dacd81900 100644 --- a/net/sched/em_cmp.c +++ b/net/sched/em_cmp.c | |||
@@ -88,7 +88,7 @@ static int __init init_em_cmp(void) | |||
88 | return tcf_em_register(&em_cmp_ops); | 88 | return tcf_em_register(&em_cmp_ops); |
89 | } | 89 | } |
90 | 90 | ||
91 | static void __exit exit_em_cmp(void) | 91 | static void __exit exit_em_cmp(void) |
92 | { | 92 | { |
93 | tcf_em_unregister(&em_cmp_ops); | 93 | tcf_em_unregister(&em_cmp_ops); |
94 | } | 94 | } |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 45d47d37155e..60acf8cdb27b 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * Authors: Thomas Graf <tgraf@suug.ch> | 9 | * Authors: Thomas Graf <tgraf@suug.ch> |
10 | * | 10 | * |
11 | * ========================================================================== | 11 | * ========================================================================== |
12 | * | 12 | * |
13 | * The metadata ematch compares two meta objects where each object | 13 | * The metadata ematch compares two meta objects where each object |
14 | * represents either a meta value stored in the kernel or a static | 14 | * represents either a meta value stored in the kernel or a static |
15 | * value provided by userspace. The objects are not provided by | 15 | * value provided by userspace. The objects are not provided by |
@@ -290,7 +290,7 @@ META_COLLECTOR(var_sk_bound_if) | |||
290 | dst->len = 3; | 290 | dst->len = 3; |
291 | } else { | 291 | } else { |
292 | struct net_device *dev; | 292 | struct net_device *dev; |
293 | 293 | ||
294 | dev = dev_get_by_index(skb->sk->sk_bound_dev_if); | 294 | dev = dev_get_by_index(skb->sk->sk_bound_dev_if); |
295 | *err = var_dev(dev, dst); | 295 | *err = var_dev(dev, dst); |
296 | if (dev) | 296 | if (dev) |
@@ -671,7 +671,7 @@ static inline struct meta_type_ops * meta_type_ops(struct meta_value *v) | |||
671 | * Core | 671 | * Core |
672 | **************************************************************************/ | 672 | **************************************************************************/ |
673 | 673 | ||
674 | static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info, | 674 | static inline int meta_get(struct sk_buff *skb, struct tcf_pkt_info *info, |
675 | struct meta_value *v, struct meta_obj *dst) | 675 | struct meta_value *v, struct meta_obj *dst) |
676 | { | 676 | { |
677 | int err = 0; | 677 | int err = 0; |
@@ -753,7 +753,7 @@ static int em_meta_change(struct tcf_proto *tp, void *data, int len, | |||
753 | struct rtattr *tb[TCA_EM_META_MAX]; | 753 | struct rtattr *tb[TCA_EM_META_MAX]; |
754 | struct tcf_meta_hdr *hdr; | 754 | struct tcf_meta_hdr *hdr; |
755 | struct meta_match *meta = NULL; | 755 | struct meta_match *meta = NULL; |
756 | 756 | ||
757 | if (rtattr_parse(tb, TCA_EM_META_MAX, data, len) < 0) | 757 | if (rtattr_parse(tb, TCA_EM_META_MAX, data, len) < 0) |
758 | goto errout; | 758 | goto errout; |
759 | 759 | ||
@@ -822,7 +822,7 @@ static int em_meta_dump(struct sk_buff *skb, struct tcf_ematch *em) | |||
822 | 822 | ||
823 | rtattr_failure: | 823 | rtattr_failure: |
824 | return -1; | 824 | return -1; |
825 | } | 825 | } |
826 | 826 | ||
827 | static struct tcf_ematch_ops em_meta_ops = { | 827 | static struct tcf_ematch_ops em_meta_ops = { |
828 | .kind = TCF_EM_META, | 828 | .kind = TCF_EM_META, |
@@ -839,7 +839,7 @@ static int __init init_em_meta(void) | |||
839 | return tcf_em_register(&em_meta_ops); | 839 | return tcf_em_register(&em_meta_ops); |
840 | } | 840 | } |
841 | 841 | ||
842 | static void __exit exit_em_meta(void) | 842 | static void __exit exit_em_meta(void) |
843 | { | 843 | { |
844 | tcf_em_unregister(&em_meta_ops); | 844 | tcf_em_unregister(&em_meta_ops); |
845 | } | 845 | } |
diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c index 005db409be64..42103b2bdc51 100644 --- a/net/sched/em_nbyte.c +++ b/net/sched/em_nbyte.c | |||
@@ -23,7 +23,7 @@ struct nbyte_data | |||
23 | struct tcf_em_nbyte hdr; | 23 | struct tcf_em_nbyte hdr; |
24 | char pattern[0]; | 24 | char pattern[0]; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len, | 27 | static int em_nbyte_change(struct tcf_proto *tp, void *data, int data_len, |
28 | struct tcf_ematch *em) | 28 | struct tcf_ematch *em) |
29 | { | 29 | { |
@@ -68,7 +68,7 @@ static int __init init_em_nbyte(void) | |||
68 | return tcf_em_register(&em_nbyte_ops); | 68 | return tcf_em_register(&em_nbyte_ops); |
69 | } | 69 | } |
70 | 70 | ||
71 | static void __exit exit_em_nbyte(void) | 71 | static void __exit exit_em_nbyte(void) |
72 | { | 72 | { |
73 | tcf_em_unregister(&em_nbyte_ops); | 73 | tcf_em_unregister(&em_nbyte_ops); |
74 | } | 74 | } |
diff --git a/net/sched/em_text.c b/net/sched/em_text.c index aa17d8f7c4c8..8ad894b58fce 100644 --- a/net/sched/em_text.c +++ b/net/sched/em_text.c | |||
@@ -125,7 +125,7 @@ static int em_text_dump(struct sk_buff *skb, struct tcf_ematch *m) | |||
125 | 125 | ||
126 | rtattr_failure: | 126 | rtattr_failure: |
127 | return -1; | 127 | return -1; |
128 | } | 128 | } |
129 | 129 | ||
130 | static struct tcf_ematch_ops em_text_ops = { | 130 | static struct tcf_ematch_ops em_text_ops = { |
131 | .kind = TCF_EM_TEXT, | 131 | .kind = TCF_EM_TEXT, |
@@ -142,7 +142,7 @@ static int __init init_em_text(void) | |||
142 | return tcf_em_register(&em_text_ops); | 142 | return tcf_em_register(&em_text_ops); |
143 | } | 143 | } |
144 | 144 | ||
145 | static void __exit exit_em_text(void) | 145 | static void __exit exit_em_text(void) |
146 | { | 146 | { |
147 | tcf_em_unregister(&em_text_ops); | 147 | tcf_em_unregister(&em_text_ops); |
148 | } | 148 | } |
diff --git a/net/sched/em_u32.c b/net/sched/em_u32.c index e3ddfce0ac8d..cd0600c67969 100644 --- a/net/sched/em_u32.c +++ b/net/sched/em_u32.c | |||
@@ -23,7 +23,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em, | |||
23 | { | 23 | { |
24 | struct tc_u32_key *key = (struct tc_u32_key *) em->data; | 24 | struct tc_u32_key *key = (struct tc_u32_key *) em->data; |
25 | unsigned char *ptr = skb->nh.raw; | 25 | unsigned char *ptr = skb->nh.raw; |
26 | 26 | ||
27 | if (info) { | 27 | if (info) { |
28 | if (info->ptr) | 28 | if (info->ptr) |
29 | ptr = info->ptr; | 29 | ptr = info->ptr; |
@@ -34,7 +34,7 @@ static int em_u32_match(struct sk_buff *skb, struct tcf_ematch *em, | |||
34 | 34 | ||
35 | if (!tcf_valid_offset(skb, ptr, sizeof(u32))) | 35 | if (!tcf_valid_offset(skb, ptr, sizeof(u32))) |
36 | return 0; | 36 | return 0; |
37 | 37 | ||
38 | return !(((*(u32*) ptr) ^ key->val) & key->mask); | 38 | return !(((*(u32*) ptr) ^ key->val) & key->mask); |
39 | } | 39 | } |
40 | 40 | ||
@@ -51,7 +51,7 @@ static int __init init_em_u32(void) | |||
51 | return tcf_em_register(&em_u32_ops); | 51 | return tcf_em_register(&em_u32_ops); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void __exit exit_em_u32(void) | 54 | static void __exit exit_em_u32(void) |
55 | { | 55 | { |
56 | tcf_em_unregister(&em_u32_ops); | 56 | tcf_em_unregister(&em_u32_ops); |
57 | } | 57 | } |
diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 8f8a16da72a8..d3ad36b36129 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c | |||
@@ -37,12 +37,12 @@ | |||
37 | * --------<-POP--------- | 37 | * --------<-POP--------- |
38 | * | 38 | * |
39 | * where B is a virtual ematch referencing to sequence starting with B1. | 39 | * where B is a virtual ematch referencing to sequence starting with B1. |
40 | * | 40 | * |
41 | * ========================================================================== | 41 | * ========================================================================== |
42 | * | 42 | * |
43 | * How to write an ematch in 60 seconds | 43 | * How to write an ematch in 60 seconds |
44 | * ------------------------------------ | 44 | * ------------------------------------ |
45 | * | 45 | * |
46 | * 1) Provide a matcher function: | 46 | * 1) Provide a matcher function: |
47 | * static int my_match(struct sk_buff *skb, struct tcf_ematch *m, | 47 | * static int my_match(struct sk_buff *skb, struct tcf_ematch *m, |
48 | * struct tcf_pkt_info *info) | 48 | * struct tcf_pkt_info *info) |
@@ -115,7 +115,7 @@ static inline struct tcf_ematch_ops * tcf_em_lookup(u16 kind) | |||
115 | 115 | ||
116 | /** | 116 | /** |
117 | * tcf_em_register - register an extended match | 117 | * tcf_em_register - register an extended match |
118 | * | 118 | * |
119 | * @ops: ematch operations lookup table | 119 | * @ops: ematch operations lookup table |
120 | * | 120 | * |
121 | * This function must be called by ematches to announce their presence. | 121 | * This function must be called by ematches to announce their presence. |
@@ -211,7 +211,7 @@ static int tcf_em_validate(struct tcf_proto *tp, | |||
211 | if (ref <= idx) | 211 | if (ref <= idx) |
212 | goto errout; | 212 | goto errout; |
213 | 213 | ||
214 | 214 | ||
215 | em->data = ref; | 215 | em->data = ref; |
216 | } else { | 216 | } else { |
217 | /* Note: This lookup will increase the module refcnt | 217 | /* Note: This lookup will increase the module refcnt |
@@ -327,7 +327,7 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta, | |||
327 | /* We do not use rtattr_parse_nested here because the maximum | 327 | /* We do not use rtattr_parse_nested here because the maximum |
328 | * number of attributes is unknown. This saves us the allocation | 328 | * number of attributes is unknown. This saves us the allocation |
329 | * for a tb buffer which would serve no purpose at all. | 329 | * for a tb buffer which would serve no purpose at all. |
330 | * | 330 | * |
331 | * The array of rt attributes is parsed in the order as they are | 331 | * The array of rt attributes is parsed in the order as they are |
332 | * provided, their type must be incremental from 1 to n. Even | 332 | * provided, their type must be incremental from 1 to n. Even |
333 | * if it does not serve any real purpose, a failure of sticking | 333 | * if it does not serve any real purpose, a failure of sticking |
@@ -399,7 +399,7 @@ void tcf_em_tree_destroy(struct tcf_proto *tp, struct tcf_ematch_tree *tree) | |||
399 | module_put(em->ops->owner); | 399 | module_put(em->ops->owner); |
400 | } | 400 | } |
401 | } | 401 | } |
402 | 402 | ||
403 | tree->hdr.nmatches = 0; | 403 | tree->hdr.nmatches = 0; |
404 | kfree(tree->matches); | 404 | kfree(tree->matches); |
405 | } | 405 | } |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 65825f4409d9..60b92fcdc8bb 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -389,7 +389,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, | |||
389 | struct Qdisc *q = *old; | 389 | struct Qdisc *q = *old; |
390 | 390 | ||
391 | 391 | ||
392 | if (parent == NULL) { | 392 | if (parent == NULL) { |
393 | if (q && q->flags&TCQ_F_INGRESS) { | 393 | if (q && q->flags&TCQ_F_INGRESS) { |
394 | *old = dev_graft_qdisc(dev, q); | 394 | *old = dev_graft_qdisc(dev, q); |
395 | } else { | 395 | } else { |
@@ -596,7 +596,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
596 | q = qdisc_leaf(p, clid); | 596 | q = qdisc_leaf(p, clid); |
597 | } else { /* ingress */ | 597 | } else { /* ingress */ |
598 | q = dev->qdisc_ingress; | 598 | q = dev->qdisc_ingress; |
599 | } | 599 | } |
600 | } else { | 600 | } else { |
601 | q = dev->qdisc_sleeping; | 601 | q = dev->qdisc_sleeping; |
602 | } | 602 | } |
@@ -743,7 +743,7 @@ create_n_graft: | |||
743 | return -ENOENT; | 743 | return -ENOENT; |
744 | if (clid == TC_H_INGRESS) | 744 | if (clid == TC_H_INGRESS) |
745 | q = qdisc_create(dev, tcm->tcm_parent, tca, &err); | 745 | q = qdisc_create(dev, tcm->tcm_parent, tca, &err); |
746 | else | 746 | else |
747 | q = qdisc_create(dev, tcm->tcm_handle, tca, &err); | 747 | q = qdisc_create(dev, tcm->tcm_handle, tca, &err); |
748 | if (q == NULL) { | 748 | if (q == NULL) { |
749 | if (err == -EAGAIN) | 749 | if (err == -EAGAIN) |
@@ -808,10 +808,10 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
808 | #endif | 808 | #endif |
809 | gnet_stats_copy_queue(&d, &q->qstats) < 0) | 809 | gnet_stats_copy_queue(&d, &q->qstats) < 0) |
810 | goto rtattr_failure; | 810 | goto rtattr_failure; |
811 | 811 | ||
812 | if (gnet_stats_finish_copy(&d) < 0) | 812 | if (gnet_stats_finish_copy(&d) < 0) |
813 | goto rtattr_failure; | 813 | goto rtattr_failure; |
814 | 814 | ||
815 | nlh->nlmsg_len = skb->tail - b; | 815 | nlh->nlmsg_len = skb->tail - b; |
816 | return skb->len; | 816 | return skb->len; |
817 | 817 | ||
@@ -954,7 +954,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
954 | } | 954 | } |
955 | 955 | ||
956 | /* OK. Locate qdisc */ | 956 | /* OK. Locate qdisc */ |
957 | if ((q = qdisc_lookup(dev, qid)) == NULL) | 957 | if ((q = qdisc_lookup(dev, qid)) == NULL) |
958 | return -ENOENT; | 958 | return -ENOENT; |
959 | 959 | ||
960 | /* An check that it supports classes */ | 960 | /* An check that it supports classes */ |
@@ -978,7 +978,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) | |||
978 | goto out; | 978 | goto out; |
979 | } else { | 979 | } else { |
980 | switch (n->nlmsg_type) { | 980 | switch (n->nlmsg_type) { |
981 | case RTM_NEWTCLASS: | 981 | case RTM_NEWTCLASS: |
982 | err = -EEXIST; | 982 | err = -EEXIST; |
983 | if (n->nlmsg_flags&NLM_F_EXCL) | 983 | if (n->nlmsg_flags&NLM_F_EXCL) |
984 | goto out; | 984 | goto out; |
@@ -1162,7 +1162,7 @@ reclassify: | |||
1162 | skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd); | 1162 | skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd); |
1163 | goto reclassify; | 1163 | goto reclassify; |
1164 | } else { | 1164 | } else { |
1165 | if (skb->tc_verd) | 1165 | if (skb->tc_verd) |
1166 | skb->tc_verd = SET_TC_VERD(skb->tc_verd,0); | 1166 | skb->tc_verd = SET_TC_VERD(skb->tc_verd,0); |
1167 | return err; | 1167 | return err; |
1168 | } | 1168 | } |
@@ -1200,7 +1200,7 @@ static struct file_operations psched_fops = { | |||
1200 | .read = seq_read, | 1200 | .read = seq_read, |
1201 | .llseek = seq_lseek, | 1201 | .llseek = seq_lseek, |
1202 | .release = single_release, | 1202 | .release = single_release, |
1203 | }; | 1203 | }; |
1204 | #endif | 1204 | #endif |
1205 | 1205 | ||
1206 | #ifdef CONFIG_NET_SCH_CLK_CPU | 1206 | #ifdef CONFIG_NET_SCH_CLK_CPU |
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index edc7bb0b9c8b..afb3bbd571f2 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c | |||
@@ -107,7 +107,7 @@ static __inline__ struct atm_flow_data *lookup_flow(struct Qdisc *sch, | |||
107 | struct atm_qdisc_data *p = PRIV(sch); | 107 | struct atm_qdisc_data *p = PRIV(sch); |
108 | struct atm_flow_data *flow; | 108 | struct atm_flow_data *flow; |
109 | 109 | ||
110 | for (flow = p->flows; flow; flow = flow->next) | 110 | for (flow = p->flows; flow; flow = flow->next) |
111 | if (flow->classid == classid) break; | 111 | if (flow->classid == classid) break; |
112 | return flow; | 112 | return flow; |
113 | } | 113 | } |
@@ -125,7 +125,7 @@ static int atm_tc_graft(struct Qdisc *sch,unsigned long arg, | |||
125 | if (!new) new = &noop_qdisc; | 125 | if (!new) new = &noop_qdisc; |
126 | *old = xchg(&flow->q,new); | 126 | *old = xchg(&flow->q,new); |
127 | if (*old) qdisc_reset(*old); | 127 | if (*old) qdisc_reset(*old); |
128 | return 0; | 128 | return 0; |
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
@@ -145,7 +145,7 @@ static unsigned long atm_tc_get(struct Qdisc *sch,u32 classid) | |||
145 | 145 | ||
146 | DPRINTK("atm_tc_get(sch %p,[qdisc %p],classid %x)\n",sch,p,classid); | 146 | DPRINTK("atm_tc_get(sch %p,[qdisc %p],classid %x)\n",sch,p,classid); |
147 | flow = lookup_flow(sch,classid); | 147 | flow = lookup_flow(sch,classid); |
148 | if (flow) flow->ref++; | 148 | if (flow) flow->ref++; |
149 | DPRINTK("atm_tc_get: flow %p\n",flow); | 149 | DPRINTK("atm_tc_get: flow %p\n",flow); |
150 | return (unsigned long) flow; | 150 | return (unsigned long) flow; |
151 | } | 151 | } |
@@ -280,9 +280,9 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
280 | opt->rta_type,RTA_PAYLOAD(opt),hdr_len); | 280 | opt->rta_type,RTA_PAYLOAD(opt),hdr_len); |
281 | if (!(sock = sockfd_lookup(fd,&error))) return error; /* f_count++ */ | 281 | if (!(sock = sockfd_lookup(fd,&error))) return error; /* f_count++ */ |
282 | DPRINTK("atm_tc_change: f_count %d\n",file_count(sock->file)); | 282 | DPRINTK("atm_tc_change: f_count %d\n",file_count(sock->file)); |
283 | if (sock->ops->family != PF_ATMSVC && sock->ops->family != PF_ATMPVC) { | 283 | if (sock->ops->family != PF_ATMSVC && sock->ops->family != PF_ATMPVC) { |
284 | error = -EPROTOTYPE; | 284 | error = -EPROTOTYPE; |
285 | goto err_out; | 285 | goto err_out; |
286 | } | 286 | } |
287 | /* @@@ should check if the socket is really operational or we'll crash | 287 | /* @@@ should check if the socket is really operational or we'll crash |
288 | on vcc->send */ | 288 | on vcc->send */ |
@@ -320,9 +320,9 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
320 | flow->q = &noop_qdisc; | 320 | flow->q = &noop_qdisc; |
321 | DPRINTK("atm_tc_change: qdisc %p\n",flow->q); | 321 | DPRINTK("atm_tc_change: qdisc %p\n",flow->q); |
322 | flow->sock = sock; | 322 | flow->sock = sock; |
323 | flow->vcc = ATM_SD(sock); /* speedup */ | 323 | flow->vcc = ATM_SD(sock); /* speedup */ |
324 | flow->vcc->user_back = flow; | 324 | flow->vcc->user_back = flow; |
325 | DPRINTK("atm_tc_change: vcc %p\n",flow->vcc); | 325 | DPRINTK("atm_tc_change: vcc %p\n",flow->vcc); |
326 | flow->old_pop = flow->vcc->pop; | 326 | flow->old_pop = flow->vcc->pop; |
327 | flow->parent = p; | 327 | flow->parent = p; |
328 | flow->vcc->pop = sch_atm_pop; | 328 | flow->vcc->pop = sch_atm_pop; |
@@ -391,7 +391,7 @@ static struct tcf_proto **atm_tc_find_tcf(struct Qdisc *sch,unsigned long cl) | |||
391 | struct atm_flow_data *flow = (struct atm_flow_data *) cl; | 391 | struct atm_flow_data *flow = (struct atm_flow_data *) cl; |
392 | 392 | ||
393 | DPRINTK("atm_tc_find_tcf(sch %p,[qdisc %p],flow %p)\n",sch,p,flow); | 393 | DPRINTK("atm_tc_find_tcf(sch %p,[qdisc %p],flow %p)\n",sch,p,flow); |
394 | return flow ? &flow->filter_list : &p->link.filter_list; | 394 | return flow ? &flow->filter_list : &p->link.filter_list; |
395 | } | 395 | } |
396 | 396 | ||
397 | 397 | ||
@@ -546,8 +546,8 @@ static int atm_tc_requeue(struct sk_buff *skb,struct Qdisc *sch) | |||
546 | D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); | 546 | D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); |
547 | ret = p->link.q->ops->requeue(skb,p->link.q); | 547 | ret = p->link.q->ops->requeue(skb,p->link.q); |
548 | if (!ret) { | 548 | if (!ret) { |
549 | sch->q.qlen++; | 549 | sch->q.qlen++; |
550 | sch->qstats.requeues++; | 550 | sch->qstats.requeues++; |
551 | } else { | 551 | } else { |
552 | sch->qstats.drops++; | 552 | sch->qstats.drops++; |
553 | p->link.qstats.drops++; | 553 | p->link.qstats.drops++; |
@@ -726,7 +726,7 @@ static int __init atm_init(void) | |||
726 | return register_qdisc(&atm_qdisc_ops); | 726 | return register_qdisc(&atm_qdisc_ops); |
727 | } | 727 | } |
728 | 728 | ||
729 | static void __exit atm_exit(void) | 729 | static void __exit atm_exit(void) |
730 | { | 730 | { |
731 | unregister_qdisc(&atm_qdisc_ops); | 731 | unregister_qdisc(&atm_qdisc_ops); |
732 | } | 732 | } |
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index f79a4f3d0a95..48830cac1014 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -40,12 +40,12 @@ | |||
40 | ======================================= | 40 | ======================================= |
41 | 41 | ||
42 | Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource | 42 | Sources: [1] Sally Floyd and Van Jacobson, "Link-sharing and Resource |
43 | Management Models for Packet Networks", | 43 | Management Models for Packet Networks", |
44 | IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995 | 44 | IEEE/ACM Transactions on Networking, Vol.3, No.4, 1995 |
45 | 45 | ||
46 | [2] Sally Floyd, "Notes on CBQ and Guaranteed Service", 1995 | 46 | [2] Sally Floyd, "Notes on CBQ and Guaranteed Service", 1995 |
47 | 47 | ||
48 | [3] Sally Floyd, "Notes on Class-Based Queueing: Setting | 48 | [3] Sally Floyd, "Notes on Class-Based Queueing: Setting |
49 | Parameters", 1996 | 49 | Parameters", 1996 |
50 | 50 | ||
51 | [4] Sally Floyd and Michael Speer, "Experimental Results | 51 | [4] Sally Floyd and Michael Speer, "Experimental Results |
@@ -59,12 +59,12 @@ | |||
59 | the implementation is different. Particularly: | 59 | the implementation is different. Particularly: |
60 | 60 | ||
61 | --- The WRR algorithm is different. Our version looks more | 61 | --- The WRR algorithm is different. Our version looks more |
62 | reasonable (I hope) and works when quanta are allowed to be | 62 | reasonable (I hope) and works when quanta are allowed to be |
63 | less than MTU, which is always the case when real time classes | 63 | less than MTU, which is always the case when real time classes |
64 | have small rates. Note, that the statement of [3] is | 64 | have small rates. Note, that the statement of [3] is |
65 | incomplete, delay may actually be estimated even if class | 65 | incomplete, delay may actually be estimated even if class |
66 | per-round allotment is less than MTU. Namely, if per-round | 66 | per-round allotment is less than MTU. Namely, if per-round |
67 | allotment is W*r_i, and r_1+...+r_k = r < 1 | 67 | allotment is W*r_i, and r_1+...+r_k = r < 1 |
68 | 68 | ||
69 | delay_i <= ([MTU/(W*r_i)]*W*r + W*r + k*MTU)/B | 69 | delay_i <= ([MTU/(W*r_i)]*W*r + W*r + k*MTU)/B |
70 | 70 | ||
@@ -280,7 +280,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
280 | #ifdef CONFIG_NET_CLS_ACT | 280 | #ifdef CONFIG_NET_CLS_ACT |
281 | switch (result) { | 281 | switch (result) { |
282 | case TC_ACT_QUEUED: | 282 | case TC_ACT_QUEUED: |
283 | case TC_ACT_STOLEN: | 283 | case TC_ACT_STOLEN: |
284 | *qerr = NET_XMIT_SUCCESS; | 284 | *qerr = NET_XMIT_SUCCESS; |
285 | case TC_ACT_SHOT: | 285 | case TC_ACT_SHOT: |
286 | return NULL; | 286 | return NULL; |
@@ -479,7 +479,7 @@ static void cbq_ovl_classic(struct cbq_class *cl) | |||
479 | if (!cl->delayed) { | 479 | if (!cl->delayed) { |
480 | delay += cl->offtime; | 480 | delay += cl->offtime; |
481 | 481 | ||
482 | /* | 482 | /* |
483 | Class goes to sleep, so that it will have no | 483 | Class goes to sleep, so that it will have no |
484 | chance to work avgidle. Let's forgive it 8) | 484 | chance to work avgidle. Let's forgive it 8) |
485 | 485 | ||
@@ -717,7 +717,7 @@ static int cbq_reshape_fail(struct sk_buff *skb, struct Qdisc *child) | |||
717 | } | 717 | } |
718 | #endif | 718 | #endif |
719 | 719 | ||
720 | /* | 720 | /* |
721 | It is mission critical procedure. | 721 | It is mission critical procedure. |
722 | 722 | ||
723 | We "regenerate" toplevel cutoff, if transmitting class | 723 | We "regenerate" toplevel cutoff, if transmitting class |
@@ -739,7 +739,7 @@ cbq_update_toplevel(struct cbq_sched_data *q, struct cbq_class *cl, | |||
739 | } | 739 | } |
740 | } while ((borrowed=borrowed->borrow) != NULL); | 740 | } while ((borrowed=borrowed->borrow) != NULL); |
741 | } | 741 | } |
742 | #if 0 | 742 | #if 0 |
743 | /* It is not necessary now. Uncommenting it | 743 | /* It is not necessary now. Uncommenting it |
744 | will save CPU cycles, but decrease fairness. | 744 | will save CPU cycles, but decrease fairness. |
745 | */ | 745 | */ |
@@ -768,7 +768,7 @@ cbq_update(struct cbq_sched_data *q) | |||
768 | (now - last) is total time between packet right edges. | 768 | (now - last) is total time between packet right edges. |
769 | (last_pktlen/rate) is "virtual" busy time, so that | 769 | (last_pktlen/rate) is "virtual" busy time, so that |
770 | 770 | ||
771 | idle = (now - last) - last_pktlen/rate | 771 | idle = (now - last) - last_pktlen/rate |
772 | */ | 772 | */ |
773 | 773 | ||
774 | idle = PSCHED_TDIFF(q->now, cl->last); | 774 | idle = PSCHED_TDIFF(q->now, cl->last); |
@@ -907,7 +907,7 @@ cbq_dequeue_prio(struct Qdisc *sch, int prio) | |||
907 | skb = cl->q->dequeue(cl->q); | 907 | skb = cl->q->dequeue(cl->q); |
908 | 908 | ||
909 | /* Class did not give us any skb :-( | 909 | /* Class did not give us any skb :-( |
910 | It could occur even if cl->q->q.qlen != 0 | 910 | It could occur even if cl->q->q.qlen != 0 |
911 | f.e. if cl->q == "tbf" | 911 | f.e. if cl->q == "tbf" |
912 | */ | 912 | */ |
913 | if (skb == NULL) | 913 | if (skb == NULL) |
@@ -2131,7 +2131,7 @@ static int __init cbq_module_init(void) | |||
2131 | { | 2131 | { |
2132 | return register_qdisc(&cbq_qdisc_ops); | 2132 | return register_qdisc(&cbq_qdisc_ops); |
2133 | } | 2133 | } |
2134 | static void __exit cbq_module_exit(void) | 2134 | static void __exit cbq_module_exit(void) |
2135 | { | 2135 | { |
2136 | unregister_qdisc(&cbq_qdisc_ops); | 2136 | unregister_qdisc(&cbq_qdisc_ops); |
2137 | } | 2137 | } |
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index d5421816f007..96324cf4e6a9 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -68,7 +68,7 @@ static inline int dsmark_valid_indices(u16 indices) | |||
68 | return 0; | 68 | return 0; |
69 | indices >>= 1; | 69 | indices >>= 1; |
70 | } | 70 | } |
71 | 71 | ||
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | 74 | ||
@@ -100,7 +100,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg, | |||
100 | qdisc_reset(*old); | 100 | qdisc_reset(*old); |
101 | sch_tree_unlock(sch); | 101 | sch_tree_unlock(sch); |
102 | 102 | ||
103 | return 0; | 103 | return 0; |
104 | } | 104 | } |
105 | 105 | ||
106 | static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg) | 106 | static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg) |
@@ -151,7 +151,7 @@ static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
151 | 151 | ||
152 | if (tb[TCA_DSMARK_VALUE-1]) | 152 | if (tb[TCA_DSMARK_VALUE-1]) |
153 | p->value[*arg-1] = RTA_GET_U8(tb[TCA_DSMARK_VALUE-1]); | 153 | p->value[*arg-1] = RTA_GET_U8(tb[TCA_DSMARK_VALUE-1]); |
154 | 154 | ||
155 | if (tb[TCA_DSMARK_MASK-1]) | 155 | if (tb[TCA_DSMARK_MASK-1]) |
156 | p->mask[*arg-1] = mask; | 156 | p->mask[*arg-1] = mask; |
157 | 157 | ||
@@ -167,7 +167,7 @@ static int dsmark_delete(struct Qdisc *sch, unsigned long arg) | |||
167 | 167 | ||
168 | if (!dsmark_valid_index(p, arg)) | 168 | if (!dsmark_valid_index(p, arg)) |
169 | return -EINVAL; | 169 | return -EINVAL; |
170 | 170 | ||
171 | p->mask[arg-1] = 0xff; | 171 | p->mask[arg-1] = 0xff; |
172 | p->value[arg-1] = 0; | 172 | p->value[arg-1] = 0; |
173 | 173 | ||
@@ -193,9 +193,9 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker) | |||
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | ignore: | 196 | ignore: |
197 | walker->count++; | 197 | walker->count++; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl) | 201 | static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl) |
@@ -338,7 +338,7 @@ static unsigned int dsmark_drop(struct Qdisc *sch) | |||
338 | { | 338 | { |
339 | struct dsmark_qdisc_data *p = PRIV(sch); | 339 | struct dsmark_qdisc_data *p = PRIV(sch); |
340 | unsigned int len; | 340 | unsigned int len; |
341 | 341 | ||
342 | DPRINTK("dsmark_reset(sch %p,[qdisc %p])\n", sch, p); | 342 | DPRINTK("dsmark_reset(sch %p,[qdisc %p])\n", sch, p); |
343 | 343 | ||
344 | if (p->q->ops->drop == NULL) | 344 | if (p->q->ops->drop == NULL) |
@@ -506,7 +506,7 @@ static int __init dsmark_module_init(void) | |||
506 | return register_qdisc(&dsmark_qdisc_ops); | 506 | return register_qdisc(&dsmark_qdisc_ops); |
507 | } | 507 | } |
508 | 508 | ||
509 | static void __exit dsmark_module_exit(void) | 509 | static void __exit dsmark_module_exit(void) |
510 | { | 510 | { |
511 | unregister_qdisc(&dsmark_qdisc_ops); | 511 | unregister_qdisc(&dsmark_qdisc_ops); |
512 | } | 512 | } |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 3b6e6a780927..52eb3439d7c6 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | /* Main transmission queue. */ | 37 | /* Main transmission queue. */ |
38 | 38 | ||
39 | /* Main qdisc structure lock. | 39 | /* Main qdisc structure lock. |
40 | 40 | ||
41 | However, modifications | 41 | However, modifications |
42 | to data, participating in scheduling must be additionally | 42 | to data, participating in scheduling must be additionally |
@@ -66,7 +66,7 @@ void qdisc_unlock_tree(struct net_device *dev) | |||
66 | write_unlock(&qdisc_tree_lock); | 66 | write_unlock(&qdisc_tree_lock); |
67 | } | 67 | } |
68 | 68 | ||
69 | /* | 69 | /* |
70 | dev->queue_lock serializes queue accesses for this device | 70 | dev->queue_lock serializes queue accesses for this device |
71 | AND dev->qdisc pointer itself. | 71 | AND dev->qdisc pointer itself. |
72 | 72 | ||
@@ -82,7 +82,7 @@ void qdisc_unlock_tree(struct net_device *dev) | |||
82 | we do not check dev->tbusy flag here. | 82 | we do not check dev->tbusy flag here. |
83 | 83 | ||
84 | Returns: 0 - queue is empty. | 84 | Returns: 0 - queue is empty. |
85 | >0 - queue is not empty, but throttled. | 85 | >0 - queue is not empty, but throttled. |
86 | <0 - queue is not empty. Device is throttled, if dev->tbusy != 0. | 86 | <0 - queue is not empty. Device is throttled, if dev->tbusy != 0. |
87 | 87 | ||
88 | NOTE: Called under dev->queue_lock with locally disabled BH. | 88 | NOTE: Called under dev->queue_lock with locally disabled BH. |
@@ -112,7 +112,7 @@ static inline int qdisc_restart(struct net_device *dev) | |||
112 | if (!netif_tx_trylock(dev)) { | 112 | if (!netif_tx_trylock(dev)) { |
113 | collision: | 113 | collision: |
114 | /* So, someone grabbed the driver. */ | 114 | /* So, someone grabbed the driver. */ |
115 | 115 | ||
116 | /* It may be transient configuration error, | 116 | /* It may be transient configuration error, |
117 | when hard_start_xmit() recurses. We detect | 117 | when hard_start_xmit() recurses. We detect |
118 | it by checking xmit owner and drop the | 118 | it by checking xmit owner and drop the |
@@ -128,7 +128,7 @@ static inline int qdisc_restart(struct net_device *dev) | |||
128 | goto requeue; | 128 | goto requeue; |
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | { | 132 | { |
133 | /* And release queue */ | 133 | /* And release queue */ |
134 | spin_unlock(&dev->queue_lock); | 134 | spin_unlock(&dev->queue_lock); |
@@ -137,7 +137,7 @@ static inline int qdisc_restart(struct net_device *dev) | |||
137 | int ret; | 137 | int ret; |
138 | 138 | ||
139 | ret = dev_hard_start_xmit(skb, dev); | 139 | ret = dev_hard_start_xmit(skb, dev); |
140 | if (ret == NETDEV_TX_OK) { | 140 | if (ret == NETDEV_TX_OK) { |
141 | if (!nolock) { | 141 | if (!nolock) { |
142 | netif_tx_unlock(dev); | 142 | netif_tx_unlock(dev); |
143 | } | 143 | } |
@@ -146,15 +146,15 @@ static inline int qdisc_restart(struct net_device *dev) | |||
146 | } | 146 | } |
147 | if (ret == NETDEV_TX_LOCKED && nolock) { | 147 | if (ret == NETDEV_TX_LOCKED && nolock) { |
148 | spin_lock(&dev->queue_lock); | 148 | spin_lock(&dev->queue_lock); |
149 | goto collision; | 149 | goto collision; |
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | /* NETDEV_TX_BUSY - we need to requeue */ | 153 | /* NETDEV_TX_BUSY - we need to requeue */ |
154 | /* Release the driver */ | 154 | /* Release the driver */ |
155 | if (!nolock) { | 155 | if (!nolock) { |
156 | netif_tx_unlock(dev); | 156 | netif_tx_unlock(dev); |
157 | } | 157 | } |
158 | spin_lock(&dev->queue_lock); | 158 | spin_lock(&dev->queue_lock); |
159 | q = dev->qdisc; | 159 | q = dev->qdisc; |
160 | } | 160 | } |
@@ -300,7 +300,7 @@ struct Qdisc noop_qdisc = { | |||
300 | .enqueue = noop_enqueue, | 300 | .enqueue = noop_enqueue, |
301 | .dequeue = noop_dequeue, | 301 | .dequeue = noop_dequeue, |
302 | .flags = TCQ_F_BUILTIN, | 302 | .flags = TCQ_F_BUILTIN, |
303 | .ops = &noop_qdisc_ops, | 303 | .ops = &noop_qdisc_ops, |
304 | .list = LIST_HEAD_INIT(noop_qdisc.list), | 304 | .list = LIST_HEAD_INIT(noop_qdisc.list), |
305 | }; | 305 | }; |
306 | 306 | ||
@@ -454,7 +454,7 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, | |||
454 | unsigned int parentid) | 454 | unsigned int parentid) |
455 | { | 455 | { |
456 | struct Qdisc *sch; | 456 | struct Qdisc *sch; |
457 | 457 | ||
458 | sch = qdisc_alloc(dev, ops); | 458 | sch = qdisc_alloc(dev, ops); |
459 | if (IS_ERR(sch)) | 459 | if (IS_ERR(sch)) |
460 | goto errout; | 460 | goto errout; |
@@ -478,7 +478,7 @@ void qdisc_reset(struct Qdisc *qdisc) | |||
478 | ops->reset(qdisc); | 478 | ops->reset(qdisc); |
479 | } | 479 | } |
480 | 480 | ||
481 | /* this is the rcu callback function to clean up a qdisc when there | 481 | /* this is the rcu callback function to clean up a qdisc when there |
482 | * are no further references to it */ | 482 | * are no further references to it */ |
483 | 483 | ||
484 | static void __qdisc_destroy(struct rcu_head *head) | 484 | static void __qdisc_destroy(struct rcu_head *head) |
@@ -600,10 +600,10 @@ void dev_shutdown(struct net_device *dev) | |||
600 | dev->qdisc_sleeping = &noop_qdisc; | 600 | dev->qdisc_sleeping = &noop_qdisc; |
601 | qdisc_destroy(qdisc); | 601 | qdisc_destroy(qdisc); |
602 | #if defined(CONFIG_NET_SCH_INGRESS) || defined(CONFIG_NET_SCH_INGRESS_MODULE) | 602 | #if defined(CONFIG_NET_SCH_INGRESS) || defined(CONFIG_NET_SCH_INGRESS_MODULE) |
603 | if ((qdisc = dev->qdisc_ingress) != NULL) { | 603 | if ((qdisc = dev->qdisc_ingress) != NULL) { |
604 | dev->qdisc_ingress = NULL; | 604 | dev->qdisc_ingress = NULL; |
605 | qdisc_destroy(qdisc); | 605 | qdisc_destroy(qdisc); |
606 | } | 606 | } |
607 | #endif | 607 | #endif |
608 | BUG_TRAP(!timer_pending(&dev->watchdog_timer)); | 608 | BUG_TRAP(!timer_pending(&dev->watchdog_timer)); |
609 | qdisc_unlock_tree(dev); | 609 | qdisc_unlock_tree(dev); |
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 18e81a8ffb01..fa1b4fe7a5fd 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c | |||
@@ -335,7 +335,7 @@ static void gred_reset(struct Qdisc* sch) | |||
335 | 335 | ||
336 | qdisc_reset_queue(sch); | 336 | qdisc_reset_queue(sch); |
337 | 337 | ||
338 | for (i = 0; i < t->DPs; i++) { | 338 | for (i = 0; i < t->DPs; i++) { |
339 | struct gred_sched_data *q = t->tab[i]; | 339 | struct gred_sched_data *q = t->tab[i]; |
340 | 340 | ||
341 | if (!q) | 341 | if (!q) |
@@ -393,7 +393,7 @@ static inline int gred_change_table_def(struct Qdisc *sch, struct rtattr *dps) | |||
393 | "shadowed VQ 0x%x\n", i); | 393 | "shadowed VQ 0x%x\n", i); |
394 | gred_destroy_vq(table->tab[i]); | 394 | gred_destroy_vq(table->tab[i]); |
395 | table->tab[i] = NULL; | 395 | table->tab[i] = NULL; |
396 | } | 396 | } |
397 | } | 397 | } |
398 | 398 | ||
399 | return 0; | 399 | return 0; |
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 6eefa6995777..135087d4213a 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -284,7 +284,7 @@ static inline struct hfsc_class * | |||
284 | eltree_get_minel(struct hfsc_sched *q) | 284 | eltree_get_minel(struct hfsc_sched *q) |
285 | { | 285 | { |
286 | struct rb_node *n; | 286 | struct rb_node *n; |
287 | 287 | ||
288 | n = rb_first(&q->eligible); | 288 | n = rb_first(&q->eligible); |
289 | if (n == NULL) | 289 | if (n == NULL) |
290 | return NULL; | 290 | return NULL; |
@@ -773,7 +773,7 @@ init_vf(struct hfsc_class *cl, unsigned int len) | |||
773 | /* update the virtual curve */ | 773 | /* update the virtual curve */ |
774 | vt = cl->cl_vt + cl->cl_vtoff; | 774 | vt = cl->cl_vt + cl->cl_vtoff; |
775 | rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt, | 775 | rtsc_min(&cl->cl_virtual, &cl->cl_fsc, vt, |
776 | cl->cl_total); | 776 | cl->cl_total); |
777 | if (cl->cl_virtual.x == vt) { | 777 | if (cl->cl_virtual.x == vt) { |
778 | cl->cl_virtual.x -= cl->cl_vtoff; | 778 | cl->cl_virtual.x -= cl->cl_vtoff; |
779 | cl->cl_vtoff = 0; | 779 | cl->cl_vtoff = 0; |
@@ -796,10 +796,10 @@ init_vf(struct hfsc_class *cl, unsigned int len) | |||
796 | 796 | ||
797 | /* update the ulimit curve */ | 797 | /* update the ulimit curve */ |
798 | rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time, | 798 | rtsc_min(&cl->cl_ulimit, &cl->cl_usc, cur_time, |
799 | cl->cl_total); | 799 | cl->cl_total); |
800 | /* compute myf */ | 800 | /* compute myf */ |
801 | cl->cl_myf = rtsc_y2x(&cl->cl_ulimit, | 801 | cl->cl_myf = rtsc_y2x(&cl->cl_ulimit, |
802 | cl->cl_total); | 802 | cl->cl_total); |
803 | cl->cl_myfadj = 0; | 803 | cl->cl_myfadj = 0; |
804 | } | 804 | } |
805 | } | 805 | } |
@@ -853,7 +853,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time) | |||
853 | * update vt and f | 853 | * update vt and f |
854 | */ | 854 | */ |
855 | cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total) | 855 | cl->cl_vt = rtsc_y2x(&cl->cl_virtual, cl->cl_total) |
856 | - cl->cl_vtoff + cl->cl_vtadj; | 856 | - cl->cl_vtoff + cl->cl_vtadj; |
857 | 857 | ||
858 | /* | 858 | /* |
859 | * if vt of the class is smaller than cvtmin, | 859 | * if vt of the class is smaller than cvtmin, |
@@ -870,7 +870,7 @@ update_vf(struct hfsc_class *cl, unsigned int len, u64 cur_time) | |||
870 | 870 | ||
871 | if (cl->cl_flags & HFSC_USC) { | 871 | if (cl->cl_flags & HFSC_USC) { |
872 | cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, | 872 | cl->cl_myf = cl->cl_myfadj + rtsc_y2x(&cl->cl_ulimit, |
873 | cl->cl_total); | 873 | cl->cl_total); |
874 | #if 0 | 874 | #if 0 |
875 | /* | 875 | /* |
876 | * This code causes classes to stay way under their | 876 | * This code causes classes to stay way under their |
@@ -1001,7 +1001,7 @@ hfsc_find_class(u32 classid, struct Qdisc *sch) | |||
1001 | 1001 | ||
1002 | static void | 1002 | static void |
1003 | hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc, | 1003 | hfsc_change_rsc(struct hfsc_class *cl, struct tc_service_curve *rsc, |
1004 | u64 cur_time) | 1004 | u64 cur_time) |
1005 | { | 1005 | { |
1006 | sc2isc(rsc, &cl->cl_rsc); | 1006 | sc2isc(rsc, &cl->cl_rsc); |
1007 | rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul); | 1007 | rtsc_init(&cl->cl_deadline, &cl->cl_rsc, cur_time, cl->cl_cumul); |
@@ -1023,7 +1023,7 @@ hfsc_change_fsc(struct hfsc_class *cl, struct tc_service_curve *fsc) | |||
1023 | 1023 | ||
1024 | static void | 1024 | static void |
1025 | hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc, | 1025 | hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc, |
1026 | u64 cur_time) | 1026 | u64 cur_time) |
1027 | { | 1027 | { |
1028 | sc2isc(usc, &cl->cl_usc); | 1028 | sc2isc(usc, &cl->cl_usc); |
1029 | rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total); | 1029 | rtsc_init(&cl->cl_ulimit, &cl->cl_usc, cur_time, cl->cl_total); |
@@ -1032,7 +1032,7 @@ hfsc_change_usc(struct hfsc_class *cl, struct tc_service_curve *usc, | |||
1032 | 1032 | ||
1033 | static int | 1033 | static int |
1034 | hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | 1034 | hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, |
1035 | struct rtattr **tca, unsigned long *arg) | 1035 | struct rtattr **tca, unsigned long *arg) |
1036 | { | 1036 | { |
1037 | struct hfsc_sched *q = qdisc_priv(sch); | 1037 | struct hfsc_sched *q = qdisc_priv(sch); |
1038 | struct hfsc_class *cl = (struct hfsc_class *)*arg; | 1038 | struct hfsc_class *cl = (struct hfsc_class *)*arg; |
@@ -1228,9 +1228,9 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
1228 | #ifdef CONFIG_NET_CLS_ACT | 1228 | #ifdef CONFIG_NET_CLS_ACT |
1229 | switch (result) { | 1229 | switch (result) { |
1230 | case TC_ACT_QUEUED: | 1230 | case TC_ACT_QUEUED: |
1231 | case TC_ACT_STOLEN: | 1231 | case TC_ACT_STOLEN: |
1232 | *qerr = NET_XMIT_SUCCESS; | 1232 | *qerr = NET_XMIT_SUCCESS; |
1233 | case TC_ACT_SHOT: | 1233 | case TC_ACT_SHOT: |
1234 | return NULL; | 1234 | return NULL; |
1235 | } | 1235 | } |
1236 | #elif defined(CONFIG_NET_CLS_POLICE) | 1236 | #elif defined(CONFIG_NET_CLS_POLICE) |
@@ -1259,7 +1259,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
1259 | 1259 | ||
1260 | static int | 1260 | static int |
1261 | hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | 1261 | hfsc_graft_class(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, |
1262 | struct Qdisc **old) | 1262 | struct Qdisc **old) |
1263 | { | 1263 | { |
1264 | struct hfsc_class *cl = (struct hfsc_class *)arg; | 1264 | struct hfsc_class *cl = (struct hfsc_class *)arg; |
1265 | 1265 | ||
@@ -1397,7 +1397,7 @@ hfsc_dump_curves(struct sk_buff *skb, struct hfsc_class *cl) | |||
1397 | 1397 | ||
1398 | static int | 1398 | static int |
1399 | hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, | 1399 | hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, |
1400 | struct tcmsg *tcm) | 1400 | struct tcmsg *tcm) |
1401 | { | 1401 | { |
1402 | struct hfsc_class *cl = (struct hfsc_class *)arg; | 1402 | struct hfsc_class *cl = (struct hfsc_class *)arg; |
1403 | unsigned char *b = skb->tail; | 1403 | unsigned char *b = skb->tail; |
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 15f23c5511a8..1f098d862f92 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * Credits (in time order) for older HTB versions: | 11 | * Credits (in time order) for older HTB versions: |
12 | * Stef Coene <stef.coene@docum.org> | 12 | * Stef Coene <stef.coene@docum.org> |
13 | * HTB support at LARTC mailing list | 13 | * HTB support at LARTC mailing list |
14 | * Ondrej Kraus, <krauso@barr.cz> | 14 | * Ondrej Kraus, <krauso@barr.cz> |
15 | * found missing INIT_QDISC(htb) | 15 | * found missing INIT_QDISC(htb) |
16 | * Vladimir Smelhaus, Aamer Akhter, Bert Hubert | 16 | * Vladimir Smelhaus, Aamer Akhter, Bert Hubert |
17 | * helped a lot to locate nasty class stall bug | 17 | * helped a lot to locate nasty class stall bug |
@@ -59,11 +59,11 @@ | |||
59 | Author: devik@cdi.cz | 59 | Author: devik@cdi.cz |
60 | ======================================================================== | 60 | ======================================================================== |
61 | HTB is like TBF with multiple classes. It is also similar to CBQ because | 61 | HTB is like TBF with multiple classes. It is also similar to CBQ because |
62 | it allows to assign priority to each class in hierarchy. | 62 | it allows to assign priority to each class in hierarchy. |
63 | In fact it is another implementation of Floyd's formal sharing. | 63 | In fact it is another implementation of Floyd's formal sharing. |
64 | 64 | ||
65 | Levels: | 65 | Levels: |
66 | Each class is assigned level. Leaf has ALWAYS level 0 and root | 66 | Each class is assigned level. Leaf has ALWAYS level 0 and root |
67 | classes have level TC_HTB_MAXDEPTH-1. Interior nodes has level | 67 | classes have level TC_HTB_MAXDEPTH-1. Interior nodes has level |
68 | one less than their parent. | 68 | one less than their parent. |
69 | */ | 69 | */ |
@@ -245,7 +245,7 @@ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch) | |||
245 | * We allow direct class selection by classid in priority. The we examine | 245 | * We allow direct class selection by classid in priority. The we examine |
246 | * filters in qdisc and in inner nodes (if higher filter points to the inner | 246 | * filters in qdisc and in inner nodes (if higher filter points to the inner |
247 | * node). If we end up with classid MAJOR:0 we enqueue the skb into special | 247 | * node). If we end up with classid MAJOR:0 we enqueue the skb into special |
248 | * internal fifo (direct). These packets then go directly thru. If we still | 248 | * internal fifo (direct). These packets then go directly thru. If we still |
249 | * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull | 249 | * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessfull |
250 | * then finish and return direct queue. | 250 | * then finish and return direct queue. |
251 | */ | 251 | */ |
@@ -433,7 +433,7 @@ static inline void htb_remove_class_from_row(struct htb_sched *q, | |||
433 | * htb_activate_prios - creates active classe's feed chain | 433 | * htb_activate_prios - creates active classe's feed chain |
434 | * | 434 | * |
435 | * The class is connected to ancestors and/or appropriate rows | 435 | * The class is connected to ancestors and/or appropriate rows |
436 | * for priorities it is participating on. cl->cmode must be new | 436 | * for priorities it is participating on. cl->cmode must be new |
437 | * (activated) mode. It does nothing if cl->prio_activity == 0. | 437 | * (activated) mode. It does nothing if cl->prio_activity == 0. |
438 | */ | 438 | */ |
439 | static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) | 439 | static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) |
@@ -466,7 +466,7 @@ static void htb_activate_prios(struct htb_sched *q, struct htb_class *cl) | |||
466 | /** | 466 | /** |
467 | * htb_deactivate_prios - remove class from feed chain | 467 | * htb_deactivate_prios - remove class from feed chain |
468 | * | 468 | * |
469 | * cl->cmode must represent old mode (before deactivation). It does | 469 | * cl->cmode must represent old mode (before deactivation). It does |
470 | * nothing if cl->prio_activity == 0. Class is removed from all feed | 470 | * nothing if cl->prio_activity == 0. Class is removed from all feed |
471 | * chains and rows. | 471 | * chains and rows. |
472 | */ | 472 | */ |
@@ -524,9 +524,9 @@ static inline long htb_hiwater(const struct htb_class *cl) | |||
524 | * | 524 | * |
525 | * It computes cl's mode at time cl->t_c+diff and returns it. If mode | 525 | * It computes cl's mode at time cl->t_c+diff and returns it. If mode |
526 | * is not HTB_CAN_SEND then cl->pq_key is updated to time difference | 526 | * is not HTB_CAN_SEND then cl->pq_key is updated to time difference |
527 | * from now to time when cl will change its state. | 527 | * from now to time when cl will change its state. |
528 | * Also it is worth to note that class mode doesn't change simply | 528 | * Also it is worth to note that class mode doesn't change simply |
529 | * at cl->{c,}tokens == 0 but there can rather be hysteresis of | 529 | * at cl->{c,}tokens == 0 but there can rather be hysteresis of |
530 | * 0 .. -cl->{c,}buffer range. It is meant to limit number of | 530 | * 0 .. -cl->{c,}buffer range. It is meant to limit number of |
531 | * mode transitions per time unit. The speed gain is about 1/6. | 531 | * mode transitions per time unit. The speed gain is about 1/6. |
532 | */ | 532 | */ |
@@ -575,7 +575,7 @@ htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, long *diff) | |||
575 | } | 575 | } |
576 | 576 | ||
577 | /** | 577 | /** |
578 | * htb_activate - inserts leaf cl into appropriate active feeds | 578 | * htb_activate - inserts leaf cl into appropriate active feeds |
579 | * | 579 | * |
580 | * Routine learns (new) priority of leaf and activates feed chain | 580 | * Routine learns (new) priority of leaf and activates feed chain |
581 | * for the prio. It can be called on already active leaf safely. | 581 | * for the prio. It can be called on already active leaf safely. |
@@ -594,7 +594,7 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | /** | 596 | /** |
597 | * htb_deactivate - remove leaf cl from active feeds | 597 | * htb_deactivate - remove leaf cl from active feeds |
598 | * | 598 | * |
599 | * Make sure that leaf is active. In the other words it can't be called | 599 | * Make sure that leaf is active. In the other words it can't be called |
600 | * with non-active leaf. It also removes class from the drop list. | 600 | * with non-active leaf. It also removes class from the drop list. |
@@ -854,7 +854,7 @@ static struct htb_class *htb_lookup_leaf(struct rb_root *tree, int prio, | |||
854 | 854 | ||
855 | for (i = 0; i < 65535; i++) { | 855 | for (i = 0; i < 65535; i++) { |
856 | if (!*sp->pptr && *sp->pid) { | 856 | if (!*sp->pptr && *sp->pid) { |
857 | /* ptr was invalidated but id is valid - try to recover | 857 | /* ptr was invalidated but id is valid - try to recover |
858 | the original or next ptr */ | 858 | the original or next ptr */ |
859 | *sp->pptr = | 859 | *sp->pptr = |
860 | htb_id_find_next_upper(prio, sp->root, *sp->pid); | 860 | htb_id_find_next_upper(prio, sp->root, *sp->pid); |
@@ -906,7 +906,7 @@ next: | |||
906 | 906 | ||
907 | /* class can be empty - it is unlikely but can be true if leaf | 907 | /* class can be empty - it is unlikely but can be true if leaf |
908 | qdisc drops packets in enqueue routine or if someone used | 908 | qdisc drops packets in enqueue routine or if someone used |
909 | graft operation on the leaf since last dequeue; | 909 | graft operation on the leaf since last dequeue; |
910 | simply deactivate and skip such class */ | 910 | simply deactivate and skip such class */ |
911 | if (unlikely(cl->un.leaf.q->q.qlen == 0)) { | 911 | if (unlikely(cl->un.leaf.q->q.qlen == 0)) { |
912 | struct htb_class *next; | 912 | struct htb_class *next; |
@@ -1229,7 +1229,7 @@ static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
1229 | if (cl && !cl->level) { | 1229 | if (cl && !cl->level) { |
1230 | if (new == NULL && | 1230 | if (new == NULL && |
1231 | (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, | 1231 | (new = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops, |
1232 | cl->classid)) | 1232 | cl->classid)) |
1233 | == NULL) | 1233 | == NULL) |
1234 | return -ENOBUFS; | 1234 | return -ENOBUFS; |
1235 | sch_tree_lock(sch); | 1235 | sch_tree_lock(sch); |
@@ -1347,7 +1347,7 @@ static void htb_destroy(struct Qdisc *sch) | |||
1347 | del_timer_sync(&q->rttim); | 1347 | del_timer_sync(&q->rttim); |
1348 | #endif | 1348 | #endif |
1349 | /* This line used to be after htb_destroy_class call below | 1349 | /* This line used to be after htb_destroy_class call below |
1350 | and surprisingly it worked in 2.4. But it must precede it | 1350 | and surprisingly it worked in 2.4. But it must precede it |
1351 | because filter need its target class alive to be able to call | 1351 | because filter need its target class alive to be able to call |
1352 | unbind_filter on it (without Oops). */ | 1352 | unbind_filter on it (without Oops). */ |
1353 | htb_destroy_filters(&q->filter_list); | 1353 | htb_destroy_filters(&q->filter_list); |
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index c3242f727d41..cfe070ee6ee3 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* net/sched/sch_ingress.c - Ingress qdisc | 1 | /* net/sched/sch_ingress.c - Ingress qdisc |
2 | * This program is free software; you can redistribute it and/or | 2 | * This program is free software; you can redistribute it and/or |
3 | * modify it under the terms of the GNU General Public License | 3 | * modify it under the terms of the GNU General Public License |
4 | * as published by the Free Software Foundation; either version | 4 | * as published by the Free Software Foundation; either version |
@@ -47,7 +47,7 @@ | |||
47 | */ | 47 | */ |
48 | #ifndef CONFIG_NET_CLS_ACT | 48 | #ifndef CONFIG_NET_CLS_ACT |
49 | #ifdef CONFIG_NETFILTER | 49 | #ifdef CONFIG_NETFILTER |
50 | static int nf_registered; | 50 | static int nf_registered; |
51 | #endif | 51 | #endif |
52 | #endif | 52 | #endif |
53 | 53 | ||
@@ -70,7 +70,7 @@ static int ingress_graft(struct Qdisc *sch,unsigned long arg, | |||
70 | DPRINTK("ingress_graft(sch %p,[qdisc %p],new %p,old %p)\n", | 70 | DPRINTK("ingress_graft(sch %p,[qdisc %p],new %p,old %p)\n", |
71 | sch, p, new, old); | 71 | sch, p, new, old); |
72 | DPRINTK("\n ingress_graft: You cannot add qdiscs to classes"); | 72 | DPRINTK("\n ingress_graft: You cannot add qdiscs to classes"); |
73 | return 1; | 73 | return 1; |
74 | } | 74 | } |
75 | 75 | ||
76 | 76 | ||
@@ -162,7 +162,7 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch) | |||
162 | case TC_ACT_QUEUED: | 162 | case TC_ACT_QUEUED: |
163 | result = TC_ACT_STOLEN; | 163 | result = TC_ACT_STOLEN; |
164 | break; | 164 | break; |
165 | case TC_ACT_RECLASSIFY: | 165 | case TC_ACT_RECLASSIFY: |
166 | case TC_ACT_OK: | 166 | case TC_ACT_OK: |
167 | case TC_ACT_UNSPEC: | 167 | case TC_ACT_UNSPEC: |
168 | default: | 168 | default: |
@@ -172,7 +172,7 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch) | |||
172 | }; | 172 | }; |
173 | /* backward compat */ | 173 | /* backward compat */ |
174 | #else | 174 | #else |
175 | #ifdef CONFIG_NET_CLS_POLICE | 175 | #ifdef CONFIG_NET_CLS_POLICE |
176 | switch (result) { | 176 | switch (result) { |
177 | case TC_POLICE_SHOT: | 177 | case TC_POLICE_SHOT: |
178 | result = NF_DROP; | 178 | result = NF_DROP; |
@@ -232,14 +232,14 @@ static unsigned int ingress_drop(struct Qdisc *sch) | |||
232 | #ifdef CONFIG_NETFILTER | 232 | #ifdef CONFIG_NETFILTER |
233 | static unsigned int | 233 | static unsigned int |
234 | ing_hook(unsigned int hook, struct sk_buff **pskb, | 234 | ing_hook(unsigned int hook, struct sk_buff **pskb, |
235 | const struct net_device *indev, | 235 | const struct net_device *indev, |
236 | const struct net_device *outdev, | 236 | const struct net_device *outdev, |
237 | int (*okfn)(struct sk_buff *)) | 237 | int (*okfn)(struct sk_buff *)) |
238 | { | 238 | { |
239 | 239 | ||
240 | struct Qdisc *q; | 240 | struct Qdisc *q; |
241 | struct sk_buff *skb = *pskb; | 241 | struct sk_buff *skb = *pskb; |
242 | struct net_device *dev = skb->dev; | 242 | struct net_device *dev = skb->dev; |
243 | int fwres=NF_ACCEPT; | 243 | int fwres=NF_ACCEPT; |
244 | 244 | ||
245 | DPRINTK("ing_hook: skb %s dev=%s len=%u\n", | 245 | DPRINTK("ing_hook: skb %s dev=%s len=%u\n", |
@@ -247,7 +247,7 @@ ing_hook(unsigned int hook, struct sk_buff **pskb, | |||
247 | skb->dev ? (*pskb)->dev->name : "(no dev)", | 247 | skb->dev ? (*pskb)->dev->name : "(no dev)", |
248 | skb->len); | 248 | skb->len); |
249 | 249 | ||
250 | /* | 250 | /* |
251 | revisit later: Use a private since lock dev->queue_lock is also | 251 | revisit later: Use a private since lock dev->queue_lock is also |
252 | used on the egress (might slow things for an iota) | 252 | used on the egress (might slow things for an iota) |
253 | */ | 253 | */ |
@@ -257,8 +257,8 @@ used on the egress (might slow things for an iota) | |||
257 | if ((q = dev->qdisc_ingress) != NULL) | 257 | if ((q = dev->qdisc_ingress) != NULL) |
258 | fwres = q->enqueue(skb, q); | 258 | fwres = q->enqueue(skb, q); |
259 | spin_unlock(&dev->queue_lock); | 259 | spin_unlock(&dev->queue_lock); |
260 | } | 260 | } |
261 | 261 | ||
262 | return fwres; | 262 | return fwres; |
263 | } | 263 | } |
264 | 264 | ||
@@ -296,7 +296,7 @@ static int ingress_init(struct Qdisc *sch,struct rtattr *opt) | |||
296 | printk("Ingress scheduler: Classifier actions prefered over netfilter\n"); | 296 | printk("Ingress scheduler: Classifier actions prefered over netfilter\n"); |
297 | #endif | 297 | #endif |
298 | #endif | 298 | #endif |
299 | 299 | ||
300 | #ifndef CONFIG_NET_CLS_ACT | 300 | #ifndef CONFIG_NET_CLS_ACT |
301 | #ifdef CONFIG_NETFILTER | 301 | #ifdef CONFIG_NETFILTER |
302 | if (!nf_registered) { | 302 | if (!nf_registered) { |
@@ -417,7 +417,7 @@ static int __init ingress_module_init(void) | |||
417 | 417 | ||
418 | return ret; | 418 | return ret; |
419 | } | 419 | } |
420 | static void __exit ingress_module_exit(void) | 420 | static void __exit ingress_module_exit(void) |
421 | { | 421 | { |
422 | unregister_qdisc(&ingress_qdisc_ops); | 422 | unregister_qdisc(&ingress_qdisc_ops); |
423 | #ifndef CONFIG_NET_CLS_ACT | 423 | #ifndef CONFIG_NET_CLS_ACT |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 79542af9dab1..1ccbfb55b0b8 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * 2 of the License. | 7 | * 2 of the License. |
8 | * | 8 | * |
9 | * Many of the algorithms and ideas for this came from | 9 | * Many of the algorithms and ideas for this came from |
10 | * NIST Net which is not copyrighted. | 10 | * NIST Net which is not copyrighted. |
11 | * | 11 | * |
12 | * Authors: Stephen Hemminger <shemminger@osdl.org> | 12 | * Authors: Stephen Hemminger <shemminger@osdl.org> |
13 | * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> | 13 | * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> |
@@ -114,7 +114,7 @@ static unsigned long get_crandom(struct crndstate *state) | |||
114 | * std deviation sigma. Uses table lookup to approximate the desired | 114 | * std deviation sigma. Uses table lookup to approximate the desired |
115 | * distribution, and a uniformly-distributed pseudo-random source. | 115 | * distribution, and a uniformly-distributed pseudo-random source. |
116 | */ | 116 | */ |
117 | static long tabledist(unsigned long mu, long sigma, | 117 | static long tabledist(unsigned long mu, long sigma, |
118 | struct crndstate *state, const struct disttable *dist) | 118 | struct crndstate *state, const struct disttable *dist) |
119 | { | 119 | { |
120 | long t, x; | 120 | long t, x; |
@@ -126,7 +126,7 @@ static long tabledist(unsigned long mu, long sigma, | |||
126 | rnd = get_crandom(state); | 126 | rnd = get_crandom(state); |
127 | 127 | ||
128 | /* default uniform distribution */ | 128 | /* default uniform distribution */ |
129 | if (dist == NULL) | 129 | if (dist == NULL) |
130 | return (rnd % (2*sigma)) - sigma + mu; | 130 | return (rnd % (2*sigma)) - sigma + mu; |
131 | 131 | ||
132 | t = dist->table[rnd % dist->size]; | 132 | t = dist->table[rnd % dist->size]; |
@@ -218,7 +218,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
218 | ++q->counter; | 218 | ++q->counter; |
219 | ret = q->qdisc->enqueue(skb, q->qdisc); | 219 | ret = q->qdisc->enqueue(skb, q->qdisc); |
220 | } else { | 220 | } else { |
221 | /* | 221 | /* |
222 | * Do re-ordering by putting one out of N packets at the front | 222 | * Do re-ordering by putting one out of N packets at the front |
223 | * of the queue. | 223 | * of the queue. |
224 | */ | 224 | */ |
@@ -323,7 +323,7 @@ static void netem_reset(struct Qdisc *sch) | |||
323 | /* Pass size change message down to embedded FIFO */ | 323 | /* Pass size change message down to embedded FIFO */ |
324 | static int set_fifo_limit(struct Qdisc *q, int limit) | 324 | static int set_fifo_limit(struct Qdisc *q, int limit) |
325 | { | 325 | { |
326 | struct rtattr *rta; | 326 | struct rtattr *rta; |
327 | int ret = -ENOMEM; | 327 | int ret = -ENOMEM; |
328 | 328 | ||
329 | /* Hack to avoid sending change message to non-FIFO */ | 329 | /* Hack to avoid sending change message to non-FIFO */ |
@@ -333,9 +333,9 @@ static int set_fifo_limit(struct Qdisc *q, int limit) | |||
333 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); | 333 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); |
334 | if (rta) { | 334 | if (rta) { |
335 | rta->rta_type = RTM_NEWQDISC; | 335 | rta->rta_type = RTM_NEWQDISC; |
336 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); | 336 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); |
337 | ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; | 337 | ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; |
338 | 338 | ||
339 | ret = q->ops->change(q, rta); | 339 | ret = q->ops->change(q, rta); |
340 | kfree(rta); | 340 | kfree(rta); |
341 | } | 341 | } |
@@ -364,7 +364,7 @@ static int get_dist_table(struct Qdisc *sch, const struct rtattr *attr) | |||
364 | d->size = n; | 364 | d->size = n; |
365 | for (i = 0; i < n; i++) | 365 | for (i = 0; i < n; i++) |
366 | d->table[i] = data[i]; | 366 | d->table[i] = data[i]; |
367 | 367 | ||
368 | spin_lock_bh(&sch->dev->queue_lock); | 368 | spin_lock_bh(&sch->dev->queue_lock); |
369 | d = xchg(&q->delay_dist, d); | 369 | d = xchg(&q->delay_dist, d); |
370 | spin_unlock_bh(&sch->dev->queue_lock); | 370 | spin_unlock_bh(&sch->dev->queue_lock); |
@@ -419,7 +419,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) | |||
419 | struct netem_sched_data *q = qdisc_priv(sch); | 419 | struct netem_sched_data *q = qdisc_priv(sch); |
420 | struct tc_netem_qopt *qopt; | 420 | struct tc_netem_qopt *qopt; |
421 | int ret; | 421 | int ret; |
422 | 422 | ||
423 | if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) | 423 | if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(*qopt)) |
424 | return -EINVAL; | 424 | return -EINVAL; |
425 | 425 | ||
@@ -429,7 +429,7 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) | |||
429 | pr_debug("netem: can't set fifo limit\n"); | 429 | pr_debug("netem: can't set fifo limit\n"); |
430 | return ret; | 430 | return ret; |
431 | } | 431 | } |
432 | 432 | ||
433 | q->latency = qopt->latency; | 433 | q->latency = qopt->latency; |
434 | q->jitter = qopt->jitter; | 434 | q->jitter = qopt->jitter; |
435 | q->limit = qopt->limit; | 435 | q->limit = qopt->limit; |
@@ -445,10 +445,10 @@ static int netem_change(struct Qdisc *sch, struct rtattr *opt) | |||
445 | 445 | ||
446 | /* Handle nested options after initial queue options. | 446 | /* Handle nested options after initial queue options. |
447 | * Should have put all options in nested format but too late now. | 447 | * Should have put all options in nested format but too late now. |
448 | */ | 448 | */ |
449 | if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { | 449 | if (RTA_PAYLOAD(opt) > sizeof(*qopt)) { |
450 | struct rtattr *tb[TCA_NETEM_MAX]; | 450 | struct rtattr *tb[TCA_NETEM_MAX]; |
451 | if (rtattr_parse(tb, TCA_NETEM_MAX, | 451 | if (rtattr_parse(tb, TCA_NETEM_MAX, |
452 | RTA_DATA(opt) + sizeof(*qopt), | 452 | RTA_DATA(opt) + sizeof(*qopt), |
453 | RTA_PAYLOAD(opt) - sizeof(*qopt))) | 453 | RTA_PAYLOAD(opt) - sizeof(*qopt))) |
454 | return -EINVAL; | 454 | return -EINVAL; |
@@ -681,7 +681,7 @@ static void netem_put(struct Qdisc *sch, unsigned long arg) | |||
681 | { | 681 | { |
682 | } | 682 | } |
683 | 683 | ||
684 | static int netem_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | 684 | static int netem_change_class(struct Qdisc *sch, u32 classid, u32 parentid, |
685 | struct rtattr **tca, unsigned long *arg) | 685 | struct rtattr **tca, unsigned long *arg) |
686 | { | 686 | { |
687 | return -ENOSYS; | 687 | return -ENOSYS; |
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 000e043ebd62..9f957ca5073b 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * 2 of the License, or (at your option) any later version. | 7 | * 2 of the License, or (at your option) any later version. |
8 | * | 8 | * |
9 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 9 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
10 | * Fixes: 19990609: J Hadi Salim <hadi@nortelnetworks.com>: | 10 | * Fixes: 19990609: J Hadi Salim <hadi@nortelnetworks.com>: |
11 | * Init -- EINVAL when opt undefined | 11 | * Init -- EINVAL when opt undefined |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -105,7 +105,7 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
105 | return NET_XMIT_SUCCESS; | 105 | return NET_XMIT_SUCCESS; |
106 | } | 106 | } |
107 | sch->qstats.drops++; | 107 | sch->qstats.drops++; |
108 | return ret; | 108 | return ret; |
109 | } | 109 | } |
110 | 110 | ||
111 | 111 | ||
@@ -453,7 +453,7 @@ static int __init prio_module_init(void) | |||
453 | return register_qdisc(&prio_qdisc_ops); | 453 | return register_qdisc(&prio_qdisc_ops); |
454 | } | 454 | } |
455 | 455 | ||
456 | static void __exit prio_module_exit(void) | 456 | static void __exit prio_module_exit(void) |
457 | { | 457 | { |
458 | unregister_qdisc(&prio_qdisc_ops); | 458 | unregister_qdisc(&prio_qdisc_ops); |
459 | } | 459 | } |
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c index acddad08850f..00db53eb8159 100644 --- a/net/sched/sch_red.c +++ b/net/sched/sch_red.c | |||
@@ -185,7 +185,7 @@ static struct Qdisc *red_create_dflt(struct Qdisc *sch, u32 limit) | |||
185 | TC_H_MAKE(sch->handle, 1)); | 185 | TC_H_MAKE(sch->handle, 1)); |
186 | if (q) { | 186 | if (q) { |
187 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), | 187 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), |
188 | GFP_KERNEL); | 188 | GFP_KERNEL); |
189 | if (rta) { | 189 | if (rta) { |
190 | rta->rta_type = RTM_NEWQDISC; | 190 | rta->rta_type = RTM_NEWQDISC; |
191 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); | 191 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); |
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 82844801e421..66f32051a99b 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -53,7 +53,7 @@ | |||
53 | Queuing using Deficit Round Robin", Proc. SIGCOMM 95. | 53 | Queuing using Deficit Round Robin", Proc. SIGCOMM 95. |
54 | 54 | ||
55 | 55 | ||
56 | This is not the thing that is usually called (W)FQ nowadays. | 56 | This is not the thing that is usually called (W)FQ nowadays. |
57 | It does not use any timestamp mechanism, but instead | 57 | It does not use any timestamp mechanism, but instead |
58 | processes queues in round-robin order. | 58 | processes queues in round-robin order. |
59 | 59 | ||
@@ -63,7 +63,7 @@ | |||
63 | 63 | ||
64 | DRAWBACKS: | 64 | DRAWBACKS: |
65 | 65 | ||
66 | - "Stochastic" -> It is not 100% fair. | 66 | - "Stochastic" -> It is not 100% fair. |
67 | When hash collisions occur, several flows are considered as one. | 67 | When hash collisions occur, several flows are considered as one. |
68 | 68 | ||
69 | - "Round-robin" -> It introduces larger delays than virtual clock | 69 | - "Round-robin" -> It introduces larger delays than virtual clock |
@@ -501,7 +501,7 @@ static int __init sfq_module_init(void) | |||
501 | { | 501 | { |
502 | return register_qdisc(&sfq_qdisc_ops); | 502 | return register_qdisc(&sfq_qdisc_ops); |
503 | } | 503 | } |
504 | static void __exit sfq_module_exit(void) | 504 | static void __exit sfq_module_exit(void) |
505 | { | 505 | { |
506 | unregister_qdisc(&sfq_qdisc_ops); | 506 | unregister_qdisc(&sfq_qdisc_ops); |
507 | } | 507 | } |
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index ed9b6d938540..85da8daa61d2 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -276,7 +276,7 @@ static void tbf_reset(struct Qdisc* sch) | |||
276 | static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit) | 276 | static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit) |
277 | { | 277 | { |
278 | struct Qdisc *q; | 278 | struct Qdisc *q; |
279 | struct rtattr *rta; | 279 | struct rtattr *rta; |
280 | int ret; | 280 | int ret; |
281 | 281 | ||
282 | q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops, | 282 | q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops, |
@@ -285,7 +285,7 @@ static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit) | |||
285 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); | 285 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); |
286 | if (rta) { | 286 | if (rta) { |
287 | rta->rta_type = RTM_NEWQDISC; | 287 | rta->rta_type = RTM_NEWQDISC; |
288 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); | 288 | rta->rta_len = RTA_LENGTH(sizeof(struct tc_fifo_qopt)); |
289 | ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; | 289 | ((struct tc_fifo_qopt *)RTA_DATA(rta))->limit = limit; |
290 | 290 | ||
291 | ret = q->ops->change(q, rta); | 291 | ret = q->ops->change(q, rta); |
@@ -475,7 +475,7 @@ static void tbf_put(struct Qdisc *sch, unsigned long arg) | |||
475 | { | 475 | { |
476 | } | 476 | } |
477 | 477 | ||
478 | static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | 478 | static int tbf_change_class(struct Qdisc *sch, u32 classid, u32 parentid, |
479 | struct rtattr **tca, unsigned long *arg) | 479 | struct rtattr **tca, unsigned long *arg) |
480 | { | 480 | { |
481 | return -ENOSYS; | 481 | return -ENOSYS; |
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 4c16ad57a3e4..6a66037abac9 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c | |||
@@ -178,7 +178,7 @@ teql_destroy(struct Qdisc* sch) | |||
178 | teql_neigh_release(xchg(&dat->ncache, NULL)); | 178 | teql_neigh_release(xchg(&dat->ncache, NULL)); |
179 | break; | 179 | break; |
180 | } | 180 | } |
181 | 181 | ||
182 | } while ((prev = q) != master->slaves); | 182 | } while ((prev = q) != master->slaves); |
183 | } | 183 | } |
184 | } | 184 | } |
@@ -292,7 +292,7 @@ restart: | |||
292 | 292 | ||
293 | do { | 293 | do { |
294 | struct net_device *slave = q->dev; | 294 | struct net_device *slave = q->dev; |
295 | 295 | ||
296 | if (slave->qdisc_sleeping != q) | 296 | if (slave->qdisc_sleeping != q) |
297 | continue; | 297 | continue; |
298 | if (netif_queue_stopped(slave) || ! netif_running(slave)) { | 298 | if (netif_queue_stopped(slave) || ! netif_running(slave)) { |
@@ -425,7 +425,7 @@ static __init void teql_master_setup(struct net_device *dev) | |||
425 | 425 | ||
426 | master->dev = dev; | 426 | master->dev = dev; |
427 | ops->priv_size = sizeof(struct teql_sched_data); | 427 | ops->priv_size = sizeof(struct teql_sched_data); |
428 | 428 | ||
429 | ops->enqueue = teql_enqueue; | 429 | ops->enqueue = teql_enqueue; |
430 | ops->dequeue = teql_dequeue; | 430 | ops->dequeue = teql_dequeue; |
431 | ops->requeue = teql_requeue; | 431 | ops->requeue = teql_requeue; |
@@ -489,7 +489,7 @@ static int __init teql_init(void) | |||
489 | return i ? 0 : err; | 489 | return i ? 0 : err; |
490 | } | 490 | } |
491 | 491 | ||
492 | static void __exit teql_exit(void) | 492 | static void __exit teql_exit(void) |
493 | { | 493 | { |
494 | struct teql_master *master, *nxt; | 494 | struct teql_master *master, *nxt; |
495 | 495 | ||